summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2013-02-17 11:09:00 +0000
committerCameron Zwarich <zwarich@apple.com>2013-02-17 11:09:00 +0000
commit680c98f6323dde0eae566710ea49497e16499653 (patch)
treec1ecc8c2401a7dfa44dc7bdc773608f5a9145056 /lib/CodeGen/MachineBasicBlock.cpp
parent7324d4e593ee2611ee6b272c03b15541fe2df62e (diff)
downloadllvm-680c98f6323dde0eae566710ea49497e16499653.tar.gz
llvm-680c98f6323dde0eae566710ea49497e16499653.tar.bz2
llvm-680c98f6323dde0eae566710ea49497e16499653.tar.xz
Remove use of reverse iterators in repairIntervalsInRange(). While they were
arguably better than forward iterators for this use case, they are confusing and there are some implementation problems with reverse iterators and MI bundles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--lib/CodeGen/MachineBasicBlock.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/CodeGen/MachineBasicBlock.cpp b/lib/CodeGen/MachineBasicBlock.cpp
index f22a70716e..898e165fee 100644
--- a/lib/CodeGen/MachineBasicBlock.cpp
+++ b/lib/CodeGen/MachineBasicBlock.cpp
@@ -851,15 +851,7 @@ MachineBasicBlock::SplitCriticalEdge(MachineBasicBlock *Succ, Pass *P) {
// Update all intervals for registers whose uses may have been modified by
// updateTerminator().
- iterator FirstTerminator = getFirstTerminator();
- reverse_iterator PreTerminators;
- if (FirstTerminator == begin())
- PreTerminators = rend();
- else if (FirstTerminator == end())
- PreTerminators = rbegin();
- else
- PreTerminators = reverse_iterator(FirstTerminator);
- LIS->repairIntervalsInRange(this, rbegin(), PreTerminators, UsedRegs);
+ LIS->repairIntervalsInRange(this, getFirstTerminator(), end(), UsedRegs);
}
if (MachineDominatorTree *MDT =