This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Indirect memory addresses vs. lra
On Thu, Aug 15, 2019 at 02:30:19PM -0400, Vladimir Makarov wrote:
> >Couldn't we spill the frame pointer? Basically we should be able to
> >compute the first address into a reg, spill that, do the second (both
> >could require the frame pointer), spill the frame pointer, reload the
> >first computed address from the stack, execute the insn and then reload
> >the frame pointer.
> >
> >Maybe the frame pointer can also be implemented 'virually' in an index
> >register that you keep updated so that sp + reg
> >Is the FP. Or frame accesses can use a
> >Stack slot as FP and the indirect memory
> >Addressing... (is there an indirect lea?)
> >
> Yes, it could be a solution. It just needs some target maintainer
> creativity. There are a lot of things (tricks) can be done in
> machine-dependent code which would not require RA changes.
You can even go as far as not having the hard frame pointer be a machine
register at all. In RTL it will still be a reg, but that doesn't mean
the machine code you emit should be like that; you can use a special
fixed memory location for it, for example.
Segher