This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [cft] fix 24160
I'm still running tests on your patch.
Richard Henderson wrote:
The special case I'm concerned about is where a PLUS is allowed
in the slot of any general/register operand (where it is not
simply an address operand or the address inside a memory operand).
We can certainly experiment with removing the code for 4.2...
Exactly what piece of code are you considering to remove? If you consider
the removal of PLUS function invariants, I'll expect that to lead to major
performance regressions.
IIRC the memory address RHS case was actually the main problem that
the code addreses - cse and/or loop hoist out tons of frame+offset sums,
which can't all be allocated to hard registers and thus get spilled to
the stack.
So instead of calculating a simple frame+offset sum, we calculated a more
complicated (larger offset) frame+offset sum to fetch a stack slot value
that
contains the wanted frame+offset sum.
Putting these function invariants into reg_equiv_constant allowed us to
basically re-materialize the sums.