|[4 earlier articles]|
|Re: Branch prediction hints in an ISA Kahrs.Juergen@stn-atlas.de (Juergen Kahrs) (2000-10-12)|
|Re: Branch prediction hints in an ISA email@example.com (Erik Corry) (2000-10-12)|
|Re: Branch prediction hints in an ISA firstname.lastname@example.org (2000-10-12)|
|Re: Branch prediction hints in an ISA email@example.com (2000-10-15)|
|Re: Branch prediction hints in an ISA firstname.lastname@example.org (David Thompson) (2000-10-18)|
|Re: Branch prediction hints in an ISA email@example.com (2000-10-18)|
|Re: Branch prediction hints in an ISA firstname.lastname@example.org (Dietrich Epp) (2000-10-19)|
|Re: Branch prediction hints in an ISA email@example.com (2000-10-19)|
|From:||Dietrich Epp <firstname.lastname@example.org>|
|Date:||19 Oct 2000 14:28:05 -0400|
|References:||00-10-078 00-10-092 00-10-106|
On 15 Oct 2000, Zoltan Somogyi wrote:
> Erik Corry <email@example.com> writes:
> >But according to the Alpha optimisation guide, if you know
> >which way a branch is likely to go it is almost always worth
> >moving the less taken branch to somewhere completely different.
> >This reduces the working set. If you move it to the end of
> >the function then it will be a forward branch, and so will be
> >predicted not taken.
> Absolutely; with most modern machines, one wants to minimize the
> number of taken branches, whether the branch is predicted or not.
> However, there are occasions where you cannot follow this piece of
> advice. One such sitation is where a basic block ends with a
> conditional branch to its own start; putting a basic block *after*
> itself is pretty tough :-) Therefore having a mechanism that tells the
> branch predictor that a branch should be predicted to be taken is
> still useful.
For the PowerPC chip, branch instructions include a bit which tells
the processor which way to predict the branch. To make a long story
short, correctly predicted branches incur a performance hit so small
it usually doesn't affect thoroughput. This way the compiler (or
assembly programmer) can use their ingenuity to determine the correct
Return to the
Search the comp.compilers archives again.