Skip to content

Commit

Permalink
Revert of [turbofan] Less aggressively insert SOFT deopts for propert…
Browse files Browse the repository at this point in the history
…y access. (patchset crosswalk-project#2 id:20001 of https://codereview.chromium.org/2746013002/ )

Reason for revert:
Tanks Octane/Mandreel and Octane/MandreelLatency.

Original issue's description:
> [turbofan] Less aggressively insert SOFT deopts for property access.
>
> Sometimes TurboFan is able to extract receiver maps from the surrounding
> graph and thus is able to generate reasonable code for property accesses,
> even if those haven't been executed in the baseline tier yet. So, only
> stick in an SOFT deoptimization exit, if ExtractReceiverMaps failed to
> infer proper receiver maps.
>
> R=yangguo@chromium.org
> BUG=v8:5267
>
> Review-Url: https://codereview.chromium.org/2746013002
> Cr-Commit-Position: refs/heads/master@{#43736}
> Committed: https://chromium.googlesource.com/v8/v8/+/b8453628c94ddf71e05d70471355c7c924bbcf31

TBR=yangguo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2748663002
Cr-Commit-Position: refs/heads/master@{#43743}
  • Loading branch information
bmeurer authored and Commit bot committed Mar 13, 2017
1 parent 326d4f4 commit 098f939
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions src/compiler/js-native-context-specialization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccess(
Object* maybe_constructor = receiver_map->GetConstructor();
// Detached global proxies have |null| as their constructor.
if (maybe_constructor->IsJSFunction() &&
JSFunction::cast(maybe_constructor)->has_context() &&
JSFunction::cast(maybe_constructor)->native_context() ==
*native_context()) {
return ReduceGlobalAccess(node, receiver, value, name, access_mode,
Expand Down Expand Up @@ -800,6 +799,17 @@ Reduction JSNativeContextSpecialization::ReduceNamedAccessFromNexus(
}
}

// Check if the {nexus} reports type feedback for the IC.
if (nexus.IsUninitialized()) {
if ((flags() & kDeoptimizationEnabled) &&
(flags() & kBailoutOnUninitialized)) {
return ReduceSoftDeoptimize(
node,
DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess);
}
return NoChange();
}

// Extract receiver maps from the IC using the {nexus}.
MapHandleList receiver_maps;
if (!ExtractReceiverMaps(receiver, effect, nexus, &receiver_maps)) {
Expand Down Expand Up @@ -1184,6 +1194,17 @@ Reduction JSNativeContextSpecialization::ReduceKeyedAccess(
}
}

// Check if the {nexus} reports type feedback for the IC.
if (nexus.IsUninitialized()) {
if ((flags() & kDeoptimizationEnabled) &&
(flags() & kBailoutOnUninitialized)) {
return ReduceSoftDeoptimize(
node,
DeoptimizeReason::kInsufficientTypeFeedbackForGenericKeyedAccess);
}
return NoChange();
}

// Extract receiver maps from the {nexus}.
MapHandleList receiver_maps;
if (!ExtractReceiverMaps(receiver, effect, nexus, &receiver_maps)) {
Expand Down Expand Up @@ -2229,10 +2250,7 @@ bool JSNativeContextSpecialization::ExtractReceiverMaps(
}
return true;
}
// Check if the {nexus} actually reports feedback for the IC. We return
// true if the IC is still uninitialized, which translates to a SOFT
// deoptimization exit in the callers.
return nexus.IsUninitialized();
return false;
}

bool JSNativeContextSpecialization::InferReceiverMaps(
Expand Down

0 comments on commit 098f939

Please sign in to comment.