[llvm-dev] How to remove memcpy (original) (raw)
Wolfgang McSneed via llvm-dev llvm-dev at lists.llvm.org
Sat Oct 15 16:10:05 PDT 2016
- Previous message: [llvm-dev] How to remove memcpy
- Next message: [llvm-dev] How to remove memcpy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Mehdi and Joerg,
Thanks for your fast response! attached is the matrix_float.c file.
Also - I should point out that I am using MIPS ISS.
Thanks,
Wolf
Kind Regards,
Wolf
On Sat, Oct 15, 2016 at 6:07 PM, Joerg Sonnenberger via llvm-dev < llvm-dev at lists.llvm.org> wrote:
On Sat, Oct 15, 2016 at 04:01:36PM -0700, Mehdi Amini via llvm-dev wrote: > > > On Oct 15, 2016, at 3:56 PM, Wolfgang McSneed via llvm-dev <_ _llvm-dev at lists.llvm.org> wrote: > > > > Hi, > > > > I am hoping that someone can help me figure out how to prevent the insertion of "memcpy" from the assembly source. > > > > My target is an instruction set simulator that doesn't support this. > > > > Thank you for your valuable time. > > > > Wolf > > > > Here are my compile commands: > > $ clang -emit-llvm -fno-builtin -o3 --target=mips -S matrixfloat.c -o vlmatrixfloat.ll > > Technically -fno-bultin prevents the compiler from understand the > memset in the original code. The right option to prevent the compiler > from insert libc calls “out-of-the-blue” is -ffreestanding.
Huh? The -fno-builtin is not the problem. The compiler is expected to call certain functions even for -ffreestanding. memcpy and memset are two of those. It is certainly perfectly valid target lowering for llvm.memcpy to be turned back into a libcall. Joerg
LLVM Developers mailing list llvm-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161015/0cf2eccc/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: matrix_float.c Type: text/x-csrc Size: 2706 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161015/0cf2eccc/attachment.c>
- Previous message: [llvm-dev] How to remove memcpy
- Next message: [llvm-dev] How to remove memcpy
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]