[PATCH] D27133: Introduce element-wise atomic memcpy and memmove intrinsics
Igor Laevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 07:59:40 PST 2016
igor-laevsky created this revision.
igor-laevsky added reviewers: joerg, mcrosier, haicheng, majnemer, pete.
igor-laevsky added a subscriber: llvm-commits.
LLVM can do various optimizations around standard library memcpy and memmove
intrinsics. In particular we have LoopIdionRecognize and MemCpyOptimizer passes
which do a bunch of interesting transformations.
Some languages require from all of their memory accesses to be unordered
atomics (like Java for example). Which means that we can't directly use above
mentioned passes when compiling for such language.
This change is a step towards supporting this optimizations for languages with
atomicity constraints. It adds special versions of the memcpy and memmove intrinsics
which are specified to have predictable set of atomic memory accesses. They are
lowered to call to the library functions and it's target responsibility to
implement them.
Following changes will be able to extend LoopIdionRecognize and other passes
to support newly added intrinsics.
https://reviews.llvm.org/D27133
Files:
docs/LangRef.rst
include/llvm/CodeGen/RuntimeLibcalls.h
include/llvm/IR/Intrinsics.td
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/IR/Verifier.cpp
test/CodeGen/X86/element-wise-atomic-memory-intrinsics.ll
test/Verifier/element-wise-atomic-memory-intrinsics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27133.79305.patch
Type: text/x-patch
Size: 15141 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161125/8dbd1b5f/attachment.bin>
More information about the llvm-commits
mailing list