Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Unified Diff: src/lithium-allocator.cc

Issue 12631012: Fixed register allocation corner case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Feedback Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-177883.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-allocator.cc
diff --git a/src/lithium-allocator.cc b/src/lithium-allocator.cc
index dcfbeadd803d55557b5a23e2906eb37b63b86d24..e3b9a8872956c2de6f4bcf62be5f8c0b1a3c5dbc 100644
--- a/src/lithium-allocator.cc
+++ b/src/lithium-allocator.cc
@@ -206,9 +206,6 @@ UsePosition* LiveRange::NextRegisterPosition(LifetimePosition start) {
bool LiveRange::CanBeSpilled(LifetimePosition pos) {
- // TODO(kmillikin): Comment. Now.
- if (pos.Value() <= Start().Value() && HasRegisterAssigned()) return false;
-
// We cannot spill a live range that has a use requiring a register
// at the current or the immediate next position.
UsePosition* use_pos = NextRegisterPosition(pos);
@@ -1917,12 +1914,6 @@ void LAllocator::AllocateBlockedReg(LiveRange* current) {
if (pos.Value() < register_use->pos().Value()) {
// All registers are blocked before the first use that requires a register.
// Spill starting part of live range up to that use.
- //
- // Corner case: the first use position is equal to the start of the range.
- // In this case we have nothing to spill and SpillBetween will just return
- // this range to the list of unhandled ones. This will lead to the infinite
- // loop.
- ASSERT(current->Start().Value() < register_use->pos().Value());
SpillBetween(current, current->Start(), register_use->pos());
return;
}
@@ -2072,7 +2063,7 @@ void LAllocator::SpillAfter(LiveRange* range, LifetimePosition pos) {
void LAllocator::SpillBetween(LiveRange* range,
LifetimePosition start,
LifetimePosition end) {
- ASSERT(start.Value() < end.Value());
+ CHECK(start.Value() < end.Value());
LiveRange* second_part = SplitRangeAt(range, start);
if (!AllocationOk()) return;
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-177883.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698