aot/jit: Set module layout (#2260)

LLVM 15 and later sometimes perform wrong optimizations without this.
This commit is contained in:
YAMAMOTO Takashi 2023-06-06 11:18:16 +09:00 committed by GitHub
parent e78f63c7ee
commit 5d69f364db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2165,6 +2165,7 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option)
aot_set_last_error("create LLVM target data layout failed.");
goto fail;
}
LLVMSetModuleDataLayout(comp_ctx->module, target_data_ref);
comp_ctx->pointer_size = LLVMPointerSize(target_data_ref);
LLVMDisposeTargetData(target_data_ref);