[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp
Evan Cheng
evan.cheng at apple.com
Thu May 11 00:28:30 PDT 2006
Changes in directory llvm/lib/CodeGen:
RegAllocLinearScan.cpp updated: 1.121 -> 1.122
---
Log message:
Backing out previous check-in.
---
Diffs of the changes: (+1 -16)
RegAllocLinearScan.cpp | 17 +----------------
1 files changed, 1 insertion(+), 16 deletions(-)
Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.121 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.122
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.121 Wed May 10 17:30:41 2006
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Thu May 11 02:28:16 2006
@@ -406,15 +406,6 @@
}
}
-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 @@
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 =
More information about the llvm-commits
mailing list