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

Unified Diff: src/compiler/register-allocator.cc

Issue 710323002: [turbofan] put gaps before instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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/compiler/instruction.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/register-allocator.cc
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
index a9cdf51b5636d7d2d0f484c6e2e36875e89cf3c9..61afa54d0a04374428e07fa348af3dd0ccb4f54f 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -1078,9 +1078,8 @@ void RegisterAllocator::ProcessPhis(const InstructionBlock* block) {
auto output = phi->output();
int phi_vreg = phi->virtual_register();
LiveRange* live_range = LiveRangeFor(phi_vreg);
- BlockStartInstruction* block_start =
- code()->GetBlockStart(block->rpo_number());
- block_start->GetOrCreateParallelMove(GapInstruction::BEFORE, code_zone())
+ GapInstruction* gap = code()->GapAt(block->code_start() + 1);
+ gap->GetOrCreateParallelMove(GapInstruction::BEFORE, code_zone())
->AddMove(output, live_range->GetSpillOperand(), code_zone());
live_range->SetSpillStartIndex(block->first_instruction_index());
}
@@ -1346,14 +1345,11 @@ void RegisterAllocator::ResolveControlFlow(const InstructionBlock* block,
if (pred_op->Equals(cur_op)) return;
GapInstruction* gap = nullptr;
if (block->PredecessorCount() == 1) {
- gap = code()->GapAt(block->first_instruction_index());
+ gap = code()->GapAt(block->first_instruction_index() + 1);
} else {
DCHECK(pred->SuccessorCount() == 1);
gap = GetLastGap(pred);
-
- Instruction* branch = InstructionAt(pred->last_instruction_index());
- DCHECK(!branch->HasPointerMap());
- USE(branch);
+ DCHECK(!InstructionAt(pred->last_instruction_index())->HasPointerMap());
}
gap->GetOrCreateParallelMove(GapInstruction::START, code_zone())
->AddMove(pred_op, cur_op, code_zone());
« no previous file with comments | « src/compiler/instruction.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698