[LLVMdev] llvm.lifetime.start; what does it do exactly?

Dmitry N. Mikushin maemarcus at gmail.com
Fri Jul 13 09:17:22 PDT 2012


Dear Ryan,

I think the lifetime works more like a hint for certain optimizations. For
example, if inliner pass sees two variables with non-untersecting
lifetimes, it may decide to make them to share the same chunk of stack
space (alloca). So, it would not be any error, if you completely ignore it.

- D.

2012/7/13 ryan baird <ryanrbaird at gmail.com>

> Esentially, I'm working on a translator someone started building for
> llvm2.9 that translates an optimized .lln file to another intermediate
> language, and I'm porting it to 3.1.
>
> There is a new intrinsic that pops up in our test cases' lln files that
> never used to, llvm.lifetime.start.  I looked up the description: "The
> 'llvm.lifetime.start' intrinsic specifies the start of a memory object's
> lifetime."  However, it's still not clear to me what exactly i should do;
>  should this actually be translated to anything (like a call to malloc or
> something), or is it just used to keep information about the memory object?
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120713/13701468/attachment.html>


More information about the llvm-dev mailing list