summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-02-14 20:48:36 +0000
committerPhilip Reames <listmail@philipreames.com>2019-02-14 20:48:36 +0000
commitdb57ef62382cfe50d7bd4d038aa54e3a98abae1d (patch)
tree82003e4e2a5ed3e997df37d1cd4f2b1fa033d26d /llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
parent485474208e11ecbf2a589d9e4156e78a88257bfa (diff)
downloadbcm5719-llvm-db57ef62382cfe50d7bd4d038aa54e3a98abae1d.tar.gz
bcm5719-llvm-db57ef62382cfe50d7bd4d038aa54e3a98abae1d.zip
[InstCombine] Add todos for possible atomicrmw transforms
llvm-svn: 354059
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
index b607c6dd608..37c43977d90 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
@@ -51,6 +51,12 @@ bool isIdempotentRMW(AtomicRMWInst& RMWI) {
Instruction *InstCombiner::visitAtomicRMWInst(AtomicRMWInst &RMWI) {
+ // TODO: Any atomicrmw op which produces a known result in memory can be
+ // replaced w/an atomicrmw xchg. (see getBinOpAbsorber)
+
+ // TODO: Any atomicrmw xchg with no uses can be converted to a atomic store
+ // if the ordering is compatible.
+
if (!isIdempotentRMW(RMWI))
return nullptr;
OpenPOWER on IntegriCloud