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

Unified Diff: src/lithium-allocator.cc

Issue 6873075: Lithium LLabel instruction are no longer used as gap instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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 | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-allocator.cc
===================================================================
--- src/lithium-allocator.cc (revision 7662)
+++ src/lithium-allocator.cc (working copy)
@@ -1047,9 +1047,10 @@
}
}
+ // Insert spill-move in the first section of the first gap.
LiveRange* live_range = LiveRangeFor(phi->id());
- LLabel* label = chunk_->GetLabel(phi->block()->block_id());
- label->GetOrCreateParallelMove(LGap::START)->
+ LGap* gap = chunk_->GetFirstGap(phi->block());
+ gap->GetOrCreateParallelMove(LGap::BEFORE)->
AddMove(phi_operand, live_range->GetSpillOperand());
live_range->SetSpillStartIndex(phi->block()->first_instruction_index());
}
@@ -1122,12 +1123,12 @@
LOperand* pred_op = pred_cover->CreateAssignedOperand();
LOperand* cur_op = cur_cover->CreateAssignedOperand();
if (!pred_op->Equals(cur_op)) {
- LGap* gap = NULL;
if (block->predecessors()->length() == 1) {
- gap = GapAt(block->first_instruction_index());
+ LGap* gap = chunk_->GetFirstGap(block);
+ gap->GetOrCreateParallelMove(LGap::BEFORE)->AddMove(pred_op, cur_op);
} else {
ASSERT(pred->end()->SecondSuccessor() == NULL);
- gap = GetLastGap(pred);
+ LGap* gap = GetLastGap(pred);
// We are going to insert a move before the branch instruction.
// Some branch instructions (e.g. loops' back edges)
@@ -1143,8 +1144,8 @@
branch->pointer_map()->RecordPointer(cur_op);
}
}
+ gap->GetOrCreateParallelMove(LGap::START)->AddMove(pred_op, cur_op);
}
- gap->GetOrCreateParallelMove(LGap::START)->AddMove(pred_op, cur_op);
}
}
}
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698