Commit 8cb73e04 authored by Ross McIlroy's avatar Ross McIlroy Committed by V8 LUCI CQ

[Turboprop] Avoid bailout on call optimizations in TurboProp.

As we push TurboProp's interrupt budget back, the deopt savings we get
from this aren't worth the runtime overhead in the generated code.

BUG=v8:9684

Change-Id: I6eeb941b25c13958f6b9ddf33439d7928af9b302
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2964813
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75172}
parent 7956f952
......@@ -502,11 +502,6 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo(
PropertyConstness constness;
if (details.IsReadOnly() && !details.IsConfigurable()) {
constness = PropertyConstness::kConst;
} else if (broker()->is_turboprop() && !map->is_prototype_map() &&
!IsAnyStore(access_mode)) {
// The constness feedback is too unstable for the aggresive compilation
// of turboprop.
constness = PropertyConstness::kMutable;
} else {
constness = dependencies()->DependOnFieldConstness(*map_ref, descriptor);
}
......
......@@ -4426,13 +4426,6 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) {
if (feedback_target.has_value() && feedback_target->map().is_callable()) {
Node* target_function = jsgraph()->Constant(*feedback_target);
if (broker()->is_turboprop()) {
if (!feedback_target->IsJSFunction()) return NoChange();
if (!IsBuiltinOrApiFunction(feedback_target->AsJSFunction())) {
return NoChange();
}
}
// Check that the {target} is still the {target_function}.
Node* check = graph()->NewNode(simplified()->ReferenceEqual(), target,
target_function);
......@@ -4459,11 +4452,6 @@ Reduction JSCallReducer::ReduceJSCall(Node* node) {
return NoChange();
}
if (broker()->is_turboprop() &&
!feedback_vector.shared_function_info().HasBuiltinId()) {
return NoChange();
}
Node* target_closure = effect =
graph()->NewNode(simplified()->CheckClosure(feedback_cell.object()),
target, effect, control);
......@@ -5312,10 +5300,6 @@ Reduction JSCallReducer::ReduceForInsufficientFeedback(
DCHECK(node->opcode() == IrOpcode::kJSCall ||
node->opcode() == IrOpcode::kJSConstruct);
if (!(flags() & kBailoutOnUninitialized)) return NoChange();
// TODO(mythria): May be add additional flags to specify if we need to deopt
// on calls / construct rather than checking for TurboProp here. We may need
// it for NativeContextIndependent code too.
if (broker()->is_turboprop()) return NoChange();
Node* effect = NodeProperties::GetEffectInput(node);
Node* control = NodeProperties::GetControlInput(node);
......
......@@ -567,13 +567,6 @@ Node* JSTypeHintLowering::TryBuildSoftDeopt(FeedbackSlot slot, Node* effect,
if (!(flags() & kBailoutOnUninitialized)) return nullptr;
FeedbackSource source(feedback_vector(), slot);
// TODO(mythria): Think of adding flags to specify if we need a soft deopt for
// calls instead of using broker()->is_turboprop() here.
if (broker()->is_turboprop() &&
broker()->GetFeedbackSlotKind(source) == FeedbackSlotKind::kCall) {
return nullptr;
}
if (!broker()->FeedbackIsInsufficient(source)) return nullptr;
Node* deoptimize = jsgraph()->graph()->NewNode(
......
......@@ -1122,10 +1122,6 @@ bool SerializerForBackgroundCompilation::BailoutOnUninitialized(
// OSR entry point. TODO(neis): Support OSR?
return false;
}
if (broker()->is_turboprop() &&
feedback.slot_kind() == FeedbackSlotKind::kCall) {
return false;
}
if (feedback.IsInsufficient()) {
environment()->Kill();
return true;
......
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