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