[LLVMdev] Question concerning alloca

Duncan Sands baldrick at free.fr
Tue Oct 7 23:29:56 PDT 2008


On Wednesday 08 October 2008 00:01:28 Jonathan S. Shapiro wrote:
> In alloca, is it required that NumElements be a literal integer, or can
> it be a computed result?

It can be a computed result.

> The real question is whether the current IR can support a one-stack
> implementation of Ada's dynamically sized stack frames.

The Ada front-end in llvm-gcc does make use of this but it also uses
a secondary stack in order to return function results for which the
size is not known at call time, eg for a function returning String.

Ciao,

Duncan.



More information about the llvm-dev mailing list