Commit 52e507be authored by Mythri A's avatar Mythri A Committed by Commit Bot

[turboprop] Use Turboprop for OSR compilations

OSR compilations happen on main thread and the functions that are called
from would have been already optimized. Also this code is only used for
this invocation. So to limit the amount of time spent on main thread
we could do a quick Turboprop compilation instead of a highly optimized
TurboFan compilaiton.

Change-Id: Ifcdcb5c855d8a9a56b13c1940b4ee0ed3bfb4d67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659257
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72505}
parent ca189896
......@@ -3009,7 +3009,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCodeForOSR(Handle<JSFunction> function,
DCHECK(!osr_offset.IsNone());
DCHECK_NOT_NULL(osr_frame);
return GetOptimizedCode(function, ConcurrencyMode::kNotConcurrent,
CodeKindForTopTier(), osr_offset, osr_frame);
CodeKindForOSR(), osr_offset, osr_frame);
}
// static
......
......@@ -121,6 +121,13 @@ inline CodeKind CodeKindForTopTier() {
return CodeKind::TURBOFAN;
}
inline CodeKind CodeKindForOSR() {
if (V8_UNLIKELY(FLAG_turboprop)) {
return CodeKind::TURBOPROP;
}
return CodeKind::TURBOFAN;
}
// The dedicated CodeKindFlag enum represents all code kinds in a format
// suitable for bit sets.
enum class CodeKindFlag {
......
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