increase call_saved_regs[] in caller-save.c

Michael Matz matz@suse.de
Mon Jan 9 12:43:00 GMT 2012


Hi,

On Sat, 7 Jan 2012, Peter Bergner wrote:

> While digging through ira-color.c tracking down an IRA shuffle copy 
> issue, I noticed we only seem to do real copy coalescing for spilled 
> pseudos. It seems we rely on coloring to try and assign the same hard 
> reg to pseudos connected by a copy so the copy can be removed as a nop. 
> Looking at all the code used to do the cost preferencing to achieve 
> that, I'm guessing just coalescing them would be a lot easier.

The complexity starts when you want to retroactively decide that a 
coalesce was not that worthwhile or even harmful.  Copies sometimes are 
nice live-range split points (and sometimes not), so some copies you want 
to coalesce, others you don't want to.  Deciding which ones to coalesce 
influences the others, spilling influences it too, and finally coloring 
decisions itself influence the optimality of coalescing retroactively.  
Past approaches to this included a host of things including the iterated 
approach, the coalesce-split approach and the like.

When I still fiddled with all this in new-ra I found it most natural to 
just do coalescing while coloring (i.e. try to give same colors to 
copy-connected neighbors), including taking care not to take away colors 
from nodes that would prefer to get colors from a copy-neighbor.  This way 
reverting a coalesce merely becomes a "oh well, so this color in the end 
wasn't really available", instead of an operation on the conflict/coalesce 
graph.

I assume that Vlad does similar.


Ciao,
Michael.



More information about the Gcc-patches mailing list