diff options
Diffstat (limited to 'llvm/lib/CodeGen/DeadMachineInstructionElim.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/DeadMachineInstructionElim.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp index 93467e9d09b8..6e7db95b5c2a 100644 --- a/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp +++ b/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp @@ -132,10 +132,8 @@ bool DeadMachineInstructionElim::eliminateDeadMI(MachineFunction &MF) { // Add live-ins from successors to LivePhysRegs. Normally, physregs are not // live across blocks, but some targets (x86) can have flags live out of a // block. - for (MachineBasicBlock::succ_iterator S = MBB->succ_begin(), - E = MBB->succ_end(); - S != E; S++) - for (const auto &LI : (*S)->liveins()) + for (const MachineBasicBlock *Succ : MBB->successors()) + for (const auto &LI : Succ->liveins()) LivePhysRegs.set(LI.PhysReg); // Now scan the instructions and delete dead ones, tracking physreg |
