Re: Gforth and gcc "progress"
- From: Bernd Paysan <bernd.paysan@xxxxxx>
- Date: Fri, 29 Jun 2007 16:57:58 +0200
Anton Ertl wrote:
Andrew Haley <andrew29@xxxxxxxxxxxxxxxxxxxxxxx> writes:
Bernd Paysan <bernd.paysan@xxxxxx> wrote:
There are a number of complications with this sort of split lifetime
register allocators, especially since debuggers have problems to
localize values when they change their position during the program
flow. One interim solution is to disable this sort of optimization
when debugging.
With the move to static single assignment form (aka SSA), gcc
effectively does this anyway.
I don't think so (even if the coalescing back does not happen).
I think the argument is different: The main roadblock for using a split
lifetime register allocator, when I last proposed one (must be 10 years
ago) was that gdb has problems with that. Now since GCC may have "walking"
variables, anyway (through the SSA optimizations), the roadblock of not
being able to debug this stuff is already gone. So it's possible to replace
GCC's current allocator with such an allocator without giving up debugging.
I don't know how important the coalescing is, because stack frame packing is
also better achieved by treating the stack frame as (hypothetically
infinitely large) register file. The algorithm should free "dead" slots
(like in a register file), and try to put new values into the slots with
the smallest offset (smallest, because that way the "hot" stuff gets in as
few cache lines as possible, and on variable length architectures like x86,
8 bit offsets give better code size). The same thing is also useful for
register files in some architectures which have a save-multiple-register
instruction (like ARM), where caller-saved registers should live in
consecutive registers.
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://www.jwdt.com/~paysan/
.
- Follow-Ups:
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- References:
- Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- From: Bernd Paysan
- Re: Gforth and gcc "progress"
- From: Andrew Haley
- Re: Gforth and gcc "progress"
- From: Anton Ertl
- Gforth and gcc "progress"
- Prev by Date: Re: Gforth and gcc "progress"
- Next by Date: Re: Gforth and gcc "progress"
- Previous by thread: Re: Gforth and gcc "progress"
- Next by thread: Re: Gforth and gcc "progress"
- Index(es):
Relevant Pages
|