This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: branch predictions
>>>>> Jamie Lokier writes:
> On this theme of rearranging basic blocks, I have a couple of feature wishes.
> 1. Annotations. E.g., an attribute on a label to say "unlikely" or
> "likely". So you could write:
__builtin_expect should do this:
if (__builtin_expect (value, expected result) == some_value)
> if (unlikely_condition()) {
> __attribute__ ((unlikely)):
> /* ... */
> }
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de