Il 27/07/2012 11:40, Steven Bosscher ha scritto: >> > >> > As in the case where you have both an unlikely and likely jump to a >> > basic-block. But what I understand is that rth adds a way to mark >> > a basic-block as hot or cold, not a way to mark an edge as hot or cold >> > (that would be what the asm goto annotation would do). Both cases >> > are of course useful. > I don't see why it is useful to be able to mark a basic block as hot > or cold. This is something that the compiler can figure out for itself > if you provide the branch hints (__builtin_expect is also a kind of > branch hint). Marking basic blocks as likely or unlikely seems just > redundant and confusing to me. A basic block being hot or cold is an > effect of its incoming edges being unlikely-taken, not an inherent > property of the basic block itself.
You could say the same of functions. Sometimes it's easier to mark the edges and sometimes it's easier to mark the targets. Paolo