Implement Multi-tier JIT (#1774)
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: https://github.com/bytecodealliance/wasm-micro-runtime/issues/1302
This commit is contained in:
@ -85,6 +85,13 @@ if (NOT WAMR_BUILD_AOT EQUAL 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (WAMR_BUILD_FAST_JIT EQUAL 1)
|
||||
if (NOT WAMR_BUILD_LAZY_JIT EQUAL 0)
|
||||
# Enable Lazy JIT by default
|
||||
set (WAMR_BUILD_LAZY_JIT 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (WAMR_BUILD_JIT EQUAL 1)
|
||||
if (NOT WAMR_BUILD_LAZY_JIT EQUAL 0)
|
||||
# Enable Lazy JIT by default
|
||||
@ -136,7 +143,12 @@ else ()
|
||||
message (" WAMR AOT disabled")
|
||||
endif ()
|
||||
if (WAMR_BUILD_FAST_JIT EQUAL 1)
|
||||
message (" WAMR Fast JIT enabled")
|
||||
if (WAMR_BUILD_LAZY_JIT EQUAL 1)
|
||||
add_definitions("-DWASM_ENABLE_LAZY_JIT=1")
|
||||
message (" WAMR Fast JIT enabled with Lazy Compilation")
|
||||
else ()
|
||||
message (" WAMR Fast JIT enabled with Eager Compilation")
|
||||
endif ()
|
||||
else ()
|
||||
message (" WAMR Fast JIT disabled")
|
||||
endif ()
|
||||
@ -151,6 +163,10 @@ if (WAMR_BUILD_JIT EQUAL 1)
|
||||
else ()
|
||||
message (" WAMR LLVM ORC JIT disabled")
|
||||
endif ()
|
||||
if (WAMR_BUILD_FAST_JIT EQUAL 1 AND WAMR_BUILD_JIT EQUAL 1
|
||||
AND WAMR_BUILD_LAZY_JIT EQUAL 1)
|
||||
message (" Multi-tier JIT enabled")
|
||||
endif ()
|
||||
if (WAMR_BUILD_LIBC_BUILTIN EQUAL 1)
|
||||
message (" Libc builtin enabled")
|
||||
else ()
|
||||
|
||||
Reference in New Issue
Block a user