diff options
Diffstat (limited to 'deps/v8/src/compiler/machine-operator-reducer.h')
-rw-r--r-- | deps/v8/src/compiler/machine-operator-reducer.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/deps/v8/src/compiler/machine-operator-reducer.h b/deps/v8/src/compiler/machine-operator-reducer.h index 7c4dc85b59..77ba737830 100644 --- a/deps/v8/src/compiler/machine-operator-reducer.h +++ b/deps/v8/src/compiler/machine-operator-reducer.h @@ -25,8 +25,14 @@ class Word64Adapter; class V8_EXPORT_PRIVATE MachineOperatorReducer final : public NON_EXPORTED_BASE(AdvancedReducer) { public: - explicit MachineOperatorReducer(Editor* editor, MachineGraph* mcgraph, - bool allow_signalling_nan = true); + enum SignallingNanPropagation { + kSilenceSignallingNan, + kPropagateSignallingNan + }; + + explicit MachineOperatorReducer( + Editor* editor, MachineGraph* mcgraph, + SignallingNanPropagation signalling_nan_propagation); ~MachineOperatorReducer() override; const char* reducer_name() const override { return "MachineOperatorReducer"; } @@ -54,18 +60,27 @@ class V8_EXPORT_PRIVATE MachineOperatorReducer final return Word32And(lhs, Uint32Constant(rhs)); } Node* Word32Sar(Node* lhs, uint32_t rhs); + Node* Word64Sar(Node* lhs, uint32_t rhs); Node* Word32Shr(Node* lhs, uint32_t rhs); + Node* Word64Shr(Node* lhs, uint32_t rhs); Node* Word32Equal(Node* lhs, Node* rhs); + Node* Word64Equal(Node* lhs, Node* rhs); Node* Word64And(Node* lhs, Node* rhs); Node* Word64And(Node* lhs, uint64_t rhs) { return Word64And(lhs, Uint64Constant(rhs)); } Node* Int32Add(Node* lhs, Node* rhs); + Node* Int64Add(Node* lhs, Node* rhs); Node* Int32Sub(Node* lhs, Node* rhs); + Node* Int64Sub(Node* lhs, Node* rhs); Node* Int32Mul(Node* lhs, Node* rhs); + Node* Int64Mul(Node* lhs, Node* rhs); Node* Int32Div(Node* dividend, int32_t divisor); + Node* Int64Div(Node* dividend, int64_t divisor); Node* Uint32Div(Node* dividend, uint32_t divisor); + Node* Uint64Div(Node* dividend, uint64_t divisor); Node* TruncateInt64ToInt32(Node* value); + Node* ChangeInt32ToInt64(Node* value); Reduction ReplaceBool(bool value) { return ReplaceInt32(value ? 1 : 0); } Reduction ReplaceFloat32(float value) { @@ -83,6 +98,9 @@ class V8_EXPORT_PRIVATE MachineOperatorReducer final Reduction ReplaceInt64(int64_t value) { return Replace(Int64Constant(value)); } + Reduction ReplaceUint64(uint64_t value) { + return Replace(Uint64Constant(value)); + } Reduction ReduceInt32Add(Node* node); Reduction ReduceInt64Add(Node* node); @@ -90,9 +108,13 @@ class V8_EXPORT_PRIVATE MachineOperatorReducer final Reduction ReduceInt64Sub(Node* node); Reduction ReduceInt64Mul(Node* node); Reduction ReduceInt32Div(Node* node); + Reduction ReduceInt64Div(Node* node); Reduction ReduceUint32Div(Node* node); + Reduction ReduceUint64Div(Node* node); Reduction ReduceInt32Mod(Node* node); + Reduction ReduceInt64Mod(Node* node); Reduction ReduceUint32Mod(Node* node); + Reduction ReduceUint64Mod(Node* node); Reduction ReduceStore(Node* node); Reduction ReduceProjection(size_t index, Node* node); const Operator* Map64To32Comparison(const Operator* op, bool sign_extended); @@ -160,7 +182,7 @@ class V8_EXPORT_PRIVATE MachineOperatorReducer final Node* lhs, uintN_t rhs); MachineGraph* mcgraph_; - bool allow_signalling_nan_; + SignallingNanPropagation signalling_nan_propagation_; }; } // namespace compiler |