This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: tree-ssa-sink breaks stack layout
On Fri, Apr 3, 2009 at 5:24 PM, Ian Lance Taylor <iant@google.com> wrote:
> Richard Guenther <richard.guenther@gmail.com> writes:
>
>> Another possibility would be to delay stack slot allocation until after all
>> RTL code motion is finished at which point the lifetimes of all stack-locals
>> is fixed (which it in practice is not at expansion time).
>
> I like this idea. ?There is no fundamental reason that we have to assign
> specific stack offsets at expansion time. ?We don't need specific stack
> offsets until reload.
>
> I'm not sure how to implement it, though.
We could use separate pseudos for each variable on the stack
instead of one virtual-stack-vars pseudo. A stack allocation
pass then would perform life analysis on these pseudos and
transform them to the one-and-only virtual-stack-vars reg.
No idea if that would (easily) work out, of course. Some targets
may have different costs and thus optimization decision based
on the offset size used with virtual-stack-vars.
Richard.
> Ian
>