[InstCombine] Add todos for possible atomicrmw transforms
authorPhilip Reames <listmail@philipreames.com>
Thu, 14 Feb 2019 20:48:36 +0000 (20:48 +0000)
committerPhilip Reames <listmail@philipreames.com>
Thu, 14 Feb 2019 20:48:36 +0000 (20:48 +0000)
llvm-svn: 354059

llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp

index b607c6d..37c4397 100644 (file)
@@ -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;