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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 910753002: [turbofan] remove one level of indirection in phi inputs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 1012
1013 void InstructionSelector::VisitPhi(Node* node) { 1013 void InstructionSelector::VisitPhi(Node* node) {
1014 const int input_count = node->op()->ValueInputCount(); 1014 const int input_count = node->op()->ValueInputCount();
1015 PhiInstruction* phi = new (instruction_zone()) 1015 PhiInstruction* phi = new (instruction_zone())
1016 PhiInstruction(instruction_zone(), GetVirtualRegister(node), 1016 PhiInstruction(instruction_zone(), GetVirtualRegister(node),
1017 static_cast<size_t>(input_count)); 1017 static_cast<size_t>(input_count));
1018 sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi); 1018 sequence()->InstructionBlockAt(current_block_->GetRpoNumber())->AddPhi(phi);
1019 for (int i = 0; i < input_count; ++i) { 1019 for (int i = 0; i < input_count; ++i) {
1020 Node* const input = node->InputAt(i); 1020 Node* const input = node->InputAt(i);
1021 MarkAsUsed(input); 1021 MarkAsUsed(input);
1022 phi->Extend(instruction_zone(), GetVirtualRegister(input)); 1022 phi->SetInput(static_cast<size_t>(i), GetVirtualRegister(input));
1023 } 1023 }
1024 } 1024 }
1025 1025
1026 1026
1027 void InstructionSelector::VisitProjection(Node* node) { 1027 void InstructionSelector::VisitProjection(Node* node) {
1028 OperandGenerator g(this); 1028 OperandGenerator g(this);
1029 Node* value = node->InputAt(0); 1029 Node* value = node->InputAt(0);
1030 switch (value->opcode()) { 1030 switch (value->opcode()) {
1031 case IrOpcode::kInt32AddWithOverflow: 1031 case IrOpcode::kInt32AddWithOverflow:
1032 case IrOpcode::kInt32SubWithOverflow: 1032 case IrOpcode::kInt32SubWithOverflow:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 MachineOperatorBuilder::Flags 1212 MachineOperatorBuilder::Flags
1213 InstructionSelector::SupportedMachineOperatorFlags() { 1213 InstructionSelector::SupportedMachineOperatorFlags() {
1214 return MachineOperatorBuilder::Flag::kNoFlags; 1214 return MachineOperatorBuilder::Flag::kNoFlags;
1215 } 1215 }
1216 1216
1217 #endif // !V8_TURBOFAN_BACKEND 1217 #endif // !V8_TURBOFAN_BACKEND
1218 1218
1219 } // namespace compiler 1219 } // namespace compiler
1220 } // namespace internal 1220 } // namespace internal
1221 } // namespace v8 1221 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698