Eric,<br><div class="gmail_quote"><br>  Ok, thanks, looks like I'll need to figure something out. I was hoping scalarrepl would take care of this for me, but it's not lowering the structure (I haven't look at the opt code to see why, I"m sure there's some valid reason I'm unaware of atm).<div class="HOEnZb">
<div class="h5"><br>
<br><br><div class="gmail_quote">On Mon, Mar 5, 2012 at 12:35 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com" target="_blank">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'll need to do the work then. I'd also question why? On most platforms a decent memcpy exists.<br>
<span><font color="#888888"><br>
-eric<br>
</font></span><div><div><br>
On Mar 5, 2012, at 12:28 PM, Ryan Taylor <<a href="mailto:ryta1203@gmail.com" target="_blank">ryta1203@gmail.com</a>> wrote:<br>
<br>
> I would like it to always be lowered, I don't want it.<br>
><br>
> On Mon, Mar 5, 2012 at 12:27 PM, Eric Christopher <<a href="mailto:echristo@apple.com" target="_blank">echristo@apple.com</a>> wrote:<br>
> You don't have memcpy or want it to always lower it?<br>
><br>
> -eric<br>
><br>
> On Mar 5, 2012, at 11:56 AM, Ryan Taylor <<a href="mailto:ryta1203@gmail.com" target="_blank">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" target="_blank">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>
> > _______________________________________________<br>
> > LLVM Developers mailing list<br>
> > <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
</div></div></blockquote></div><br>
</div></div></div><br>