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

Side by Side Diff: src/compiler/dead-code-elimination.cc

Issue 2602403002: [Turbofan] run load elimination concurrently. (Closed)
Patch Set: Created 3 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-reducer.cc ('k') | src/compiler/graph-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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/dead-code-elimination.h" 5 #include "src/compiler/dead-code-elimination.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 namespace compiler { 14 namespace compiler {
15 15
16 DeadCodeElimination::DeadCodeElimination(Editor* editor, Graph* graph, 16 DeadCodeElimination::DeadCodeElimination(Editor* editor, Graph* graph,
17 CommonOperatorBuilder* common) 17 CommonOperatorBuilder* common)
18 : AdvancedReducer(editor), 18 : AdvancedReducer(editor),
19 graph_(graph), 19 graph_(graph),
20 common_(common), 20 common_(common),
21 dead_(graph->NewNode(common->Dead())) {} 21 dead_(graph->NewNode(common->Dead())) {
22 22 NodeProperties::SetType(dead_, Type::None());
23 }
23 24
24 Reduction DeadCodeElimination::Reduce(Node* node) { 25 Reduction DeadCodeElimination::Reduce(Node* node) {
25 switch (node->opcode()) { 26 switch (node->opcode()) {
26 case IrOpcode::kEnd: 27 case IrOpcode::kEnd:
27 return ReduceEnd(node); 28 return ReduceEnd(node);
28 case IrOpcode::kLoop: 29 case IrOpcode::kLoop:
29 case IrOpcode::kMerge: 30 case IrOpcode::kMerge:
30 return ReduceLoopOrMerge(node); 31 return ReduceLoopOrMerge(node);
31 case IrOpcode::kLoopExit: 32 case IrOpcode::kLoopExit:
32 return ReduceLoopExit(node); 33 return ReduceLoopExit(node);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 163
163 void DeadCodeElimination::TrimMergeOrPhi(Node* node, int size) { 164 void DeadCodeElimination::TrimMergeOrPhi(Node* node, int size) {
164 const Operator* const op = common()->ResizeMergeOrPhi(node->op(), size); 165 const Operator* const op = common()->ResizeMergeOrPhi(node->op(), size);
165 node->TrimInputCount(OperatorProperties::GetTotalInputCount(op)); 166 node->TrimInputCount(OperatorProperties::GetTotalInputCount(op));
166 NodeProperties::ChangeOp(node, op); 167 NodeProperties::ChangeOp(node, op);
167 } 168 }
168 169
169 } // namespace compiler 170 } // namespace compiler
170 } // namespace internal 171 } // namespace internal
171 } // namespace v8 172 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator-reducer.cc ('k') | src/compiler/graph-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698