This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 stack slot optimisation
> I see what I missed the first time. Without optimization, we have stack
> locals, which get allocated early. With optimization, we have
> pseudo-regs which get spilled to the stack, which get allocated late.
> So you are right, it is FRAME_GROWS_DOWNWARD that caused the behaviour
> you saw.
>
> However, I would not call this an optimization. This is just how the
> toolchain accidentally happens to work.
Without this emergent behaviour, stack slot assignment optimisation
would have been much more important.
--
Øyvind Harboe
http://www.zylin.com