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 11:58:51 -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 <199811101744.JAA10366@dm.cobaltmicro.com>you write:
> Date: Tue, 10 Nov 1998 10:17:07 -0700
> From: Jeffrey A Law <law@cygnus.com>
>
> 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.
>
> I think it is, at one point I experimented with them on some hot code
> paths in the TCP implementation of the Linux kernel just for the
> effect of setting the branch prediction bits correctly on UltraSparc.
> The performance gains were significant for benchmarks which exercised
> these code paths.
Actually, protocol stacks are the one place where I would consider this
kind of stuff useful :-)
jeff