| 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_COMMON_OPERATOR_REDUCER_H_ | 5 #ifndef V8_COMPILER_COMMON_OPERATOR_REDUCER_H_ |
| 6 #define V8_COMPILER_COMMON_OPERATOR_REDUCER_H_ | 6 #define V8_COMPILER_COMMON_OPERATOR_REDUCER_H_ |
| 7 | 7 |
| 8 #include "src/base/compiler-specific.h" |
| 8 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
| 10 #include "src/globals.h" |
| 9 | 11 |
| 10 namespace v8 { | 12 namespace v8 { |
| 11 namespace internal { | 13 namespace internal { |
| 12 namespace compiler { | 14 namespace compiler { |
| 13 | 15 |
| 14 // Forward declarations. | 16 // Forward declarations. |
| 15 class CommonOperatorBuilder; | 17 class CommonOperatorBuilder; |
| 16 class Graph; | 18 class Graph; |
| 17 class MachineOperatorBuilder; | 19 class MachineOperatorBuilder; |
| 18 class Operator; | 20 class Operator; |
| 19 | 21 |
| 20 | 22 |
| 21 // Performs strength reduction on nodes that have common operators. | 23 // Performs strength reduction on nodes that have common operators. |
| 22 class CommonOperatorReducer final : public AdvancedReducer { | 24 class V8_EXPORT_PRIVATE CommonOperatorReducer final |
| 25 : public NON_EXPORTED_BASE(AdvancedReducer) { |
| 23 public: | 26 public: |
| 24 CommonOperatorReducer(Editor* editor, Graph* graph, | 27 CommonOperatorReducer(Editor* editor, Graph* graph, |
| 25 CommonOperatorBuilder* common, | 28 CommonOperatorBuilder* common, |
| 26 MachineOperatorBuilder* machine); | 29 MachineOperatorBuilder* machine); |
| 27 ~CommonOperatorReducer() final {} | 30 ~CommonOperatorReducer() final {} |
| 28 | 31 |
| 29 Reduction Reduce(Node* node) final; | 32 Reduction Reduce(Node* node) final; |
| 30 | 33 |
| 31 private: | 34 private: |
| 32 Reduction ReduceBranch(Node* node); | 35 Reduction ReduceBranch(Node* node); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 49 CommonOperatorBuilder* const common_; | 52 CommonOperatorBuilder* const common_; |
| 50 MachineOperatorBuilder* const machine_; | 53 MachineOperatorBuilder* const machine_; |
| 51 Node* const dead_; | 54 Node* const dead_; |
| 52 }; | 55 }; |
| 53 | 56 |
| 54 } // namespace compiler | 57 } // namespace compiler |
| 55 } // namespace internal | 58 } // namespace internal |
| 56 } // namespace v8 | 59 } // namespace v8 |
| 57 | 60 |
| 58 #endif // V8_COMPILER_COMMON_OPERATOR_REDUCER_H_ | 61 #endif // V8_COMPILER_COMMON_OPERATOR_REDUCER_H_ |
| OLD | NEW |