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

[nojit] Add a few flag implications based on --jitless

--jitless -> --no-opt
          -> --no-validate-asm
          -> --wasm-interpret-all -> --no-asm-wasm-lazy-compilation
                                  -> --no-wasm-lazy-compilation

Note that wasm still isn't supported in jitless mode since it generates
code at runtime even with --wasm-interpret-all.

Drive-by: Fail early when trying to compile irregexp code in jitless
mode.

Cq-Include-Trybots: luci.v8.try:v8_linux_arm_lite_rel_ng
Bug: v8:7777
Change-Id: I7f0421f71efeaaeb030ed9ec268d12a659667acf
Reviewed-on: https://chromium-review.googlesource.com/c/1406677Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58820}
parent a16c1250
......@@ -1152,6 +1152,19 @@ DEFINE_SIZE_T(mock_arraybuffer_allocator_limit, 0,
DEFINE_BOOL(jitless, V8_LITE_BOOL,
"Disable runtime allocation of executable memory.")
// Jitless V8 has a few implications:
#ifndef V8_LITE_MODE
// Optimizations (i.e. jitting) are disabled.
DEFINE_NEG_IMPLICATION(jitless, opt)
#endif
// asm.js validation is disabled since it triggers wasm code generation.
DEFINE_NEG_IMPLICATION(jitless, validate_asm)
// Wasm is put into interpreter-only mode. We repeat flag implications down
// here to ensure they're applied correctly by setting the --jitless flag.
DEFINE_IMPLICATION(jitless, wasm_interpret_all)
DEFINE_NEG_IMPLICATION(jitless, asm_wasm_lazy_compilation)
DEFINE_NEG_IMPLICATION(jitless, wasm_lazy_compilation)
// Enable recompilation of function with optimized code.
DEFINE_BOOL(opt, !V8_LITE_BOOL, "use adaptive optimizations")
......
......@@ -6699,6 +6699,8 @@ RegExpEngine::CompilationResult RegExpEngine::Compile(
// Create the correct assembler for the architecture.
#ifndef V8_INTERPRETED_REGEXP
DCHECK(!FLAG_jitless);
// Native regexp implementation.
NativeRegExpMacroAssembler::Mode mode =
......
......@@ -196,5 +196,18 @@ TEST(FlagsRemoveIncomplete) {
CHECK_EQ(2, argc);
}
TEST(FlagsJitlessImplications) {
if (FLAG_jitless) {
// Double-check implications work as expected. Our implication system is
// fairly primitive and can break easily depending on the implication
// definition order in flag-definitions.h.
CHECK(!FLAG_opt);
CHECK(!FLAG_validate_asm);
CHECK(FLAG_wasm_interpret_all);
CHECK(!FLAG_asm_wasm_lazy_compilation);
CHECK(!FLAG_wasm_lazy_compilation);
}
}
} // namespace internal
} // namespace v8
......@@ -126,7 +126,6 @@
##############################################################################
['lite_mode', {
# TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
'asm-*': [SKIP],
'debug/wasm/*': [SKIP],
'wasm-*': [SKIP],
}], # lite_mode
......
......@@ -8,6 +8,7 @@
['lite_mode', {
# TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
'multi_return/*': [SKIP],
'wasm_async/*': [SKIP],
'wasm_compile/*': [SKIP],
}], # lite_mode
......
......@@ -44,7 +44,9 @@
'type-profiler/type-profile-disable': [SKIP],
# TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
'debugger/asm-*': [SKIP],
'debugger/asm-js-stack': [SKIP],
'debugger/asm-js-breakpoint-before-exec': [SKIP],
'debugger/asm-js-breakpoint-during-exec': [SKIP],
'debugger/wasm-*': [SKIP],
}], # 'lite_mode'
......
......@@ -58,6 +58,9 @@
# TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
'fail/wasm-*': [SKIP],
'wasm-*': [SKIP],
# Test output requires --validate-asm, which is disabled in jitless mode.
'asm-*': [SKIP],
}], # lite_mode
]
......@@ -350,35 +350,35 @@
'spread-large-array': [SKIP],
# TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
'asm/*': [SKIP],
'regress/wasm/*': [SKIP],
'tools/compiler-trace-flags': [SKIP],
'wasm/*': [SKIP],
# Other tests that use asm / wasm / optimized code.
'compiler/regress-439743': [SKIP],
'asm/asm-heap': [SKIP],
'asm/asm-validation': [SKIP],
'asm/call-stdlib': [SKIP],
'asm/call-annotation': [SKIP],
'asm/global-imports': [SKIP],
'asm/regress-913822': [SKIP],
'asm/return-types': [SKIP],
'regress/regress-599719': [SKIP],
'regress/regress-6196': [SKIP],
'regress/regress-6700': [SKIP],
'regress/regress-670808': [SKIP],
'regress/regress-677685': [SKIP],
'regress/regress-6838-2': [SKIP],
'regress/regress-6838-3': [SKIP],
'regress/regress-799690': [SKIP],
# Timeouts in lite / jitless mode.
'asm/embenchen/*': [SKIP],
# Tests that generate code at runtime.
'code-comments': [SKIP],
'regress/regress-441099': [SKIP],
'regress/regress-617526': [SKIP],
'regress/regress-618608': [SKIP],
'regress/regress-673241': [SKIP],
'regress/regress-673297': [SKIP],
'regress/regress-7893': [SKIP],
'regress/regress-8377': [SKIP],
'regress/regress-863810': [SKIP],
'regress/regress-crbug-721835': [SKIP],
'regress/regress-crbug-759327': [SKIP],
'regress/regress-crbug-762472': [SKIP],
'regress/regress-crbug-898974': [SKIP],
}], # 'lite_mode'
......
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