Related articles |
---|
[3 earlier articles] |
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) |
From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | 18 Oct 2000 23:55:32 -0400 |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 00-10-078 00-10-092 00-10-106 |
Keywords: | architecture |
zs@ender.cs.mu.oz.au (Zoltan Somogyi) writes:
>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 :-)
That's simple: just put a copy of the basic block there. Of course,
after applying this a few times, you might want to introduce a jump to
the original copy; but with n copies you have converted n-1
conditional branches to fall-through branches. Of course, if you look
at the I-Cache working set size (as Eric Corry mentioned), this code
replication is not helpful in this case.
- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
Return to the
comp.compilers page.
Search the
comp.compilers archives again.