[LLVMdev] RFC: GSoC Project
joerg at britannica.bec.de
Mon Apr 11 02:54:24 PDT 2011
On Mon, Apr 11, 2011 at 07:57:08AM +0200, Joachim Durchholz wrote:
> (Sorry for replying to the wrong post, but the original one had gone out
> of scope when this occurred to me.)
> > On Wed, Mar 23, 2011 at 3:07 AM, Sanjoy Das
> > <sanjoy at playingwithpointers.com>wrote:
> >> In the prologue, a function will check whether the current block has
> >> enough stack space. This is easily done for function which don't have
> >> variable sized allocas, and for ones which do, we can assume some
> >> worst-case upper bound.
> What would you do if a function allocas in a loop? The programmer would
> know that the loop won't execute, say, more than twice, but your code
> doesn't unless you're lucky.
It doesn't have to. It is perfectly fine to allocate another stack
segment after the handling of fixed slots is done. All other entries on
the stack are addressed by pointer anyway. They don't care about being
in one stack segment relative to the frame pointer.
More information about the llvm-dev