This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Lowering of VLA's
On Mon, 2003-08-25 at 13:18, Zdenek Dvorak wrote:
> Hello,
>
> > > This change does not yet make VLA's fully independent on enclosing BIND_EXPR,
> > > since there is the stack deallocation part that is still carried by
> > > BIND_EXPR; changes to make this explicit should follow.
> >
> > Hmm. I suppose that means introducing some concept of stack management
> > into tree-ssa?
>
> It should be enough to have magic statements STACK_SAVE and
> STACK_RESTORE (used like
>
> stack_temp = STACK_SAVE;
> ...
> STACK_RESTORE stack_temp;)
>
I hope we dont have to go teaching all the existing optimizations about
new tree codes...
do we really reclaim stack space coming out of a BIND_EXPR? Do we
allocate space with alloca? is there a dealloca()? I wasnt aware of it.
Or are these allocations done with malloc/free? If so, can't we simply
expose the calls to malloc/free at the begin/end of the BIND_EXPR and
not have to worry about any magic or new tree codes?
Andrew