This is the mail archive of the
mailing list for the GCC project.
Re: Avoid random block reorderings
- To: Geoff Keating <geoffk at cygnus dot com>
- Subject: Re: Avoid random block reorderings
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 04 May 2000 19:06:55 -0600
- cc: gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <email@example.com>you write:
> Jeffrey A Law <firstname.lastname@example.org> writes:
> > This patch avoids "random" block reorderings when none of the static bran
> > predictors apply by selecting the next physical block (if such a block ex
> > as the predicted successor.
> > * predict.c (estimate_probability): If no prediction was found, then
> > predict the successor that is the next physical block (if such a
> > successor exists).
> Please don't do this unless you believe it to be true;
> > + if (e->flags & EDGE_FALLTHRU)
> > + prob = 0;
> > + else
> > + prob = REG_BR_PROB_BASE;
> that is, that when no prediction is found, the branch will almost
> always fall through (more than 99.99% of the time).
> I don't believe that is true. I would believe 50.1%, but not 99.99%.
> Note that on sparc and powerpc and probably others (alpha?) this
> information is used for setting the static branch prediction bits,
> not just basic block reordering.
I wasn't aware of that. I'm going to back out my original patch and tweak the
reordering code itself to ignore 50-50 predictions once my bootstrap for
some other changes finishes.
Thanks to you and Richard for setting me straight.