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 #ifndef V8_COMPILER_CONTROL_REDUCER_H_ | 5 #ifndef V8_COMPILER_CONTROL_REDUCER_H_ |
6 #define V8_COMPILER_CONTROL_REDUCER_H_ | 6 #define V8_COMPILER_CONTROL_REDUCER_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 namespace compiler { | 10 namespace compiler { |
11 | 11 |
12 class JSGraph; | 12 class JSGraph; |
13 class CommonOperatorBuilder; | 13 class CommonOperatorBuilder; |
14 | 14 |
15 class ControlReducer { | 15 class ControlReducer { |
16 public: | 16 public: |
17 // Perform branch folding and dead code elimination on the graph. | 17 // Perform branch folding and dead code elimination on the graph. |
18 static void ReduceGraph(JSGraph* graph, CommonOperatorBuilder* builder); | 18 static void ReduceGraph(Zone* zone, JSGraph* graph, |
| 19 CommonOperatorBuilder* builder); |
19 | 20 |
20 // Trim nodes in the graph that are not reachable from end. | 21 // Trim nodes in the graph that are not reachable from end. |
21 static void TrimGraph(JSGraph* graph); | 22 static void TrimGraph(Zone* zone, JSGraph* graph); |
22 }; | 23 }; |
23 } | 24 } |
24 } | 25 } |
25 } // namespace v8::internal::compiler | 26 } // namespace v8::internal::compiler |
26 | 27 |
27 #endif // V8_COMPILER_CONTROL_REDUCER_H_ | 28 #endif // V8_COMPILER_CONTROL_REDUCER_H_ |
OLD | NEW |