Commit b178c090 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Further relax JSFunction dependency

... by only depending on "relevant" results for predicates.

Bug: v8:7790, v8:12173
Change-Id: I60b33a3a05197ca7e6d6a36e85c63fd7a48ee931
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3143994Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76686}
parent fa2eb617
......@@ -2756,15 +2756,34 @@ HEAP_BROKER_OBJECT_LIST(V)
return data()->AsJSFunction()->Name(); \
}
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C(bool, has_feedback_vector,
JSFunctionData::kHasFeedbackVector)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C(bool, has_initial_map,
JSFunctionData::kHasInitialMap)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C(bool, has_instance_prototype,
JSFunctionData::kHasInstancePrototype)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C(
// Like JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C but only depend on the
// field in question if its recorded value is "relevant". This is in order to
// tolerate certain state changes during compilation, e.g. from "has no feedback
// vector" (in which case we would simply do less optimization) to "has feedback
// vector".
#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C( \
Result, Name, UsedField, RelevantValue) \
Result JSFunctionRef::Name(CompilationDependencies* dependencies) const { \
IF_ACCESS_FROM_HEAP_C(Name); \
Result const result = data()->AsJSFunction()->Name(); \
if (result == RelevantValue) { \
RecordConsistentJSFunctionViewDependencyIfNeeded( \
broker(), *this, data()->AsJSFunction(), UsedField); \
} \
return result; \
}
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C(
bool, has_feedback_vector, JSFunctionData::kHasFeedbackVector, true)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C(bool, has_initial_map,
JSFunctionData::kHasInitialMap,
true)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C(
bool, has_instance_prototype, JSFunctionData::kHasInstancePrototype, true)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C(
bool, PrototypeRequiresRuntimeLookup,
JSFunctionData::kPrototypeRequiresRuntimeLookup)
JSFunctionData::kPrototypeRequiresRuntimeLookup, false)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP(Map, initial_map,
JSFunctionData::kInitialMap)
JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP(Object, instance_prototype,
......
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