[LLVMdev] RFC Patchset: Segmented stacks

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Thu Apr 21 12:42:27 PDT 2011

On 11-04-19 2:24 PM, Sanjoy Das wrote:
> Hi all!
> Attached a three part series which implements the very first bits of my
> GSoC proposal (full proposal is here http://pastebin.com/e9JMZNCE), for
> some preliminary review.


Just some quick comments:

In the Interoperability section it looks like you want to implement 
something that is compatible with gcc. This is a great thing to have, 
but it might be possible to implement something that is not linker 
dependent if you wish to.

Instead of having split stacks be a per compilation unit thing, it can 
be a characteristic of each function (using a new calling convention for 
example). The compiler option then becomes "mark all functions in this 
compilation unit as split stacks").

A function that calls functions without this mark will get a large stack 
block in the prologue. When doing LTO regular functions can be optimized 
to split stacks.

This might also be handy for handling "hard" (vargs, dynamic stack 
allocation) functions: just don't mark them.

Again, just some toughs. Looks great as is too!


More information about the llvm-dev mailing list