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

Unified Diff: src/compiler/instruction-selector.cc

Issue 738853002: [turbofan]: delay ssa deconstruction in register allocator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 567b1c920f00ff86273dec94e4e4fb6ea5356330..da8dafddf9e0506268c53b19fb360ad7b977f84b 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -925,16 +925,15 @@ void InstructionSelector::VisitParameter(Node* node) {
void InstructionSelector::VisitPhi(Node* node) {
- // TODO(bmeurer): Emit a PhiInstruction here.
+ const int input_count = node->op()->ValueInputCount();
PhiInstruction* phi = new (instruction_zone())
- PhiInstruction(instruction_zone(), GetVirtualRegister(node));
+ PhiInstruction(instruction_zone(), GetVirtualRegister(node),
+ static_cast<size_t>(input_count));
sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi);
- const int input_count = node->op()->ValueInputCount();
- phi->operands().reserve(static_cast<size_t>(input_count));
for (int i = 0; i < input_count; ++i) {
Node* const input = node->InputAt(i);
MarkAsUsed(input);
- phi->operands().push_back(GetVirtualRegister(input));
+ phi->Extend(instruction_zone(), GetVirtualRegister(input));
}
}
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698