Re: Branch prediction hints in an ISA

Erik Corry <erik@arbat.com>
12 Oct 2000 22:23:29 -0400

          From comp.compilers

Related articles
Branch prediction hints in an ISA timgleason@my-deja.com (2000-10-10)
Re: Branch prediction hints in an ISA broeker@physik.rwth-aachen.de (Hans-Bernhard Broeker) (2000-10-12)
Re: Branch prediction hints in an ISA peter_flass@my-deja.com (2000-10-12)
Re: Branch prediction hints in an ISA djimenez@cs.utexas.edu (2000-10-12)
Re: Branch prediction hints in an ISA Kahrs.Juergen@stn-atlas.de (Juergen Kahrs) (2000-10-12)
Re: Branch prediction hints in an ISA erik@arbat.com (Erik Corry) (2000-10-12)
Re: Branch prediction hints in an ISA vbdis@aol.com (2000-10-12)
Re: Branch prediction hints in an ISA zs@ender.cs.mu.oz.au (2000-10-15)
Re: Branch prediction hints in an ISA david.thompson1@worldnet.att.net (David Thompson) (2000-10-18)
Re: Branch prediction hints in an ISA anton@mips.complang.tuwien.ac.at (2000-10-18)
Re: Branch prediction hints in an ISA dietrich@216.26.55.26 (Dietrich Epp) (2000-10-19)
Re: Branch prediction hints in an ISA torbenm@diku.dk (2000-10-19)
| List of all articles for this month |
From: Erik Corry <erik@arbat.com>
Newsgroups: comp.compilers
Date: 12 Oct 2000 22:23:29 -0400
Organization: University of Aarhus, Department of Computer Science (DAIMI)
References: 00-10-078
Keywords: architecture

timgleason@my-deja.com wrote:
> Hey I was just thinking. Does anyone know of any Instruction Sets
> that have an extra bit in the branch instruction to be used as a
> "hint" for the branch prediction logic?


Some do. Most will predict a forward branch as not taken and a
backward branch as taken if they don't have any branch prediction
information. IA64 has a rather more complex scheme (no surprise!).


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.


--
Erik Corry erik@arbat.com Ceterum censeo, Microsoftem esse delendam!
    Interviewer: "Real programmers use cat as their editor."
    Bill Joy: "That's right! There you go! It is too much trouble to say ed,
                                  because cat's smaller and only needs two pages of memory."


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.