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

Side by Side Diff: src/compiler/js-inlining.cc

Issue 545153002: [turbofan] Add MachineType to Phi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/instruction-selector-unittest.cc ('k') | src/compiler/raw-machine-assembler.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/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/generic-node-inl.h" 7 #include "src/compiler/generic-node-inl.h"
8 #include "src/compiler/graph-inl.h" 8 #include "src/compiler/graph-inl.h"
9 #include "src/compiler/graph-visualizer.h" 9 #include "src/compiler/graph-visualizer.h"
10 #include "src/compiler/js-inlining.h" 10 #include "src/compiler/js-inlining.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 Node* final_merge = NodeProperties::GetControlInput(graph->end(), 0); 114 Node* final_merge = NodeProperties::GetControlInput(graph->end(), 0);
115 if (final_merge->opcode() == IrOpcode::kReturn) { 115 if (final_merge->opcode() == IrOpcode::kReturn) {
116 // nothing to do 116 // nothing to do
117 return; 117 return;
118 } 118 }
119 DCHECK_EQ(IrOpcode::kMerge, final_merge->opcode()); 119 DCHECK_EQ(IrOpcode::kMerge, final_merge->opcode());
120 120
121 int predecessors = 121 int predecessors =
122 OperatorProperties::GetControlInputCount(final_merge->op()); 122 OperatorProperties::GetControlInputCount(final_merge->op());
123 Operator* op_phi = jsgraph_->common()->Phi(predecessors); 123 Operator* op_phi = jsgraph_->common()->Phi(kMachAnyTagged, predecessors);
124 Operator* op_ephi = jsgraph_->common()->EffectPhi(predecessors); 124 Operator* op_ephi = jsgraph_->common()->EffectPhi(predecessors);
125 125
126 NodeVector values(jsgraph_->zone()); 126 NodeVector values(jsgraph_->zone());
127 NodeVector effects(jsgraph_->zone()); 127 NodeVector effects(jsgraph_->zone());
128 // Iterate over all control flow predecessors, 128 // Iterate over all control flow predecessors,
129 // which must be return statements. 129 // which must be return statements.
130 InputIter iter = final_merge->inputs().begin(); 130 InputIter iter = final_merge->inputs().begin();
131 while (iter != final_merge->inputs().end()) { 131 while (iter != final_merge->inputs().end()) {
132 Node* input = *iter; 132 Node* input = *iter;
133 switch (input->opcode()) { 133 switch (input->opcode()) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 Inlinee inlinee(&jsgraph); 288 Inlinee inlinee(&jsgraph);
289 inlinee.UnifyReturn(); 289 inlinee.UnifyReturn();
290 inlinee.InlineAtCall(jsgraph_, node); 290 inlinee.InlineAtCall(jsgraph_, node);
291 291
292 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID()); 292 jsgraph_->graph()->SetNextNodeId(inlinee.graph()->NextNodeID());
293 } 293 }
294 } 294 }
295 } 295 }
296 } // namespace v8::internal::compiler 296 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector-unittest.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698