Refine aot compiler check suspend_flags and fix issue of multi-tier jit (#2111)
In LLVM AOT/JIT compiler, only need to check the suspend_flags when memory is a shared memory since the shared memory must be enabled for multi-threading, so as not to impact the performance in non-multi-threading memory mode. Also refine the LLVM IRs to check the suspend_flags. And fix an issue of multi-tier jit for multi-threading, the instance of the child thread should be removed from the instance list before it is de-instantiated.
This commit is contained in:
@ -2178,7 +2178,7 @@ wasm_deinstantiate(WASMModuleInstance *module_inst, bool is_sub_inst)
|
||||
func_ptrs and fast_jit_func_ptrs of the instance, to avoid
|
||||
accessing the freed memory in the jit backend compilation
|
||||
threads */
|
||||
if (!is_sub_inst) {
|
||||
{
|
||||
WASMModule *module = module_inst->module;
|
||||
WASMModuleInstance *instance_prev = NULL, *instance;
|
||||
os_mutex_lock(&module->instance_list_lock);
|
||||
|
||||
Reference in New Issue
Block a user