[llvm] r354059 - [InstCombine] Add todos for possible atomicrmw transforms

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 14 12:48:37 PST 2019


Author: reames
Date: Thu Feb 14 12:48:36 2019
New Revision: 354059

URL: http://llvm.org/viewvc/llvm-project?rev=354059&view=rev
Log:
[InstCombine] Add todos for possible atomicrmw transforms


Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp?rev=354059&r1=354058&r2=354059&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp Thu Feb 14 12:48:36 2019
@@ -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;
 




More information about the llvm-commits mailing list