This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: What to do with new-ra for GCC 4.0
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jvlists at ntlworld dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 4 Jan 05 11:09:55 EST
- Subject: Re: What to do with new-ra for GCC 4.0
Is there a discussion somewhere of what went wrong so any "new new-ra"
can learn form them? IIRC "new-ra" uses/used all the sexy modern ra
algorithms and even had the AFAIK unprecedented waiver of relevant
patents ...
Fundamentally, the issue is that the GCC "register allocator" does
more than just run an algorithm to allocate registers. It deals with
preferencing, multiple small register classes, and merging of various
pseudos under certain conditions. In other words, its operation is very
much tied into what other parts of the compiler produce for it and other
parts are tied into what it produces. So starting from scratch and using
just the "sexy modern ra algorithms" means that a lot of work has to go into
replicating all these others things the register allocator does.
This is not just hindsight: some people (including myself) raised this
issue before the project started. My feeling is that any further
attempt to modernize the register allocator should be done as a
modification to what's there that changes only the basic allocation
algorithm and leaves the rest of the infrastructure in place.