Commit 03aaa4b3 authored by Mythri A's avatar Mythri A Committed by Commit Bot

[TurboFan] Don't run child serializer if inlining is turned off

TurboFan serializes the callee functions when concurrent inlining is
turned on. However, if inlining itself is turned off (for ex: TurboProp)
we don't need to serialize these functions reducing time spent on
main thread.

Bug: v8:9684
Change-Id: If4aba1deb64188e411d4f82b27c475ea93a15344
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1932375Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65157}
parent 94e21dea
......@@ -1431,6 +1431,9 @@ struct SerializationPhase {
flags |=
SerializerForBackgroundCompilationFlag::kAnalyzeEnvironmentLiveness;
}
if (data->info()->is_inlining_enabled()) {
flags |= SerializerForBackgroundCompilationFlag::kEnableTurboInlining;
}
RunSerializerForBackgroundCompilation(
data->zone_stats(), data->broker(), data->dependencies(),
data->info()->closure(), flags, data->info()->osr_offset());
......
......@@ -1969,7 +1969,9 @@ void SerializerForBackgroundCompilation::ProcessCalleeForCallOrConstruct(
ProcessBuiltinCall(shared, new_target, arguments, speculation_mode, padding,
result_hints);
DCHECK_NE(shared->GetInlineability(), SharedFunctionInfo::kIsInlineable);
} else if (shared->GetInlineability() == SharedFunctionInfo::kIsInlineable &&
} else if ((flags() &
SerializerForBackgroundCompilationFlag::kEnableTurboInlining) &&
shared->GetInlineability() == SharedFunctionInfo::kIsInlineable &&
callee.HasFeedbackVector()) {
CompilationSubject subject =
callee.ToCompilationSubject(broker()->isolate(), zone());
......
......@@ -23,6 +23,7 @@ enum class SerializerForBackgroundCompilationFlag : uint8_t {
kBailoutOnUninitialized = 1 << 0,
kCollectSourcePositions = 1 << 1,
kAnalyzeEnvironmentLiveness = 1 << 2,
kEnableTurboInlining = 1 << 3,
};
using SerializerForBackgroundCompilationFlags =
base::Flags<SerializerForBackgroundCompilationFlag>;
......
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