Commit 46eba454 authored by epertoso's avatar epertoso Committed by Commit bot

[turbofan] Move lowering of Float64 optional operators to EffectControlLinearizer.

It's just a refactoring to avoid introducing new floating controls in the SimplifiedLowering phase.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2215183003
Cr-Commit-Position: refs/heads/master@{#38365}
parent 9d5e6129
This diff is collapsed.
...@@ -143,6 +143,14 @@ class EffectControlLinearizer { ...@@ -143,6 +143,14 @@ class EffectControlLinearizer {
ValueEffectControl LowerStoreTypedElement(Node* node, Node* effect, ValueEffectControl LowerStoreTypedElement(Node* node, Node* effect,
Node* control); Node* control);
// Lowering of optional operators.
ValueEffectControl LowerFloat64RoundUp(Node* node, Node* effect,
Node* control);
ValueEffectControl LowerFloat64RoundDown(Node* node, Node* effect,
Node* control);
ValueEffectControl LowerFloat64RoundTruncate(Node* node, Node* effect,
Node* control);
ValueEffectControl AllocateHeapNumberWithValue(Node* node, Node* effect, ValueEffectControl AllocateHeapNumberWithValue(Node* node, Node* effect,
Node* control); Node* control);
ValueEffectControl BuildCheckedFloat64ToInt32(CheckForMinusZeroMode mode, ValueEffectControl BuildCheckedFloat64ToInt32(CheckForMinusZeroMode mode,
......
...@@ -719,6 +719,8 @@ const Operator* RepresentationChanger::Float64OperatorFor( ...@@ -719,6 +719,8 @@ const Operator* RepresentationChanger::Float64OperatorFor(
return machine()->Float64Atan2(); return machine()->Float64Atan2();
case IrOpcode::kNumberCbrt: case IrOpcode::kNumberCbrt:
return machine()->Float64Cbrt(); return machine()->Float64Cbrt();
case IrOpcode::kNumberCeil:
return machine()->Float64RoundUp().placeholder();
case IrOpcode::kNumberCos: case IrOpcode::kNumberCos:
return machine()->Float64Cos(); return machine()->Float64Cos();
case IrOpcode::kNumberCosh: case IrOpcode::kNumberCosh:
...@@ -727,6 +729,8 @@ const Operator* RepresentationChanger::Float64OperatorFor( ...@@ -727,6 +729,8 @@ const Operator* RepresentationChanger::Float64OperatorFor(
return machine()->Float64Exp(); return machine()->Float64Exp();
case IrOpcode::kNumberExpm1: case IrOpcode::kNumberExpm1:
return machine()->Float64Expm1(); return machine()->Float64Expm1();
case IrOpcode::kNumberFloor:
return machine()->Float64RoundDown().placeholder();
case IrOpcode::kNumberFround: case IrOpcode::kNumberFround:
return machine()->TruncateFloat64ToFloat32(); return machine()->TruncateFloat64ToFloat32();
case IrOpcode::kNumberLog: case IrOpcode::kNumberLog:
...@@ -753,6 +757,8 @@ const Operator* RepresentationChanger::Float64OperatorFor( ...@@ -753,6 +757,8 @@ const Operator* RepresentationChanger::Float64OperatorFor(
return machine()->Float64Tan(); return machine()->Float64Tan();
case IrOpcode::kNumberTanh: case IrOpcode::kNumberTanh:
return machine()->Float64Tanh(); return machine()->Float64Tanh();
case IrOpcode::kNumberTrunc:
return machine()->Float64RoundTruncate().placeholder();
case IrOpcode::kNumberSilenceNaN: case IrOpcode::kNumberSilenceNaN:
return machine()->Float64SilenceNaN(); return machine()->Float64SilenceNaN();
default: default:
......
This diff is collapsed.
...@@ -60,11 +60,8 @@ class SimplifiedLowering final { ...@@ -60,11 +60,8 @@ class SimplifiedLowering final {
// position information via the SourcePositionWrapper like all other reducers. // position information via the SourcePositionWrapper like all other reducers.
SourcePositionTable* source_positions_; SourcePositionTable* source_positions_;
Node* Float64Ceil(Node* const node);
Node* Float64Floor(Node* const node);
Node* Float64Round(Node* const node); Node* Float64Round(Node* const node);
Node* Float64Sign(Node* const node); Node* Float64Sign(Node* const node);
Node* Float64Trunc(Node* const node);
Node* Int32Abs(Node* const node); Node* Int32Abs(Node* const node);
Node* Int32Div(Node* const node); Node* Int32Div(Node* const node);
Node* Int32Mod(Node* const node); Node* Int32Mod(Node* const node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment