This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: disabling branch probability guessing (patch)
- To: Joe Buck <jbuck at racerx dot synopsys dot com>
- Subject: Re: disabling branch probability guessing (patch)
- From: Andi Kleen <ak at suse dot de>
- Date: Tue, 16 Jan 2001 19:40:26 +0100
- Cc: Andi Kleen <ak at suse dot de>, Aldy Hernandez <aldyh at redhat dot com>,gcc at gcc dot gnu dot org
- References: <ouphf2ziu9a.fsf@pigdrop.muc.suse.de> <200101161655.IAA08686@racerx.synopsys.com>
On Tue, Jan 16, 2001 at 08:55:36AM -0800, Joe Buck wrote:
> Andi Kleen writes:
> > Cool. This is useful for the linux kernel too. I found out that the
> > prediction guessing undoes some of the carefully crafted goto woods
> > to keep fast paths jumpless.
>
> I'm not sure that this is really the right solution. In all examples
> in which I've seen gotos used by good programmers, the goto is an
> exceptional condition and should be predicted not-taken. Can't we
> just flag branches originally entered as gotos?
I agree that that would be a good heuristic. Assume goto as not taken.
-Andi