Enable aot compiler with llvm-14/15 (#1252)
Enable aot compiler and jit based on llvm-14.0 and llvm-15.0git, replace LLVMBuildLoad/LLVMBuildInBoundsGEP/LLVMBuildCall with LLVMBuildLoad2/LLVMBuildInBoundsGEP2/LLVMBuildCall2, and pass them with related types, so as to meet the requirements of opaque pointers. And fix several compilation errors for llvm-14.0/15.0git. Most spec cases and standalone cases are tested.
This commit is contained in:
@ -72,7 +72,8 @@ aot_compile_op_f32_const(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
aot_set_last_error("llvm build bitcast failed.");
|
||||
return false;
|
||||
}
|
||||
if (!(value = LLVMBuildLoad(comp_ctx->builder, alloca, ""))) {
|
||||
if (!(value =
|
||||
LLVMBuildLoad2(comp_ctx->builder, F32_TYPE, alloca, ""))) {
|
||||
aot_set_last_error("llvm build load failed.");
|
||||
return false;
|
||||
}
|
||||
@ -127,7 +128,8 @@ aot_compile_op_f64_const(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
aot_set_last_error("llvm build bitcast failed.");
|
||||
return false;
|
||||
}
|
||||
if (!(value = LLVMBuildLoad(comp_ctx->builder, alloca, ""))) {
|
||||
if (!(value =
|
||||
LLVMBuildLoad2(comp_ctx->builder, F64_TYPE, alloca, ""))) {
|
||||
aot_set_last_error("llvm build load failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user