[LLVMdev] Code Generation and Alloca

John Criswell criswell at cs.uiuc.edu
Fri Aug 15 08:40:44 PDT 2008


Dear All,

I have a question regarding code generation and alloca.

How important is it to keep allocas in a function's entry block 
consecutive?  Having consecutive allocas probably makes code generation 
more efficient because the code generator can coalesce them into a 
single add/subtract of the stack pointer on function entry.  Can the 
code generators now coalesce allocas even if they are not consecutive 
within the basic block, or is it still a good idea to keep allocas 
consecutive when doing transforms?

-- John T.




More information about the llvm-dev mailing list