[LLVMdev] Alloca Outside of Entry Block

Eli Friedman eli.friedman at gmail.com
Thu Aug 14 09:30:03 PDT 2008

On Thu, Aug 14, 2008 at 7:55 AM, John Criswell <criswell at uiuc.edu> wrote:
> Thanks everyone for the answers.  My original question was referring to
> the LLVM IR and not standard C.
> So, the consensus seems to be that it is legal, which makes sense since
> LLVM supports the C alloca function.

Yeah, legal, but the performance sucks because it codegens into a call
to the C library's alloca function.

It's probably worth documenting in LangRef because the difference in
the generated code is so striking.


More information about the llvm-dev mailing list