I would like it to always be lowered, I don't want it.<br><br><div class="gmail_quote">On Mon, Mar 5, 2012 at 12:27 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com">echristo@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You don't have memcpy or want it to always lower it?<br>
<br>
-eric<br>
<div><div class="h5"><br>
On Mar 5, 2012, at 11:56 AM, Ryan Taylor <<a href="mailto:ryta1203@gmail.com">ryta1203@gmail.com</a>> wrote:<br>
<br>
> Christoph,<br>
><br>
>  Yes, you are correct on the lifetime calls, they are just markers for liveness.<br>
><br>
> However, the backend is not optimizing these calls away. I could try to deal with them outside of llvm but I was hoping for a cleaner solution using llvm?<br>
><br>
> On Mon, Mar 5, 2012 at 11:51 AM, Christoph Erhardt <<a href="mailto:christoph@sicherha.de">christoph@sicherha.de</a>> wrote:<br>
> Hi Ryan,<br>
><br>
> the compiler is free to insert implicit calls to memcpy(), for instance<br>
> for assignments from one struct/class variable to another. The same goes<br>
> for memset(), which may be inserted implicitly for the initialization of<br>
> local structs or arrays.<br>
><br>
> The good news is that the backend normally optimizes these calls away<br>
> where possible, replacing them with simple moves - at least as long as<br>
> the number of bytes to copy does not exceed a certain threshold.<br>
><br>
> As for the llvm.lifetime intrinsics, take a look at the documentation:<br>
> <a href="http://llvm.org/docs/LangRef.html#int_memorymarkers" target="_blank">http://llvm.org/docs/LangRef.html#int_memorymarkers</a><br>
> If I'm not mistaken, these calls seem to be used to mark the lifespan of<br>
> a stack-allocated object.<br>
><br>
> Regards,<br>
> Christoph<br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
</blockquote></div><br>