aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-22 20:49:58 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-22 20:49:58 +0000
commitc5b668deb8848bca64e71efab5a3477857548e0f (patch)
tree18486a915fec62d41f58d03298bd7b60e2b2739a /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parent42bb25413302819745e302b87d3219cf137d3afe (diff)
downloadllvm-c5b668deb8848bca64e71efab5a3477857548e0f.zip
llvm-c5b668deb8848bca64e71efab5a3477857548e0f.tar.gz
llvm-c5b668deb8848bca64e71efab5a3477857548e0f.tar.bz2
Revert "CodeGen: MachineInstr::getIterator() => getInstrIterator(), NFC"
This reverts commit r261504, since it's not obvious the new name is better: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160222/334298.html I'll recommit if we get consensus that it's the right direction. llvm-svn: 261567
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCopyPropagation.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp
index aef5db9..79240b3 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();