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

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 20:12:07 PST 2016


junbuml added inline comments.

================
Comment at: lib/CodeGen/MachineCopyPropagation.cpp:74
@@ -72,2 +73,3 @@
 
-void MachineCopyPropagation::SourceNoLongerAvailable(unsigned Reg) {
+void MachineCopyPropagation::ClobberCopySources(const RegList &Defs) {
+  for (unsigned Reg : Defs) {
----------------
I doubt if this method name well describe what it does. For me this method seems simply erase all (sub)regs in RegList from AvailCopyMap. 

================
Comment at: lib/CodeGen/MachineCopyPropagation.cpp:286
@@ -293,1 +285,3 @@
+          ClobberCopySources(I->second);
+        SrcMap.erase(I);
       }
----------------
Maybe ?

  if (RegMask->clobbersPhysReg(I->first)) {
    ClobberCopySources(I->second);
    SrcMap.erase(I);
  }


Repository:
  rL LLVM

http://reviews.llvm.org/D17474





More information about the llvm-commits mailing list