diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCopyPropagation.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp index aef5db9ca8a..79240b3b94a 100644 --- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp +++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp @@ -90,10 +90,8 @@ static bool NoInterveningSideEffect(const MachineInstr *CopyMI, if (MI->getParent() != MBB) return false; - for (MachineBasicBlock::const_instr_iterator - I = std::next(CopyMI->getInstrIterator()), - E = MBB->instr_end(), E2 = MI->getInstrIterator(); - I != E && I != E2; ++I) { + for (MachineBasicBlock::const_iterator I = std::next(CopyMI->getIterator()), + E = MBB->end(), E2 = MI->getIterator(); I != E && I != E2; ++I) { if (I->hasUnmodeledSideEffects() || I->isCall() || I->isTerminator()) return false; @@ -165,8 +163,8 @@ void MachineCopyPropagation::CopyPropagateBlock(MachineBasicBlock &MBB) { // Clear any kills of Def between CopyMI and MI. This extends the // live range. - for (MachineInstr &MMI : - make_range(CopyMI->getInstrIterator(), MI->getInstrIterator())) + for (MachineInstr &MMI + : make_range(CopyMI->getIterator(), MI->getIterator())) MMI.clearRegisterKills(Def, TRI); MI->eraseFromParent(); |