Skip to content

Implement multi-tier compilation framework #1302

@wenyongh

Description

@wenyongh

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:

  1. Tier-up from Fast JIT to LLVM JIT to gain quick startup and better performance

Compilation Strategies

There are some possible strategies:

  1. Similar to current LLVM Orc Lazy JIT's strategy
    Main thread Lazy JIT compilation + Backend threads eager compilation

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new featureDetermine if this Issue request a new feature or this PR introduces a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions