Bug 250052 - Pass core WebAssembly spec tests on ARM64 with single-pass WebAssembly baseline JIT
Summary: Pass core WebAssembly spec tests on ARM64 with single-pass WebAssembly baseli...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Degazio
URL:
Keywords: InRadar
Depends on:
Blocks: 252209
  Show dependency treegraph
 
Reported: 2023-01-03 16:31 PST by David Degazio
Modified: 2023-02-14 09:04 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Degazio 2023-01-03 16:31:46 PST
rdar://100332177

The current default WebAssembly baseline JIT is based on emitting Air instructions. This is a moderate compile-time improvement over emitting B3, but still isn't very fast and generates relatively inefficient code. WebAssembly should lend itself relatively well to faster and simpler compilation methods, and we should be able to improve both startup speeds and generated code quality in the baseline JIT by transitioning to a single-pass baseline compiler.

Core design principles:
 - Don't waste time generating an IR, emit instructions directly.
 - Generate decent but not optimized code. We can do better than spilling everything to stack slots, but we shouldn't do liveness analysis or optimization passes.
 - Emphasize compilation speed via efficient data structures and straightforward code generation.
Comment 1 David Degazio 2023-01-03 17:01:12 PST
Pull request: https://github.com/WebKit/WebKit/pull/8175
Comment 2 David Degazio 2023-02-13 15:58:49 PST
rdar://105421077
Comment 3 David Degazio 2023-02-13 16:31:16 PST
Renaming this patch to better reflect its state as the initial commit of the new single-pass BBQ JIT, not the entire feature. Since it's a pretty large project, the plan is to land this initial partially-complete version behind the `--useSinglePassBBQJIT` flag, disabled by default.

The new compiler currently passes all the core spec tests (`JSTests/wasm/spec-tests`) on ARM64, but not necessarily on other platforms. It's pretty unstable still, and is missing support for some critical features like SIMD, try/catch, and OSR entry/exit. We'll split these out into separate patches.

Since this bug now reflects the initial patch specifically, I've filed a separate bug (https://bugs.webkit.org/show_bug.cgi?id=252209) to represent the top-level feature.
Comment 4 EWS 2023-02-14 09:04:20 PST
Committed 260260@main (46375fbc5a67): <https://commits.webkit.org/260260@main>

Reviewed commits have been landed. Closing PR #8175 and removing active labels.