diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-04 15:32:15 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-04-04 15:32:15 +0000 |
commit | 6c8afd728eb02742ce320ecd39bcf3774d8423b7 (patch) | |
tree | c74771352059404cd652904e561e1b535316edef /lib/CodeGen/SplitKit.cpp | |
parent | 5c4c4d4b82a658643c8daefd5cc76d5c712285ed (diff) |
Stop caching basic block index ranges now that SlotIndexes can keep up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SplitKit.cpp')
-rw-r--r-- | lib/CodeGen/SplitKit.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/CodeGen/SplitKit.cpp b/lib/CodeGen/SplitKit.cpp index 2c8066fb63..29f08a57b5 100644 --- a/lib/CodeGen/SplitKit.cpp +++ b/lib/CodeGen/SplitKit.cpp @@ -118,7 +118,8 @@ bool SplitAnalysis::calcLiveBlockInfo() { for (;;) { BlockInfo BI; BI.MBB = MFI; - tie(BI.Start, BI.Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); + SlotIndex Start, Stop; + tie(Start, Stop) = LIS.getSlotIndexes()->getMBBRange(BI.MBB); // The last split point is the latest possible insertion point that dominates // all successor blocks. If interference reaches LastSplitPoint, it is not @@ -126,12 +127,12 @@ bool SplitAnalysis::calcLiveBlockInfo() { // outgoing bundle. MachineBasicBlock::iterator LSP = LIS.getLastSplitPoint(*CurLI, BI.MBB); if (LSP == BI.MBB->end()) - BI.LastSplitPoint = BI.Stop; + BI.LastSplitPoint = Stop; else BI.LastSplitPoint = LIS.getInstructionIndex(LSP); // LVI is the first live segment overlapping MBB. - BI.LiveIn = LVI->start <= BI.Start; + BI.LiveIn = LVI->start <= Start; if (!BI.LiveIn) BI.Def = LVI->start; @@ -139,19 +140,19 @@ bool SplitAnalysis::calcLiveBlockInfo() { BI.Uses = hasUses(MFI); if (BI.Uses && UseI != UseE) { BI.FirstUse = *UseI; - assert(BI.FirstUse >= BI.Start); + assert(BI.FirstUse >= Start); do ++UseI; - while (UseI != UseE && *UseI < BI.Stop); + while (UseI != UseE && *UseI < Stop); BI.LastUse = UseI[-1]; - assert(BI.LastUse < BI.Stop); + assert(BI.LastUse < Stop); } // Look for gaps in the live range. bool hasGap = false; BI.LiveOut = true; - while (LVI->end < BI.Stop) { + while (LVI->end < Stop) { SlotIndex LastStop = LVI->end; - if (++LVI == LVE || LVI->start >= BI.Stop) { + if (++LVI == LVE || LVI->start >= Stop) { BI.Kill = LastStop; BI.LiveOut = false; break; @@ -177,11 +178,11 @@ bool SplitAnalysis::calcLiveBlockInfo() { break; // Live segment ends exactly at Stop. Move to the next segment. - if (LVI->end == BI.Stop && ++LVI == LVE) + if (LVI->end == Stop && ++LVI == LVE) break; // Pick the next basic block. - if (LVI->start < BI.Stop) + if (LVI->start < Stop) ++MFI; else MFI = LIS.getMBBFromIndex(LVI->start); |