Commit 52dbefd6 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Remove some obsolete serialization calls

Bug: v8:7790
Change-Id: I774601b25f4dbe104875d18c03e17244efc1a0e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1718157Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62915}
parent b50ee58c
...@@ -527,27 +527,19 @@ Reduction JSCallReducer::ReduceFunctionPrototypeBind(Node* node) { ...@@ -527,27 +527,19 @@ Reduction JSCallReducer::ReduceFunctionPrototypeBind(Node* node) {
MapRef first_receiver_map(broker(), receiver_maps[0]); MapRef first_receiver_map(broker(), receiver_maps[0]);
bool const is_constructor = first_receiver_map.is_constructor(); bool const is_constructor = first_receiver_map.is_constructor();
if (FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining && !first_receiver_map.serialized_prototype()) {
if (!first_receiver_map.serialized_prototype()) { TRACE_BROKER_MISSING(broker(),
TRACE_BROKER_MISSING( "serialized prototype on map " << first_receiver_map);
broker(), "serialized prototype on map " << first_receiver_map); return inference.NoChange();
return inference.NoChange();
}
} else {
first_receiver_map.SerializePrototype();
} }
ObjectRef const prototype = first_receiver_map.prototype(); ObjectRef const prototype = first_receiver_map.prototype();
for (Handle<Map> const map : receiver_maps) { for (Handle<Map> const map : receiver_maps) {
MapRef receiver_map(broker(), map); MapRef receiver_map(broker(), map);
if (FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining && !receiver_map.serialized_prototype()) {
if (!receiver_map.serialized_prototype()) { TRACE_BROKER_MISSING(broker(),
TRACE_BROKER_MISSING(broker(), "serialized prototype on map " << receiver_map);
"serialized prototype on map " << receiver_map); return inference.NoChange();
return inference.NoChange();
}
} else {
receiver_map.SerializePrototype();
} }
// Check for consistency among the {receiver_maps}. // Check for consistency among the {receiver_maps}.
...@@ -5987,9 +5979,7 @@ bool JSCallReducer::DoPromiseChecks(MapInference* inference) { ...@@ -5987,9 +5979,7 @@ bool JSCallReducer::DoPromiseChecks(MapInference* inference) {
for (Handle<Map> map : receiver_maps) { for (Handle<Map> map : receiver_maps) {
MapRef receiver_map(broker(), map); MapRef receiver_map(broker(), map);
if (!receiver_map.IsJSPromiseMap()) return false; if (!receiver_map.IsJSPromiseMap()) return false;
if (!FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining && !receiver_map.serialized_prototype()) {
receiver_map.SerializePrototype();
} else if (!receiver_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(), "prototype for map " << receiver_map); TRACE_BROKER_MISSING(broker(), "prototype for map " << receiver_map);
return false; return false;
} }
...@@ -7205,12 +7195,7 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node) { ...@@ -7205,12 +7195,7 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node) {
ZoneVector<PropertyAccessInfo> access_infos(graph()->zone()); ZoneVector<PropertyAccessInfo> access_infos(graph()->zone());
AccessInfoFactory access_info_factory(broker(), dependencies(), AccessInfoFactory access_info_factory(broker(), dependencies(),
graph()->zone()); graph()->zone());
if (!FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining) {
// Compute property access info for "exec" on {resolution}.
access_info_factory.ComputePropertyAccessInfos(
MapHandles(regexp_maps.begin(), regexp_maps.end()),
factory()->exec_string(), AccessMode::kLoad, &access_infos);
} else {
// Obtain precomputed access infos from the broker. // Obtain precomputed access infos from the broker.
for (auto map : regexp_maps) { for (auto map : regexp_maps) {
MapRef map_ref(broker(), map); MapRef map_ref(broker(), map);
...@@ -7218,6 +7203,11 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node) { ...@@ -7218,6 +7203,11 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node) {
broker()->GetAccessInfoForLoadingExec(map_ref); broker()->GetAccessInfoForLoadingExec(map_ref);
access_infos.push_back(access_info); access_infos.push_back(access_info);
} }
} else {
// Compute property access info for "exec" on {resolution}.
access_info_factory.ComputePropertyAccessInfos(
MapHandles(regexp_maps.begin(), regexp_maps.end()),
factory()->exec_string(), AccessMode::kLoad, &access_infos);
} }
PropertyAccessInfo ai_exec = PropertyAccessInfo ai_exec =
......
...@@ -427,12 +427,11 @@ Reduction JSInliner::ReduceJSCall(Node* node) { ...@@ -427,12 +427,11 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
Node* context; Node* context;
FeedbackVectorRef feedback_vector = DetermineCallContext(node, context); FeedbackVectorRef feedback_vector = DetermineCallContext(node, context);
if (FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining &&
if (!shared_info.value().IsSerializedForCompilation(feedback_vector)) { !shared_info.value().IsSerializedForCompilation(feedback_vector)) {
TRACE("Missed opportunity to inline a function (" TRACE("Missed opportunity to inline a function ("
<< *shared_info << " with " << feedback_vector << ")"); << *shared_info << " with " << feedback_vector << ")");
return NoChange(); return NoChange();
}
} }
// ---------------------------------------------------------------- // ----------------------------------------------------------------
......
...@@ -360,9 +360,7 @@ Reduction JSNativeContextSpecialization::ReduceJSGetSuperConstructor( ...@@ -360,9 +360,7 @@ Reduction JSNativeContextSpecialization::ReduceJSGetSuperConstructor(
if (!m.HasValue()) return NoChange(); if (!m.HasValue()) return NoChange();
JSFunctionRef function = m.Ref(broker()).AsJSFunction(); JSFunctionRef function = m.Ref(broker()).AsJSFunction();
MapRef function_map = function.map(); MapRef function_map = function.map();
if (!FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining && !function_map.serialized_prototype()) {
function_map.SerializePrototype();
} else if (!function_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(), "data for map " << function_map); TRACE_BROKER_MISSING(broker(), "data for map " << function_map);
return NoChange(); return NoChange();
} }
...@@ -1331,9 +1329,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) { ...@@ -1331,9 +1329,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) {
name.equals(ObjectRef(broker(), factory()->prototype_string()))) { name.equals(ObjectRef(broker(), factory()->prototype_string()))) {
// Optimize "prototype" property of functions. // Optimize "prototype" property of functions.
JSFunctionRef function = object.AsJSFunction(); JSFunctionRef function = object.AsJSFunction();
if (!FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining && !function.serialized()) {
function.Serialize();
} else if (!function.serialized()) {
TRACE_BROKER_MISSING(broker(), "data for function " << function); TRACE_BROKER_MISSING(broker(), "data for function " << function);
return NoChange(); return NoChange();
} }
...@@ -1513,9 +1509,7 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess( ...@@ -1513,9 +1509,7 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
base::Optional<JSTypedArrayRef> typed_array = base::Optional<JSTypedArrayRef> typed_array =
GetTypedArrayConstant(broker(), receiver); GetTypedArrayConstant(broker(), receiver);
if (typed_array.has_value()) { if (typed_array.has_value()) {
if (!FLAG_concurrent_inlining) { if (FLAG_concurrent_inlining && !typed_array->serialized()) {
typed_array->Serialize();
} else if (!typed_array->serialized()) {
TRACE_BROKER_MISSING(broker(), "data for typed array " << *typed_array); TRACE_BROKER_MISSING(broker(), "data for typed array " << *typed_array);
return NoChange(); return NoChange();
} }
...@@ -3195,7 +3189,6 @@ bool JSNativeContextSpecialization::CanTreatHoleAsUndefined( ...@@ -3195,7 +3189,6 @@ bool JSNativeContextSpecialization::CanTreatHoleAsUndefined(
// native contexts, as the global Array protector works isolate-wide). // native contexts, as the global Array protector works isolate-wide).
for (Handle<Map> map : receiver_maps) { for (Handle<Map> map : receiver_maps) {
MapRef receiver_map(broker(), map); MapRef receiver_map(broker(), map);
if (!FLAG_concurrent_inlining) receiver_map.SerializePrototype();
ObjectRef receiver_prototype = receiver_map.prototype(); ObjectRef receiver_prototype = receiver_map.prototype();
if (!receiver_prototype.IsJSObject() || if (!receiver_prototype.IsJSObject() ||
!broker()->IsArrayOrObjectPrototype(receiver_prototype.AsJSObject())) { !broker()->IsArrayOrObjectPrototype(receiver_prototype.AsJSObject())) {
......
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