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

Side by Side Diff: src/compiler/common-operator.cc

Issue 859053002: [turbofan] Pull ResizeMergeOrPhi into CommonOperatorBuilder and use in ControlReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/common-operator.h ('k') | src/compiler/control-reducer.cc » ('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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 486
487 const Operator* CommonOperatorBuilder::Projection(size_t index) { 487 const Operator* CommonOperatorBuilder::Projection(size_t index) {
488 return new (zone()) Operator1<size_t>( // -- 488 return new (zone()) Operator1<size_t>( // --
489 IrOpcode::kProjection, Operator::kPure, // opcode 489 IrOpcode::kProjection, Operator::kPure, // opcode
490 "Projection", // name 490 "Projection", // name
491 1, 0, 0, 1, 0, 0, // counts 491 1, 0, 0, 1, 0, 0, // counts
492 index); // parameter 492 index); // parameter
493 } 493 }
494 494
495
496 const Operator* CommonOperatorBuilder::ResizeMergeOrPhi(const Operator* op,
497 int size) {
498 if (op->opcode() == IrOpcode::kPhi) {
499 return Phi(OpParameter<MachineType>(op), size);
500 } else if (op->opcode() == IrOpcode::kEffectPhi) {
501 return EffectPhi(size);
502 } else if (op->opcode() == IrOpcode::kMerge) {
503 return Merge(size);
504 } else if (op->opcode() == IrOpcode::kLoop) {
505 return Loop(size);
506 } else {
507 UNREACHABLE();
508 return nullptr;
509 }
510 }
511
512
495 } // namespace compiler 513 } // namespace compiler
496 } // namespace internal 514 } // namespace internal
497 } // namespace v8 515 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/control-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698