Remove the successor probabilities normalization in tail duplication pass.
[oota-llvm.git] / lib / CodeGen / DeadMachineInstructionElim.cpp
index 39c259d7c79350301621e0c051ada30c6ca86701..b11b49717c45df33284ce41ffdc725bf22af3739 100644 (file)
@@ -110,9 +110,8 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
     // block.
     for (MachineBasicBlock::succ_iterator S = MBB.succ_begin(),
            E = MBB.succ_end(); S != E; S++)
-      for (MachineBasicBlock::livein_iterator LI = (*S)->livein_begin();
-           LI != (*S)->livein_end(); LI++)
-        LivePhysRegs.set(*LI);
+      for (const auto &LI : (*S)->liveins())
+        LivePhysRegs.set(LI.PhysReg);
 
     // Now scan the instructions and delete dead ones, tracking physreg
     // liveness as we go.