-
Notifications
You must be signed in to change notification settings - Fork 577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement multi-tier compilation framework #1302
Labels
new feature
New feature request
Comments
Merged
wenyongh
added a commit
that referenced
this issue
Oct 18, 2022
Refactor LLVM JIT for some purposes: - To simplify the source code of JIT compilation - To simplify the JIT modes - To align with LLVM latest changes - To prepare for the Multi-tier JIT compilation, refer to #1302 The changes mainly include: - Remove the MCJIT mode, replace it with ORC JIT eager mode - Remove the LLVM legacy pass manager (only keep the LLVM new pass manager) - Change the lazy mode's LLVM module/function binding: change each function in an individual LLVM module into all functions in a single LLVM module - Upgraded ORC JIT to ORCv2 JIT to enable lazy compilation Refer to #1468
wenyongh
added a commit
that referenced
this issue
Dec 19, 2022
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: #1302
wenyongh
added a commit
that referenced
this issue
Dec 19, 2022
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: #1302
wenyongh
added a commit
that referenced
this issue
Dec 19, 2022
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: #1302
wenyongh
added a commit
that referenced
this issue
Dec 20, 2022
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: #1302
NingW101
pushed a commit
to NingW101/wasm-micro-runtime
that referenced
this issue
Jan 11, 2023
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: bytecodealliance#1302
victoryang00
pushed a commit
to victoryang00/wamr-aot-gc-checkpoint-restore
that referenced
this issue
May 27, 2024
Refactor LLVM JIT for some purposes: - To simplify the source code of JIT compilation - To simplify the JIT modes - To align with LLVM latest changes - To prepare for the Multi-tier JIT compilation, refer to bytecodealliance#1302 The changes mainly include: - Remove the MCJIT mode, replace it with ORC JIT eager mode - Remove the LLVM legacy pass manager (only keep the LLVM new pass manager) - Change the lazy mode's LLVM module/function binding: change each function in an individual LLVM module into all functions in a single LLVM module - Upgraded ORC JIT to ORCv2 JIT to enable lazy compilation Refer to bytecodealliance#1468
victoryang00
pushed a commit
to victoryang00/wamr-aot-gc-checkpoint-restore
that referenced
this issue
May 27, 2024
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: bytecodealliance#1302
victoryang00
pushed a commit
to victoryang00/wamr-aot-gc-checkpoint-restore
that referenced
this issue
May 27, 2024
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to get quick cold startup by Fast JIT and better performance by gradually switching to LLVM JIT when the LLVM JIT functions are compiled by the backend threads. Refer to: bytecodealliance#1302
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Recently another lightweight JIT engine - Fast JIT was developed with quick startup, small footprint and relatively good performance:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/1292
To make it work together with LLVM JIT (Orc Lazy JIT), the multi-tier compilation framework is planned to be implemented:
Compilation Strategies
There are some possible strategies:
Similar to current LLVM Orc Lazy JIT's strategy
Main thread Lazy JIT compilation + Backend threads eager compilation
Similar to V8 JIT tier-up
Backend threads with eager compilation to compile all wasm functions with Fast JIT, wait until the compilation ends, then instantiate the wasm module and execute the wasm function. At the same time, launching LLVM JIT to compile wasm functions, and switching to LLVM JIT function gradually when executing.
The text was updated successfully, but these errors were encountered: