diff options
author | Cameron Zwarich <zwarich@apple.com> | 2013-02-20 22:10:00 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2013-02-20 22:10:00 +0000 |
commit | c5b6135fb55362f5c052625043ebf3286f799f86 (patch) | |
tree | c3fad459126250734fb11e96a39a3462a3cad524 /lib/CodeGen/SlotIndexes.cpp | |
parent | 0e827ebc783ded58c11aeb0d66bed43e214de2de (diff) | |
download | llvm-c5b6135fb55362f5c052625043ebf3286f799f86.tar.gz llvm-c5b6135fb55362f5c052625043ebf3286f799f86.tar.bz2 llvm-c5b6135fb55362f5c052625043ebf3286f799f86.tar.xz |
Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SlotIndexes.cpp')
-rw-r--r-- | lib/CodeGen/SlotIndexes.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/SlotIndexes.cpp b/lib/CodeGen/SlotIndexes.cpp index b4e562e45b..f2937941ee 100644 --- a/lib/CodeGen/SlotIndexes.cpp +++ b/lib/CodeGen/SlotIndexes.cpp @@ -146,6 +146,15 @@ 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) |