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) [another patch]


On Mon, Jan 22, 2001 at 02:17:31PM -0800, Richard Henderson wrote:
> On Sat, Jan 20, 2001 at 03:03:30AM -0400, Aldy Hernandez wrote:
> >  > I agree that that would be a good heuristic. Assume goto as not taken. 
> > 
> > Alright.  I did some playing around to predict gotos as not taken
> > (patch below).  It seems to work pretty good.
> 
> I don't necessarily agree that this is a good heuristic.  It assumes
> a rather rigid adherence to one programming style.  One that doesn't
> apply at all to machine generated code I might add.
> 
> Placed as this check is, we get no chance to make potentially better
> guesses based on the shape of the CFG or other tell-tales.  I wouldn't
> mind this test as one of several being combined, but on its own I'm
> dubious.

i'm been thinking about this and i would have to agree with this...

the few times when this might be useful is when we do not use any of the
other predictors.  stuff like this:

	if (foo > 0)
		goto blah;

this gets missed because we predict >= 0 to be true-- so in this case the
goto heuristic might win, but i'm guessing that that rarely happens.

i'm still kinda wanting to get better benchmarking software so i can try
a few other heuristics.

aldy

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