disabling branch probability guessing (patch)

Joe Buck jbuck@racerx.synopsys.com
Tue Jan 16 08:57:00 GMT 2001


> > Here is a patch that adds an option to disable guessing of branch
> > probabilities (-fno-guess-branch-probability).

Ouch.  The user has to enter a flag to get the right thing.

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?



More information about the Gcc mailing list