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

Side by Side Diff: src/compiler/graph-reducer.h

Issue 1200983004: Revert of [turbofan] Run DeadCodeElimination together with the advanced reducers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | 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 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 #ifndef V8_COMPILER_GRAPH_REDUCER_H_ 5 #ifndef V8_COMPILER_GRAPH_REDUCER_H_
6 #define V8_COMPILER_GRAPH_REDUCER_H_ 6 #define V8_COMPILER_GRAPH_REDUCER_H_
7 7
8 #include "src/compiler/node-marker.h" 8 #include "src/compiler/node-marker.h"
9 #include "src/zone-containers.h" 9 #include "src/zone-containers.h"
10 10
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 private: 111 private:
112 Editor* const editor_; 112 Editor* const editor_;
113 }; 113 };
114 114
115 115
116 // Performs an iterative reduction of a node graph. 116 // Performs an iterative reduction of a node graph.
117 class GraphReducer : public AdvancedReducer::Editor { 117 class GraphReducer : public AdvancedReducer::Editor {
118 public: 118 public:
119 GraphReducer(Zone* zone, Graph* graph, Node* dead = nullptr); 119 GraphReducer(Zone* zone, Graph* graph, Node* dead_value = nullptr,
120 Node* dead_control = nullptr);
120 ~GraphReducer(); 121 ~GraphReducer();
121 122
122 Graph* graph() const { return graph_; } 123 Graph* graph() const { return graph_; }
123 124
124 void AddReducer(Reducer* reducer); 125 void AddReducer(Reducer* reducer);
125 126
126 // Reduce a single node. 127 // Reduce a single node.
127 void ReduceNode(Node* const); 128 void ReduceNode(Node* const);
128 // Reduce the whole graph. 129 // Reduce the whole graph.
129 void ReduceGraph(); 130 void ReduceGraph();
(...skipping 26 matching lines...) Expand all
156 157
157 // Node stack operations. 158 // Node stack operations.
158 void Pop(); 159 void Pop();
159 void Push(Node* node); 160 void Push(Node* node);
160 161
161 // Revisit queue operations. 162 // Revisit queue operations.
162 bool Recurse(Node* node); 163 bool Recurse(Node* node);
163 void Revisit(Node* node) final; 164 void Revisit(Node* node) final;
164 165
165 Graph* const graph_; 166 Graph* const graph_;
166 Node* const dead_; 167 Node* dead_value_;
168 Node* dead_control_;
167 NodeMarker<State> state_; 169 NodeMarker<State> state_;
168 ZoneVector<Reducer*> reducers_; 170 ZoneVector<Reducer*> reducers_;
169 ZoneStack<Node*> revisit_; 171 ZoneStack<Node*> revisit_;
170 ZoneStack<NodeState> stack_; 172 ZoneStack<NodeState> stack_;
171 173
172 DISALLOW_COPY_AND_ASSIGN(GraphReducer); 174 DISALLOW_COPY_AND_ASSIGN(GraphReducer);
173 }; 175 };
174 176
175 } // namespace compiler 177 } // namespace compiler
176 } // namespace internal 178 } // namespace internal
177 } // namespace v8 179 } // namespace v8
178 180
179 #endif // V8_COMPILER_GRAPH_REDUCER_H_ 181 #endif // V8_COMPILER_GRAPH_REDUCER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/graph-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698