OLD | NEW |
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/graph-reducer.h" | |
6 | |
7 #include <functional> | 5 #include <functional> |
8 | 6 |
9 #include "src/compiler/graph-inl.h" | 7 #include "src/compiler/graph.h" |
| 8 #include "src/compiler/graph-reducer.h" |
| 9 #include "src/compiler/node.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 namespace compiler { | 13 namespace compiler { |
14 | 14 |
15 enum class GraphReducer::State : uint8_t { | 15 enum class GraphReducer::State : uint8_t { |
16 kUnvisited, | 16 kUnvisited, |
17 kRevisit, | 17 kRevisit, |
18 kOnStack, | 18 kOnStack, |
19 kVisited | 19 kVisited |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 void GraphReducer::Revisit(Node* node) { | 195 void GraphReducer::Revisit(Node* node) { |
196 if (state_.Get(node) == State::kVisited) { | 196 if (state_.Get(node) == State::kVisited) { |
197 state_.Set(node, State::kRevisit); | 197 state_.Set(node, State::kRevisit); |
198 revisit_.push(node); | 198 revisit_.push(node); |
199 } | 199 } |
200 } | 200 } |
201 | 201 |
202 } // namespace compiler | 202 } // namespace compiler |
203 } // namespace internal | 203 } // namespace internal |
204 } // namespace v8 | 204 } // namespace v8 |
OLD | NEW |