Adds support for variable sized allocas. For a variable sized alloca,
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 30 Aug 2011 19:47:04 +0000 (19:47 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 30 Aug 2011 19:47:04 +0000 (19:47 +0000)
commit151ab3e2f7b69d2b46fdc25cbad9d43f4a827ef1
treeab357b1dc231d0d28ae96d8fdf31f5def9d7dad7
parentd07b7ec77203d4dbaf426786912a700cc07f0142
Adds support for variable sized allocas. For a variable sized alloca,
code is inserted to first check if the current stacklet has enough
space. If so, space is allocated by simply decrementing the stack
pointer. Otherwise a runtime routine (__morestack_allocate_stack_space
in libgcc) is called which allocates the required memory from the
heap.

Patch by Sanjoy Das.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138818 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h