diff options
author | Philip Reames <listmail@philipreames.com> | 2019-02-14 20:48:36 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2019-02-14 20:48:36 +0000 |
commit | db57ef62382cfe50d7bd4d038aa54e3a98abae1d (patch) | |
tree | 82003e4e2a5ed3e997df37d1cd4f2b1fa033d26d /llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp | |
parent | 485474208e11ecbf2a589d9e4156e78a88257bfa (diff) | |
download | bcm5719-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.cpp | 6 |
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; |