[PATCH] D47634: [MemCpyOpt] Update pass to also optimize the atomic memory intrinsics (WIP - NOT FOR REVIEW)
Daniel Neilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 1 07:03:49 PDT 2018
dneilson created this revision.
Herald added a subscriber: llvm-commits.
This change updates parts of the memcpyopt pass to also perform optimizations on the atomic
memcpy & memset intrinsics.
Specifically, we update:
processMemMove - This will change memmoves into memcpys if aliasing allows.
processMemCpy - Basically exposes opportunities for DSE by changing the source of a memcpy
if the source was just memcpy/memset into.
Parts of the pass that still need to be updated:
processMemSet - Merging consecutive memsets/stores into a single memset
processStore - Merging consecutive load/store pairs into memcpys.
Some care will have to be taken with processMemSet and processStore to ensure
that we don't break the expectations of unordered atomic operations (ex: no merging
an unordered store into a regular memset, etc).
Repository:
rL LLVM
https://reviews.llvm.org/D47634
Files:
include/llvm/Transforms/Scalar/MemCpyOptimizer.h
lib/Transforms/Scalar/MemCpyOptimizer.cpp
test/Transforms/MemCpyOpt/atomic-memcpy.ll
test/Transforms/MemCpyOpt/memcpy-to-memset.ll
test/Transforms/MemCpyOpt/memmove.ll
test/Transforms/MemCpyOpt/memset-atomicmemcpy-to-2x-memset.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47634.149459.patch
Type: text/x-patch
Size: 28550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180601/57d56578/attachment.bin>
More information about the llvm-commits
mailing list