Commit d1655841 authored by Manos Koukoutos's avatar Manos Koukoutos Committed by V8 LUCI CQ

[wasm] Do not fall back to Turbofan if --liftoff-only

If --liftoff-only is on, we should not execute Turbofan compilation, no
matter what the result of Liftoff compilation was. Right now, decoding
errors are considered bailouts, which make us fall back to Turbofan and
trigger a DCHECK.

Change-Id: Ic12591da256d92fb79578603d4778a3d2aa460ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3574555Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79865}
parent 4dc894b9
......@@ -109,7 +109,8 @@ WasmCompilationResult WasmCompilationUnit::ExecuteFunctionCompilation(
// them to be compiled for debugging, see documentation.
if (V8_LIKELY(FLAG_wasm_tier_mask_for_testing == 0) ||
func_index_ >= 32 ||
((FLAG_wasm_tier_mask_for_testing & (1 << func_index_)) == 0)) {
((FLAG_wasm_tier_mask_for_testing & (1 << func_index_)) == 0) ||
FLAG_liftoff_only) {
// We do not use the debug side table, we only (optionally) pass it to
// cover different code paths in Liftoff for testing.
std::unique_ptr<DebugSideTable> unused_debug_sidetable;
......@@ -127,6 +128,10 @@ WasmCompilationResult WasmCompilationUnit::ExecuteFunctionCompilation(
if (result.succeeded()) break;
}
// If --liftoff-only, do not fall back to turbofan, even if compilation
// failed.
if (FLAG_liftoff_only) break;
// If Liftoff failed, fall back to turbofan.
// TODO(wasm): We could actually stop or remove the tiering unit for this
// function to avoid compiling it twice with TurboFan.
......
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