This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PRE in gcse.c
- To: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Subject: Re: PRE in gcse.c
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 10 Nov 1998 10:17:07 -0700
- cc: egcs at tantalophile dot demon dot co dot uk, ak at muc dot de, dje at watson dot ibm dot com, alla at lysator dot liu dot se, egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199811101713.JAA10139@dm.cobaltmicro.com>you write:
> Date: Tue, 10 Nov 1998 08:23:15 +0000
> From: Jamie Lokier <egcs@tantalophile.demon.co.uk>
>
> On Mon, Nov 09, 1998 at 04:08:05PM +0100, Andi Kleen wrote:
> > Program flow optimization: use profile feedback/__builtin_expect to
> > generate code that doesn't jump at all for the fast path and moves all
>
> > infrequently called code out of line.
>
> Oh, __builtin_expect, I like the sound of that. Would that be
> __builtin_expect(expr) asserting that expr is expected to be non-zero?
>
> Meissner had patches to implement __builtin_expect(), I don't believe
> they ever slipped in last time he posted them (this was in the gcc2
> days). It would be nice to re-review them now and see if we can get
> them into the egcs tree now.
Interestingly enough ulrich cleaned them up and submitted them (probably to
me directly) recently. I haven't had a time to look at them.
I don't think __builtin_expect itself is all that useful -- what is more
useful is the mechanisms to take unlikely code and pull it away from the main
code for a function.
jeff