This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH,RFC] Do not assign stack slots to ssa names
On Fri, 12 Jun 2009, Richard Guenther wrote:
> It does make sense in that we currently put SSA names into the stack
> coalescing machinery (which this patch avoids to). Doing stack slot
> coalescing for SSA name variables causes us to generate aliases for them
> - which we do not expect and I believe cannot reasonably handle (at
> least definitely not with the alias machinery we currently have).
Ah right, _that_ was the problem. Okay then you simply have to not
generate aliases for these.
> Micha told me that we will actually never do any coalescing here anyway,
> so simply bypassing the machinery should not hurt.
That's what I thought until I've seen the stack protector also relying on
the coalescing machinery. Not for coalescing (because those vars aren't)
but for queuing everything to resort later.
And it actually matters. Not queuing means immediately expanding them to
stack slots, meaning top of stack. Queuing in the presence of
"interesting" other variables (strings, arrays) means expanding them after
those, i.e. bottom of stack.
I think this has to be preserved.
> Another approach would be to re-write variables that we cannot put in
> registers out-of-SSA again.
I would simply mark the SSAness in the queue of stackvars and not generate
the above aliases.