[LLVMdev] nosegmentedstacks function attribute

Sanjoy Das sanjoy at playingwithpointers.com
Sun Jan 29 00:18:56 PST 2012


Hi all!

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.  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!
-- 
Sanjoy Das
http://playingwithpointers.com



More information about the llvm-dev mailing list