diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc index 2fa4eb4fae..60996e1ae5 100644 --- a/src/compiler/js-typed-lowering.cc +++ b/src/compiler/js-typed-lowering.cc @@ -28,36 +28,32 @@ class JSBinopReduction final { : lowering_(lowering), node_(node) {} BinaryOperationHints::Hint GetNumberBinaryOperationFeedback() { - if (!(lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) || - !(lowering_->flags() & JSTypedLowering::kTypeFeedbackEnabled)) { - return BinaryOperationHints::kAny; - } - DCHECK_NE(0, node_->op()->ControlOutputCount()); - DCHECK_EQ(1, node_->op()->EffectOutputCount()); - DCHECK_LE(1, OperatorProperties::GetFrameStateInputCount(node_->op())); - BinaryOperationHints hints = BinaryOperationHintsOf(node_->op()); - BinaryOperationHints::Hint combined = hints.combined(); - if (combined == BinaryOperationHints::kSignedSmall || - combined == BinaryOperationHints::kSigned32 || - combined == BinaryOperationHints::kNumberOrOddball) { - return combined; + if (lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) { + DCHECK_NE(0, node_->op()->ControlOutputCount()); + DCHECK_EQ(1, node_->op()->EffectOutputCount()); + DCHECK_LE(1, OperatorProperties::GetFrameStateInputCount(node_->op())); + BinaryOperationHints hints = BinaryOperationHintsOf(node_->op()); + BinaryOperationHints::Hint combined = hints.combined(); + if (combined == BinaryOperationHints::kSignedSmall || + combined == BinaryOperationHints::kSigned32 || + combined == BinaryOperationHints::kNumberOrOddball) { + return combined; + } } return BinaryOperationHints::kAny; } CompareOperationHints::Hint GetNumberCompareOperationFeedback() { - if (!(lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) || - !(lowering_->flags() & JSTypedLowering::kTypeFeedbackEnabled)) { - return CompareOperationHints::kAny; - } - DCHECK_NE(0, node_->op()->ControlOutputCount()); - DCHECK_EQ(1, node_->op()->EffectOutputCount()); - DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node_->op())); - CompareOperationHints hints = CompareOperationHintsOf(node_->op()); - CompareOperationHints::Hint combined = hints.combined(); - if (combined == CompareOperationHints::kSignedSmall || - combined == CompareOperationHints::kNumberOrOddball) { - return combined; + if (lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) { + DCHECK_NE(0, node_->op()->ControlOutputCount()); + DCHECK_EQ(1, node_->op()->EffectOutputCount()); + DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node_->op())); + CompareOperationHints hints = CompareOperationHintsOf(node_->op()); + CompareOperationHints::Hint combined = hints.combined(); + if (combined == CompareOperationHints::kSignedSmall || + combined == CompareOperationHints::kNumberOrOddball) { + return combined; + } } return CompareOperationHints::kAny; } diff --git a/src/compiler/js-typed-lowering.h b/src/compiler/js-typed-lowering.h index 028ae0b3de..ba80024585 100644 --- a/src/compiler/js-typed-lowering.h +++ b/src/compiler/js-typed-lowering.h @@ -36,7 +36,6 @@ class JSTypedLowering final : public AdvancedReducer { kNoFlags = 0u, kDeoptimizationEnabled = 1u << 0, kDisableIntegerBinaryOpReduction = 1u << 1, - kTypeFeedbackEnabled = 1u << 2, }; typedef base::Flags Flags; diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc index 32d1cf9bb1..46c0fad205 100644 --- a/src/compiler/pipeline.cc +++ b/src/compiler/pipeline.cc @@ -887,9 +887,6 @@ struct TypedLoweringPhase { if (data->info()->is_optimizing_from_bytecode()) { typed_lowering_flags |= JSTypedLowering::kDisableIntegerBinaryOpReduction; } - if (data->info()->is_type_feedback_enabled()) { - typed_lowering_flags |= JSTypedLowering::kTypeFeedbackEnabled; - } JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), typed_lowering_flags, data->jsgraph(), temp_zone); diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc index 5128a3faba..1ed438117a 100644 --- a/test/unittests/compiler/js-typed-lowering-unittest.cc +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc @@ -87,9 +87,8 @@ class JSTypedLoweringTest : public TypedGraphTest { // TODO(titzer): mock the GraphReducer here for better unit testing. GraphReducer graph_reducer(zone(), graph()); JSTypedLowering reducer(&graph_reducer, &deps_, - JSTypedLowering::kDeoptimizationEnabled | - JSTypedLowering::kTypeFeedbackEnabled, - &jsgraph, zone()); + JSTypedLowering::kDeoptimizationEnabled, &jsgraph, + zone()); return reducer.Reduce(node); }