[PATCH] Add a "no-split-stack" function attribute.
Joerg Sonnenberger
joerg at britannica.bec.de
Wed Oct 16 04:07:19 PDT 2013
On Tue, Oct 15, 2013 at 11:10:35PM -0400, Rafael EspĂndola wrote:
> On 15 October 2013 17:05, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> > On Mon, Oct 14, 2013 at 11:40:02PM -0700, Luqman Aden wrote:
> >> Also, gcc supports a no_split_stack attribute in its split stack implementation.
> >
> > Because GCC does something is not necessarily a good justification.
> > Let me extend my original comment. An attribute that says "ensure
> > stack space" is much more useful for two reasons:
> >
> > (1) It is a safe contract. The called function will not just fail
> > because the caller used all but a few bytes on the stack.
> >
> > (2) It can be used for optimisation. A call graph pass could propogate
> > size requirements along the edges of the graph to avoid the overhead
> > and associated issues with split stack.
>
> In summary, your proposal is to replace the EnableSegmentedStacks
> codegen option with a split_stack attribute?
No, extend it with a RequiredStackSize(size) attribute.
Joerg
More information about the llvm-commits
mailing list