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

Luqman Aden me+llvm at luqman.ca
Sun Oct 13 13:05:03 PDT 2013


On Sun, Oct 13, 2013 at 7:13 AM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Sat, Oct 12, 2013 at 12:23:31PM -0700, Luqman Aden wrote:
>> On Sat, Oct 12, 2013 at 5:26 AM, Joerg Sonnenberger
>> <joerg at britannica.bec.de> wrote:
>> > On Fri, Oct 11, 2013 at 06:17:35PM -0700, Luqman Aden wrote:
>> >> This disable emission of segmented-stack prologues on a per-function
>> >> basis, even if segmented stacks are turned on globally.
>> >
>> > This sounds quite wrong without any further comment. What ensurse that
>> > the function will find enough stack space for example?
>> >
>> > Joerg
>>
>> It's not supposed to guarantee any function tagged with it will have
>> enough stack space. In terms of use case (from #rust-internals on
>> Mozilla):
>>
>> acrichto> I've been using it a lot where we're managing the stack
>> limits ourselves
>> acrichto> so during a context switch I need no_split_stack
>> acrichto> also the starting function for a thread
>> acrichto> basically the edge cases around setting up the state of the
>> world for functions with __morestack
>
> I would expect either case to be implemented in assembler for natural
> reasons, so I don't really like this attribute in the current form.
>

We do actually currently have a branch wherein we do a lot of that with inline
assembly from rust and in that case we wouldn't want the _morestack stuff
to be emitted in the prologue.

_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list