This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PRE in gcse.c
- To: law at cygnus dot com
- Subject: Re: PRE in gcse.c
- From: "David S. Miller" <davem at dm dot cobaltmicro dot com>
- Date: Tue, 10 Nov 1998 09:44:21 -0800
- 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
- References: <16825.910718227@hurl.cygnus.com>
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.
Later,
David S. Miller
davem@dm.cobaltmicro.com