diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-05-29 21:24:39 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-05-29 21:24:39 +0000 |
commit | 626d6fb1903e74337b257c5e165944bcd1273e65 (patch) | |
tree | 97aa5c47945772c89decee6c13919b1904f7038f /lib/CodeGen/RegAllocGreedy.cpp | |
parent | 57903357ee4f9fed47dcad6f3739414301136b0f (diff) | |
download | llvm-626d6fb1903e74337b257c5e165944bcd1273e65.tar.gz llvm-626d6fb1903e74337b257c5e165944bcd1273e65.tar.bz2 llvm-626d6fb1903e74337b257c5e165944bcd1273e65.tar.xz |
Revert r132245, "Create two BlockInfo entries when a live range is discontinuous through a block."
This commit seems to have broken a darwin 9 tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocGreedy.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocGreedy.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index 15d8cbac01..2d03760fc7 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -552,7 +552,7 @@ bool RAGreedy::addSplitConstraints(InterferenceCache::Cursor Intf, BC.Entry = SpillPlacement::MustSpill, ++Ins; else if (Intf.first() < BI.FirstUse) BC.Entry = SpillPlacement::PrefSpill, ++Ins; - else if (Intf.first() < BI.LastUse) + else if (Intf.first() < (BI.LiveThrough ? BI.LastUse : BI.Kill)) ++Ins; } @@ -562,7 +562,7 @@ bool RAGreedy::addSplitConstraints(InterferenceCache::Cursor Intf, BC.Exit = SpillPlacement::MustSpill, ++Ins; else if (Intf.last() > BI.LastUse) BC.Exit = SpillPlacement::PrefSpill, ++Ins; - else if (Intf.last() > BI.FirstUse) + else if (Intf.last() > (BI.LiveThrough ? BI.FirstUse : BI.Def)) ++Ins; } @@ -811,7 +811,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, DEBUG(dbgs() << ", no interference"); if (!BI.LiveThrough) { DEBUG(dbgs() << ", not live-through.\n"); - SE->useIntv(SE->enterIntvBefore(BI.FirstUse), Stop); + SE->useIntv(SE->enterIntvBefore(BI.Def), Stop); continue; } if (!RegIn) { @@ -828,10 +828,10 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, // Block has interference. DEBUG(dbgs() << ", interference to " << Intf.last()); - if (!BI.LiveThrough && Intf.last() <= BI.FirstUse) { + if (!BI.LiveThrough && Intf.last() <= BI.Def) { // The interference doesn't reach the outgoing segment. - DEBUG(dbgs() << " doesn't affect def from " << BI.FirstUse << '\n'); - SE->useIntv(BI.FirstUse, Stop); + DEBUG(dbgs() << " doesn't affect def from " << BI.Def << '\n'); + SE->useIntv(BI.Def, Stop); continue; } @@ -887,7 +887,7 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, DEBUG(dbgs() << ", no interference"); if (!BI.LiveThrough) { DEBUG(dbgs() << ", killed in block.\n"); - SE->useIntv(Start, SE->leaveIntvAfter(BI.LastUse)); + SE->useIntv(Start, SE->leaveIntvAfter(BI.Kill)); continue; } if (!RegOut) { @@ -920,10 +920,10 @@ void RAGreedy::splitAroundRegion(LiveInterval &VirtReg, // Block has interference. DEBUG(dbgs() << ", interference from " << Intf.first()); - if (!BI.LiveThrough && Intf.first() >= BI.LastUse) { + if (!BI.LiveThrough && Intf.first() >= BI.Kill) { // The interference doesn't reach the outgoing segment. - DEBUG(dbgs() << " doesn't affect kill at " << BI.LastUse << '\n'); - SE->useIntv(Start, BI.LastUse); + DEBUG(dbgs() << " doesn't affect kill at " << BI.Kill << '\n'); + SE->useIntv(Start, BI.Kill); continue; } |