[PATCH] D17474: MachineCopyPropagation: Keep scanning through instructions with regmasks

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 10:24:53 PST 2016


junbuml added inline comments.

================
Comment at: lib/CodeGen/MachineCopyPropagation.cpp:281-286
@@ +280,8 @@
+        if (RegMask->clobbersPhysReg(Reg)) {
+          const DestList &Defs = I->second;
+          for (unsigned MappedDef : Defs) {
+            // Source of copy is no longer available for propagation.
+            for (MCSubRegIterator SR(MappedDef, TRI, true); SR.isValid(); ++SR)
+              AvailCopyMap.erase(*SR);
+          }
+        }
----------------
This code looks same as the last part of SourceNoLongerAvailable(). We could make a helper function shared in here and in SourceNoLongerAvailable().


Repository:
  rL LLVM

http://reviews.llvm.org/D17474





More information about the llvm-commits mailing list