This is the mail archive of the
mailing list for the GCC project.
Re: RFA: Reduce iterations of elimination bookkeeping
Jeff Law wrote:
Dave Korn wrote:
I am agree with Jeff. I don't see now a better non-iteration solution
for architectures with small available displacements like mcore (or even
x86) where small change in displacement might have significant effect on
code size (and insns number for some architectures) and as a consequence
on code performance.
Ian and I had a long discussion about this, but I was unable to see
how Ian's suggestions for a non-iterating elimination solution would
work on certain processors we're supporting. The problem is changes
in elimination bookkeeping can drastically change the reloads needed
for some insns and as the reloads change, we can change offsets for
elimination bookkeeping. It really feels like a problem that is
going to need to iterate.
For future reference, the multiple stack alignments occur when we spill
a pseudo to memory after aligning the stack. The spill allocates a new
stack slot and forces the big loop to iterate. If on that next
iteration the stack isn't properly aligned, then we align it again (and
again and again if we continue to have to spill pseudos to memory on
Ideally, we'd align the stack once, after everything has been reloaded
and not iterate. The current structure of this code doesn't allow for
(Hypothetical) If we were rewriting it from scratch, do you think
be possible to keep the whole set of layout constraints and
some kind of representation in memory and just incrementally update
each time 'something changes' in both elimination bookkeeping and
caller-save-setup on the fly, and call each once and not iterate at all?