This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: disabling branch probability guessing (patch)



> > 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]