Re: Register allocation

anton@mips.complang.tuwien.ac.at (Anton Ertl)
10 Aug 2004 17:30:13 -0400

          From comp.compilers

Related articles
[9 earlier articles]
Re: Register allocation rajaram@acmet.com (Rajaram) (2004-08-04)
Re: Register allocation kamalp@acm.org (2004-08-05)
Re: Register allocation kym@sdf.lonestar.org (russell kym horsell) (2004-08-09)
Re: Register allocation kamalp@acm.org (2004-08-09)
Re: Register allocation gopi@sankhya.com (2004-08-10)
Re: Register allocation anton@mips.complang.tuwien.ac.at (2004-08-10)
Re: Register allocation anton@mips.complang.tuwien.ac.at (2004-08-10)
Re: Register allocation kym@kymhorsell.com (2004-08-11)
Re: Register allocation kamalp@acm.org (2004-08-13)
Register allocation thibault.langlois@di.fc.ul.pt (thibault.langlois@di.fc.ul.pt) (2005-05-13)
Re: Register allocation rgd00@doc.ic.ac.uk (Rob Dimond) (2005-05-16)
Re: Register allocation torbenm@diku.dk (2005-05-18)
Re: Register allocation thibault.langlois@di.fc.ul.pt (thibault.langlois@di.fc.ul.pt) (2005-05-20)
[13 later articles]
| List of all articles for this month |

From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers
Date: 10 Aug 2004 17:30:13 -0400
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 04-07-044 04-07-074 04-08-022 04-08-041
Keywords: registers, code
Posted-Date: 10 Aug 2004 17:30:13 EDT

russell kym horsell <kym@sdf.lonestar.org> writes:
>Kamal R. Prasad <kamalp@acm.org> wrote:
>[...]
>> The overhead is 1-load and 1-store, but the overhead isn't as high as
>> you would expect, thanks to a hierarchy of caches to speed things up.
>> No doubt the speed with which a register can be accessed is much
>[...]
>
>Measure it, and you'll get a shock. On 5 yo architecture there seems
>to be virtually no diff between memory access and registers for common
>stuff.


It depends very much on the microarchitecture. On most of them
register allocation pays off very well. For some older results of a
micro-benchmark see
http://www.google.at/groups?q=g:thl2855960747d&dq=&hl=nl&lr=&ie=UTF-8&selm=8j7hp4%242e7%241%40news.tuwien.ac.at


For some more recent results for an application, see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8092>6


Executive summary of the latter: For one application (Gforth), using
explicit register allocation in addition to the gcc -O2 register
allocator gives speedups by a factor of 2-5 on an Athlon 1200 (and
similar on a Pentium III) and does not have a big effect on the
Pentium 4.


- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/home.html


Post a followup to this message

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