[PATCH] D21920: Fix for Bug 26903 adds support to inline __builtin_mempcpy

Sunita_Marathe via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 10:21:56 PDT 2016


Sunita_Marathe added a comment.

My motivation for following the implemented approach had been the possibility of there being some benefit to keeping the 2 functions distinct in the IR due to the difference in the return value of the two, e.g. keeping mempcpy distinct to make it inexpensively recognizable say by future optimizations of mempcpy patterns etc.

However every reviewer is of the opinion that the replacement of mempcpy could be done in the IR itself, which I agree is the preferred approach if the above motivation is a weak one.

The change presumably will belong in the same module which replaces a memcpy() / _builtin_memcpy() by llvm.memcpy().  This appears to be done by the frontend since it is present in the incoming IR.

Can you please confirm that that is the decision, and I will look into making the change.

Many thanks for all the useful comments.
Sunita


http://reviews.llvm.org/D21920





More information about the llvm-commits mailing list