This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Reduce iterations of elimination bookkeeping


Jeff Law wrote:
Dave Korn wrote:

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
subsequent iterations).

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
that possibility.

(Hypothetical) If we were rewriting it from scratch, do you think it would
be possible to keep the whole set of layout constraints and dependencies in
some kind of representation in memory and just incrementally update everything
each time 'something changes' in both elimination bookkeeping and
caller-save-setup on the fly, and call each once and not iterate at all?


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.


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]