See: http://www.imodulo.com/gnu/gcc/Other-Builtins.html
"The use of __builtin_expect has now two uses:
- on platforms where conditional jump instructions have prediction
bits
this information can be used to set them
- on all architectures it should now be possible to use
-freorder-blocks
to use the information to put the basic blocks in an order which
guarantees an optimal straight pass through the code for the
normal case."
(quote from http://sources.redhat.com/ml/libc-hacker/2000-04/msg00129.html
-freorder-blocks is enabled with -O2)
I hope that I have not missed any place or wrongly marked something as
likely/unlikely which is not.
Build and check-gfortraned on x86-64-linux
OK for the trunk?
Tobias
<built-expect.diff>
<built-expect-gen.diff.gz>