summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-05 04:20:29 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-04-05 04:20:29 +0000
commitd93b0e3cedd73d21e89121e715ba2b5cf90d0622 (patch)
tree9cc8de6af64333ee5502f8473fdc9ddcb9d8d402 /llvm/lib/CodeGen/SplitKit.cpp
parent50b2db8a02bdbb20559b3c1216eb84e41650a78a (diff)
downloadbcm5719-llvm-d93b0e3cedd73d21e89121e715ba2b5cf90d0622.tar.gz
bcm5719-llvm-d93b0e3cedd73d21e89121e715ba2b5cf90d0622.zip
Stop precomputing last split points, query the SplitAnalysis cache on demand.
llvm-svn: 128875
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index 3974cb3ef67..0b59a28c061 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -151,12 +151,6 @@ bool SplitAnalysis::calcLiveBlockInfo() {
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
- // possible to insert a split or reload that makes CurLI live in the
- // outgoing bundle.
- BI.LastSplitPoint = getLastSplitPoint(BI.MBB->getNumber());
-
// LVI is the first live segment overlapping MBB.
BI.LiveIn = LVI->start <= Start;
if (!BI.LiveIn)
@@ -947,13 +941,14 @@ void SplitEditor::splitSingleBlocks(const SplitAnalysis::BlockPtrSet &Blocks) {
continue;
openIntv();
+ SlotIndex LastSplitPoint = SA.getLastSplitPoint(BI.MBB->getNumber());
SlotIndex SegStart = enterIntvBefore(std::min(BI.FirstUse,
- BI.LastSplitPoint));
- if (!BI.LiveOut || BI.LastUse < BI.LastSplitPoint) {
+ LastSplitPoint));
+ if (!BI.LiveOut || BI.LastUse < LastSplitPoint) {
useIntv(SegStart, leaveIntvAfter(BI.LastUse));
} else {
// The last use is after the last valid split point.
- SlotIndex SegStop = leaveIntvBefore(BI.LastSplitPoint);
+ SlotIndex SegStop = leaveIntvBefore(LastSplitPoint);
useIntv(SegStart, SegStop);
overlapIntv(SegStop, BI.LastUse);
}
OpenPOWER on IntegriCloud