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

2 messages, 2 authors, 2008-02-18 · open the first message on its own page

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

From: <hidden>
Date: 2008-02-18 18:14:12

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?

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

From: Arjan van de Ven <hidden>
Date: 2008-02-18 18:34:53

On Mon, 18 Feb 2008 13:11:06 -0500
Valdis.Kletnieks@vt.edu wrote:
On Mon, 18 Feb 2008 14:27:10 GMT, David Howells said:
quoted
__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@linux.intel.com
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help