aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SlotIndexes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SlotIndexes.cpp')
-rw-r--r--llvm/lib/CodeGen/SlotIndexes.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/SlotIndexes.cpp b/llvm/lib/CodeGen/SlotIndexes.cpp
index ffac68a223bf..ee3a0164564e 100644
--- a/llvm/lib/CodeGen/SlotIndexes.cpp
+++ b/llvm/lib/CodeGen/SlotIndexes.cpp
@@ -179,21 +179,12 @@ void SlotIndexes::renumberIndexes(IndexList::iterator curItr) {
void SlotIndexes::repairIndexesInRange(MachineBasicBlock *MBB,
MachineBasicBlock::iterator Begin,
MachineBasicBlock::iterator End) {
- // FIXME: Is this really necessary? The only caller repairIntervalsForRange()
- // does the same thing.
- // Find anchor points, which are at the beginning/end of blocks or at
- // instructions that already have indexes.
- while (Begin != MBB->begin() && !hasIndex(*Begin))
- --Begin;
- while (End != MBB->end() && !hasIndex(*End))
- ++End;
-
bool includeStart = (Begin == MBB->begin());
SlotIndex startIdx;
if (includeStart)
startIdx = getMBBStartIdx(MBB);
else
- startIdx = getInstructionIndex(*Begin);
+ startIdx = getInstructionIndex(*--Begin);
SlotIndex endIdx;
if (End == MBB->end())