[PATCH] Add a "no-split-stack" function attribute.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Oct 15 20:10:35 PDT 2013


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?

Cheers,
Rafael



More information about the llvm-commits mailing list