<br><div class="gmail_quote">Owen,<br><br>  Clang doesn't accept this as an option; however, it did accept -fno-builtin (the more general for all usage) and this has seemed to work. Thank you.<br><br>  My other question would then be how to lower vector instructions, such as extractelement, insertelement and shufflevector. These should be solved by ld/st/address calculation, correct? This is somewhat of the same problem it seems to me, or not?<br>

<br><div class="gmail_quote"><div class="im">On Mon, Mar 5, 2012 at 1:44 PM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br></div><div><div class="h5">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does -fno-builtin[-memcpy] handle this?<br>
<span><font color="#888888"><br>
--Owen<br>
</font></span><div><div><br>
On Mar 5, 2012, at 12:35 PM, Eric Christopher wrote:<br>
<br>
> You'll need to do the work then. I'd also question why? On most platforms a decent memcpy exists.<br>
><br>
> -eric<br>
><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>
> _______________________________________________<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></div></div><br>
</div><br>