[llvm] r239681 - hoist loop-invariant; NFCI

Sanjay Patel spatel at rotateright.com
Sat Jun 13 08:33:15 PDT 2015


Author: spatel
Date: Sat Jun 13 10:33:15 2015
New Revision: 239681

URL: http://llvm.org/viewvc/llvm-project?rev=239681&view=rev
Log:
hoist loop-invariant; NFCI

Modified:
    llvm/trunk/lib/CodeGen/MachineCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/MachineCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCombiner.cpp?rev=239681&r1=239680&r2=239681&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCombiner.cpp Sat Jun 13 10:33:15 2015
@@ -387,10 +387,9 @@ bool MachineCombiner::combineInstruction
         } else {
           // Cleanup instructions of the alternative code sequence. There is no
           // use for them.
-          for (auto *InstrPtr : InsInstrs) {
-            MachineFunction *MF = MBB->getParent();
+          MachineFunction *MF = MBB->getParent();
+          for (auto *InstrPtr : InsInstrs)
             MF->DeleteMachineInstr(InstrPtr);
-          }
         }
         InstrIdxForVirtReg.clear();
       }





More information about the llvm-commits mailing list