[LLVMdev] stack usage and scoping

Nick Lewycky nicholas at mxc.ca
Sat Dec 12 00:55:12 PST 2009

Scott Shumaker wrote:
> Ahh, this states the problem precisely.  Does anyone know if there is
> active development in this direction?  I'd love to be able to use
> llvm.lifetime.start() / end().

Yes, I recently added lifetime.start and friends: 

However, PR3361 isn't solved. The code generators don't take advantage 
of that information yet. If you're producing llvm ir, feel free to 
create them- we'll get around to the optimizations that use them eventually.


> Scott
> On Fri, Dec 11, 2009 at 12:12 PM, Anton Korobeynikov
> <anton at korobeynikov.info>  wrote:
>> Hello, Scott
>>> I've just started using LLVM for a project I'm working on, and the
>>> docs seem to encourage the use of alloca, with the expectation that
>>> various optimization passes will optimize away unnecessary stack
>>> pressure.  However, I can't seem to figure out how LLVM can properly
>>> re-use stack space, since it doesn't know the extend of a stack
>>> variable.
>> This is http://llvm.org/bugs/show_bug.cgi?id=3361
>> --
>> With best regards, Anton Korobeynikov
>> Faculty of Mathematics and Mechanics, Saint Petersburg State University

More information about the llvm-dev mailing list