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

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: Added regression test 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') | test/mjsunit/compiler/regress-177883.js » ('J')
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..66397176b6c91421562ffe9abab0ee0da639e10c 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());
Vyacheslav Egorov (Chromium) 2013/03/11 08:43:15 I wonder if we should turn ASSERT in the callee in
Sven Panne 2013/03/11 09:48:03 Sounds like a good idea, the check is extremely ch
SpillBetween(current, current->Start(), register_use->pos());
return;
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-177883.js » ('j') | test/mjsunit/compiler/regress-177883.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698