Commit febd37b1 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[nci] Allow OSR to NCI code in testing modes

In the --turbo-nci-as-highest-tier testing mode, allow NCI codegen for
OSR to increase coverage and simplify logic.

Bug: v8:8888
Change-Id: I254939928f92bf675dbf2b78cdd5b5dce802d972
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339460
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69262}
parent 850739bb
...@@ -1037,10 +1037,8 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function, ...@@ -1037,10 +1037,8 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
DCHECK(shared->is_compiled()); DCHECK(shared->is_compiled());
function->feedback_vector().set_profiler_ticks(0); function->feedback_vector().set_profiler_ticks(0);
if (CodeKindIsNativeContextIndependentJSFunction(code_kind)) { if (CodeKindIsNativeContextIndependentJSFunction(code_kind) &&
// We don't generate NCI code for OSR. osr_offset == BailoutId::None()) {
DCHECK_EQ(osr_offset, BailoutId::None());
// Don't generate NCI code when we've already done so in the past. // Don't generate NCI code when we've already done so in the past.
Handle<Code> cached_code; Handle<Code> cached_code;
if (GetCodeFromCompilationCache(isolate, shared).ToHandle(&cached_code)) { if (GetCodeFromCompilationCache(isolate, shared).ToHandle(&cached_code)) {
...@@ -2902,7 +2900,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCodeForOSR(Handle<JSFunction> function, ...@@ -2902,7 +2900,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCodeForOSR(Handle<JSFunction> function,
DCHECK(!osr_offset.IsNone()); DCHECK(!osr_offset.IsNone());
DCHECK_NOT_NULL(osr_frame); DCHECK_NOT_NULL(osr_frame);
return GetOptimizedCode(function, ConcurrencyMode::kNotConcurrent, return GetOptimizedCode(function, ConcurrencyMode::kNotConcurrent,
CodeKindForOSR(), osr_offset, osr_frame); CodeKindForTopTier(), osr_offset, osr_frame);
} }
// static // static
......
...@@ -72,8 +72,6 @@ inline CodeKind CodeKindForTopTier() { ...@@ -72,8 +72,6 @@ inline CodeKind CodeKindForTopTier() {
: CodeKind::OPTIMIZED_FUNCTION; : CodeKind::OPTIMIZED_FUNCTION;
} }
inline CodeKind CodeKindForOSR() { return CodeKind::OPTIMIZED_FUNCTION; }
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
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