Bug 252209 - Implement single-pass baseline JIT for WebAssembly
Summary: Implement single-pass baseline JIT for WebAssembly
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: 250052 252433 252590 252605 252939 253286 253298
Blocks: 253188 253191 253192
  Show dependency treegraph
 
Reported: 2023-02-13 16:17 PST by David Degazio
Modified: 2023-03-03 10:49 PST (History)
2 users (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-02-13 16:17:01 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.

This is the parent bug for all subcomponents of this feature. The initial patch is tracked in https://bugs.webkit.org/show_bug.cgi?id=250052, and we'll make additional bugs to track additional features/fixes as needed.
Comment 1 David Degazio 2023-03-01 14:45:31 PST
Pull request: https://github.com/WebKit/WebKit/pull/10896
Comment 2 EWS 2023-03-03 10:49:07 PST
Committed 261153@main (e3f0b033dcf4): <https://commits.webkit.org/261153@main>

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