Implement call Fast JIT function from LLVM JIT jitted code (#1714)

Basically implement the Multi-tier JIT engine.
And update document and wamr-test-suites script.
This commit is contained in:
Wenyong Huang
2022-11-21 10:42:18 +08:00
committed by GitHub
parent 3daa512925
commit cf7b01ad82
20 changed files with 1775 additions and 221 deletions

View File

@ -18,6 +18,9 @@ typedef struct JitGlobals {
/* Compiler pass sequence, the last element must be 0 */
const uint8 *passes;
char *return_to_interp_from_jitted;
#if WASM_ENABLE_LAZY_JIT != 0
char *compile_fast_jit_and_then_call;
#endif
} JitGlobals;
/**
@ -87,8 +90,24 @@ jit_compiler_compile(WASMModule *module, uint32 func_idx);
bool
jit_compiler_compile_all(WASMModule *module);
bool
jit_compiler_is_compiled(const WASMModule *module, uint32 func_idx);
#if WASM_ENABLE_LAZY_JIT != 0 && WASM_ENABLE_JIT != 0
bool
jit_compiler_set_call_to_llvm_jit(WASMModule *module, uint32 func_idx);
bool
jit_compiler_set_call_to_fast_jit(WASMModule *module, uint32 func_idx);
void
jit_compiler_set_llvm_jit_func_ptr(WASMModule *module, uint32 func_idx,
void *func_ptr);
#endif
int
jit_interp_switch_to_jitted(void *self, JitInterpSwitchInfo *info, void *pc);
jit_interp_switch_to_jitted(void *self, JitInterpSwitchInfo *info,
uint32 func_idx, void *pc);
/*
* Pass declarations: