<div dir="ltr">Even with -ffreestanding LLVM generates memcpy/memset? Does this mean some passes do not honor this flag? If you really wanted to prevent libcalls, you could technically translate those memcpy/memset to loops in lowering.<div>Kevin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 15, 2016 at 4:10 PM, Wolfgang McSneed via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mehdi and Joerg,<div><br></div><div>Thanks for your fast response! attached is the matrix_float.c file.</div><div><br>Also - I should point out that I am using MIPS ISS.</div><div><br></div><div>Thanks,</div><div><br>Wolf</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-7918414107113448729gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Kind Regards,<div><br>Wolf</div></div></div></div><div><div class="h5">
<br><div class="gmail_quote">On Sat, Oct 15, 2016 at 6:07 PM, Joerg Sonnenberger via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Sat, Oct 15, 2016 at 04:01:36PM -0700, Mehdi Amini via llvm-dev wrote:<br>
><br>
> > On Oct 15, 2016, at 3:56 PM, Wolfgang McSneed via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > I am hoping that someone can help me figure out how to prevent the insertion of "memcpy" from the assembly source.<br>
> ><br>
> > My target is an instruction set simulator that doesn't support this.<br>
> ><br>
> > Thank you for your valuable time.<br>
> ><br>
> > Wolf<br>
> ><br>
> > Here are my compile commands:<br>
> > $ clang -emit-llvm -fno-builtin -o3 --target=mips -S matrix_float.c -o vl_matrix_float.ll<br>
><br>
> Technically  -fno-bultin prevents the compiler from understand the<br>
> memset in the original code. The right option to prevent the compiler<br>
> from insert libc calls “out-of-the-blue” is -ffreestanding.<br>
<br>
</span>Huh? The -fno-builtin is not the problem. The compiler is *expected* to<br>
call certain functions even for -ffreestanding. memcpy and memset are<br>
two of those. It is certainly perfectly valid target lowering for<br>
llvm.memcpy to be turned back into a libcall.<br>
<span class="m_-7918414107113448729HOEnZb"><font color="#888888"><br>
Joerg<br>
</font></span><div class="m_-7918414107113448729HOEnZb"><div class="m_-7918414107113448729h5">______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>