Bug 252209

Summary: Implement single-pass baseline JIT for WebAssembly
Product: WebKit Reporter: David Degazio <d_degazio>
Component: WebAssemblyAssignee: David Degazio <d_degazio>
Status: RESOLVED FIXED    
Severity: Normal CC: angelos, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 250052, 252433, 252590, 252605, 252939, 253286, 253298    
Bug Blocks: 253188, 253191, 253192    

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.