[LLVMdev] nosegmentedstacks function attribute

Duncan Sands baldrick at free.fr
Sat Feb 4 00:57:29 PST 2012


Hi Sanjoy,

> Now that LLVM has support for a larger attribute set, I think it is a
> good idea to add one that stops LLVM from generating segmented stacked
> version of a function.

why?  If some functions have segmented stacks, don't all functions called
by it need segmented stacks too?

Ciao, Duncan.

   While implementing it, I ran into an issue:
>
> Currently, with segmented stacks enabled, LLVM sets the action for
> DYNAMIC_STACKALLOC to Custom, and lowers it into native X86 code.
> However, if a function has the nosegmentedstack attribute,
> DYNAMIC_STACKALLOC will need to be expanded.  Is there some idiomatic
> way to choose whether a pseudo op is to be lowered or expanded based
> on some function attribute?
>
> Thanks!




More information about the llvm-dev mailing list