Commit c927137d authored by Jakob Linke's avatar Jakob Linke Committed by V8 LUCI CQ

[maglev] Abort compilation when deps fail to install

.. and allow recompilation attempts in the future. This roughly matches
Turbofan behavior, which also aborts and may later recompile.

Deps can fail e.g. when the heap state changes concurrently during the
compilation process.

Bug: v8:7700
Change-Id: I517adcca7ec5a7dff14b7ca7dba766e74564bd01
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3825778
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Auto-Submit: Jakob Linke <jgruber@chromium.org>
Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82376}
parent c5d48121
......@@ -633,9 +633,12 @@ MaybeHandle<CodeT> MaglevCompiler::GenerateCode(
return {};
}
compiler::JSHeapBroker* const broker = compilation_info->broker();
const bool deps_committed_successfully = broker->dependencies()->Commit(code);
CHECK(deps_committed_successfully);
if (!compilation_info->broker()->dependencies()->Commit(code)) {
// Don't `set_maglev_compilation_failed` s.t. we may reattempt compilation.
// TODO(v8:7700): Make this more robust, i.e.: don't recompile endlessly,
// and possibly attempt to recompile as early as possible.
return {};
}
if (FLAG_print_maglev_code) {
code->Print();
......
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