[llvm-commits] [llvm] r120974 - in /llvm/trunk: include/llvm/Analysis/AliasAnalysis.h lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/simple.ll
Chris Lattner
clattner at apple.com
Mon Dec 6 11:30:58 PST 2010
On Dec 6, 2010, at 9:36 AM, Duncan Sands wrote:
>> // memcpy is not defined if the source and destination pointers are exactly
>> // equal, but other compilers do this optimization, and almost every memcpy
>> // implementation handles this case safely. If there is a libc that does not
>> // safely handle this, we can add a target hook.
>>
>> Note that the example from the PR doesn't explicitly call memcpy.
>
> I've been told that on some platforms zeroing the target memory before doing the
> copy speeds it up due to cache effects. It looks like clang's implementation
> of struct copy will not work on such targets.
GCC also uses memcpy. If we find one of these theoretical platforms, clang can always generate memmove on it.
-Chris
More information about the llvm-commits
mailing list