[PATCH 1/3] Fix Unlikely(x) == y

Arjan van de Ven arjan at infradead.org
Tue Feb 19 05:33:20 EST 2008


On Mon, 18 Feb 2008 13:11:06 -0500
Valdis.Kletnieks at vt.edu wrote:

> On Mon, 18 Feb 2008 14:27:10 GMT, David Howells said:
> 
> > __builtin_expect() is useful on FRV where you _have_ to give each
> > branch and conditional branch instruction a measure of probability
> > whether the branch will be taken.
> 
> What does gcc do the 99.998% of the time we don't have
> likely/unlikely coded?

see Andi's email.
It gets the exact same hints that 95%+ of the kernels unlikely/likely get you,
because the heuristics in it are usually the same as the kernel programmers 
heuristics.


-- 
If you want to reach me at my work email, use arjan at linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org



More information about the Linuxppc-dev mailing list