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_MACHINE_OPERATOR_REDUCER_H_ | 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ |
6 #define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ | 6 #define V8_COMPILER_MACHINE_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" |
9 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| 11 #include "src/globals.h" |
10 | 12 |
11 namespace v8 { | 13 namespace v8 { |
12 namespace internal { | 14 namespace internal { |
13 namespace compiler { | 15 namespace compiler { |
14 | 16 |
15 // Forward declarations. | 17 // Forward declarations. |
16 class CommonOperatorBuilder; | 18 class CommonOperatorBuilder; |
17 class JSGraph; | 19 class JSGraph; |
18 | 20 |
19 | 21 |
20 // Performs constant folding and strength reduction on nodes that have | 22 // Performs constant folding and strength reduction on nodes that have |
21 // machine operators. | 23 // machine operators. |
22 class MachineOperatorReducer final : public Reducer { | 24 class V8_EXPORT_PRIVATE MachineOperatorReducer final |
| 25 : public NON_EXPORTED_BASE(Reducer) { |
23 public: | 26 public: |
24 explicit MachineOperatorReducer(JSGraph* jsgraph); | 27 explicit MachineOperatorReducer(JSGraph* jsgraph); |
25 ~MachineOperatorReducer(); | 28 ~MachineOperatorReducer(); |
26 | 29 |
27 Reduction Reduce(Node* node) override; | 30 Reduction Reduce(Node* node) override; |
28 | 31 |
29 private: | 32 private: |
30 Node* Float32Constant(volatile float value); | 33 Node* Float32Constant(volatile float value); |
31 Node* Float64Constant(volatile double value); | 34 Node* Float64Constant(volatile double value); |
32 Node* Int32Constant(int32_t value); | 35 Node* Int32Constant(int32_t value); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 MachineOperatorBuilder* machine() const; | 103 MachineOperatorBuilder* machine() const; |
101 | 104 |
102 JSGraph* jsgraph_; | 105 JSGraph* jsgraph_; |
103 }; | 106 }; |
104 | 107 |
105 } // namespace compiler | 108 } // namespace compiler |
106 } // namespace internal | 109 } // namespace internal |
107 } // namespace v8 | 110 } // namespace v8 |
108 | 111 |
109 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ | 112 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ |
OLD | NEW |