Refine AOT/JIT code call wasm-c-api import process (#2982)
Allow to invoke the quick call entry wasm_runtime_quick_invoke_c_api_import to call the wasm-c-api import functions to speedup the calling process, which reduces the data copying. Use `wamrc --invoke-c-api-import` to generate the optimized AOT code, and set `jit_options->quick_invoke_c_api_import` true in wasm_engine_new when LLVM JIT is enabled.
This commit is contained in:
@ -58,6 +58,7 @@ typedef struct AOTCompOption {
|
||||
bool disable_llvm_lto;
|
||||
bool enable_llvm_pgo;
|
||||
bool enable_stack_estimation;
|
||||
bool quick_invoke_c_api_import;
|
||||
char *use_prof_file;
|
||||
uint32_t opt_level;
|
||||
uint32_t size_level;
|
||||
|
||||
@ -417,6 +417,7 @@ struct wasm_ref_t;
|
||||
|
||||
typedef struct wasm_val_t {
|
||||
wasm_valkind_t kind;
|
||||
uint8_t __paddings[7];
|
||||
union {
|
||||
int32_t i32;
|
||||
int64_t i64;
|
||||
|
||||
@ -199,6 +199,7 @@ struct wasm_ref_t;
|
||||
|
||||
typedef struct wasm_val_t {
|
||||
wasm_valkind_t kind;
|
||||
uint8_t __paddings[7];
|
||||
union {
|
||||
/* also represent a function index */
|
||||
int32_t i32;
|
||||
|
||||
Reference in New Issue
Block a user