5 #ifndef V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 8 #include "src/base/compiler-specific.h" 9 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/machine-operator.h" 11 #include "src/globals.h" 18 class CommonOperatorBuilder;
24 :
public NON_EXPORTED_BASE(Reducer) {
27 bool allow_signalling_nan =
true);
30 const char* reducer_name()
const override {
return "MachineOperatorReducer"; }
35 Node* Float32Constant(
volatile float value);
36 Node* Float64Constant(
volatile double value);
37 Node* Int32Constant(int32_t value);
40 return Int32Constant(bit_cast<int32_t>(value));
42 Node* Uint64Constant(uint64_t value) {
43 return Int64Constant(bit_cast<int64_t>(value));
49 return Word32And(lhs, Uint32Constant(rhs));
57 Node* Int32Div(
Node* dividend, int32_t divisor);
60 Reduction ReplaceBool(
bool value) {
return ReplaceInt32(value ? 1 : 0); }
61 Reduction ReplaceFloat32(
volatile float value) {
62 return Replace(Float32Constant(value));
64 Reduction ReplaceFloat64(
volatile double value) {
65 return Replace(Float64Constant(value));
68 return Replace(Int32Constant(value));
71 return Replace(Uint32Constant(value));
74 return Replace(Int64Constant(value));
103 Graph* graph()
const;
109 bool allow_signalling_nan_;
116 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_