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

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

Issue 1193833002: [turbofan] Proper dead code elimination as regular reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Renamed DeadControl to Dead. Created 5 years, 6 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/js-graph.cc ('k') | src/compiler/loop-peeling.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/js-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler/all-nodes.h" 9 #include "src/compiler/all-nodes.h"
10 #include "src/compiler/ast-graph-builder.h" 10 #include "src/compiler/ast-graph-builder.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Node* frame_state() { return NodeProperties::GetFrameStateInput(call_, 0); } 55 Node* frame_state() { return NodeProperties::GetFrameStateInput(call_, 0); }
56 56
57 private: 57 private:
58 Node* call_; 58 Node* call_;
59 }; 59 };
60 60
61 61
62 class CopyVisitor { 62 class CopyVisitor {
63 public: 63 public:
64 CopyVisitor(Graph* source_graph, Graph* target_graph, Zone* temp_zone) 64 CopyVisitor(Graph* source_graph, Graph* target_graph, Zone* temp_zone)
65 : sentinel_op_(IrOpcode::kDeadControl, Operator::kNoProperties, 65 : sentinel_op_(IrOpcode::kDead, Operator::kNoProperties, "Sentinel", 0, 0,
66 "Sentinel", 0, 0, 0, 0, 0, 0), 66 0, 0, 0, 0),
67 sentinel_(target_graph->NewNode(&sentinel_op_)), 67 sentinel_(target_graph->NewNode(&sentinel_op_)),
68 copies_(source_graph->NodeCount(), sentinel_, temp_zone), 68 copies_(source_graph->NodeCount(), sentinel_, temp_zone),
69 source_graph_(source_graph), 69 source_graph_(source_graph),
70 target_graph_(target_graph), 70 target_graph_(target_graph),
71 temp_zone_(temp_zone) {} 71 temp_zone_(temp_zone) {}
72 72
73 Node* GetCopy(Node* orig) { return copies_[orig->id()]; } 73 Node* GetCopy(Node* orig) { return copies_[orig->id()]; }
74 74
75 void CopyGraph() { 75 void CopyGraph() {
76 NodeVector inputs(temp_zone_); 76 NodeVector inputs(temp_zone_);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 // Remember that we inlined this function. 305 // Remember that we inlined this function.
306 info_->AddInlinedFunction(info.shared_info()); 306 info_->AddInlinedFunction(info.shared_info());
307 307
308 return InlineCall(node, frame_state, start, end); 308 return InlineCall(node, frame_state, start, end);
309 } 309 }
310 310
311 } // namespace compiler 311 } // namespace compiler
312 } // namespace internal 312 } // namespace internal
313 } // namespace v8 313 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-graph.cc ('k') | src/compiler/loop-peeling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698