summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-05-11 07:28:16 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-05-11 07:28:16 +0000
commitdb6aa4896bd453b909279009bb1828abdc995611 (patch)
tree226c5ab111f26843665f383237fb06d790f70376 /llvm/lib/CodeGen/RegAllocLinearScan.cpp
parent68afff2dcd287ed520cde6b8a47cadaf819df4b3 (diff)
downloadbcm5719-llvm-db6aa4896bd453b909279009bb1828abdc995611.tar.gz
bcm5719-llvm-db6aa4896bd453b909279009bb1828abdc995611.zip
Backing out previous check-in.
llvm-svn: 28219
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index fd7d5a6d760..90b8fe27143 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
@@ -406,15 +406,6 @@ static void RevertVectorIteratorsTo(RA::IntervalPtrs &V, unsigned Point) {
}
}
-static bool isZeroLengthInterval(LiveInterval *li) {
- for (LiveInterval::Ranges::const_iterator
- i = li->ranges.begin(), e = li->ranges.end(); i != e; ++i)
- if (i->end - i->start > LiveIntervals::InstrSlots::NUM)
- return false;
- return true;
-}
-
-
/// assignRegOrStackSlotAtInterval - assign a register if one is available, or
/// spill.
void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
@@ -565,16 +556,10 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
DEBUG(std::cerr << "\t\tregister with min weight: "
<< mri_->getName(minReg) << " (" << minWeight << ")\n");
- // If the live interval legnth is essentially zero, i.e. in every live range
- // the use follows def immediately, it doesn't make sense to spill it and
- // hope it will be easier to allocate for this li.
- if (isZeroLengthInterval(cur))
- DEBUG(std::cerr << "\t\tavoid spilling zero length live interval: "
- << *cur << '\n';);
// if the current has the minimum weight, we need to spill it and
// add any added intervals back to unhandled, and restart
// linearscan.
- else if (cur->weight <= minWeight) {
+ if (cur->weight <= minWeight) {
DEBUG(std::cerr << "\t\t\tspilling(c): " << *cur << '\n';);
int slot = vrm_->assignVirt2StackSlot(cur->reg);
std::vector<LiveInterval*> added =
OpenPOWER on IntegriCloud