Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4b9094e

Browse files
committed
Adapt to LLVM 7+ Orc API changes.
This is mostly done to be able to validate features and fixessubmitted to LLVM. Given the size of these changes that seemsacceptable.Author: Andres Freund
1 parent071371b commit4b9094e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

‎src/backend/jit/llvm/llvmjit.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -527,13 +527,17 @@ llvm_compile_module(LLVMJitContext *context)
527527
* faster instruction selection mechanism is used.
528528
*/
529529
INSTR_TIME_SET_CURRENT(starttime);
530-
#ifLLVM_VERSION_MAJOR<5
530+
#ifLLVM_VERSION_MAJOR>6
531531
{
532-
orc_handle=LLVMOrcAddEagerlyCompiledIR(compile_orc,context->module,
533-
llvm_resolve_symbol,NULL);
534-
LLVMDisposeModule(context->module);
532+
if (LLVMOrcAddEagerlyCompiledIR(compile_orc,&orc_handle,context->module,
533+
llvm_resolve_symbol,NULL))
534+
{
535+
elog(ERROR,"failed to JIT module");
536+
}
537+
538+
/* LLVMOrcAddEagerlyCompiledIR takes ownership of the module */
535539
}
536-
#else
540+
#elifLLVM_VERSION_MAJOR>4
537541
{
538542
LLVMSharedModuleRefsmod;
539543

@@ -545,6 +549,12 @@ llvm_compile_module(LLVMJitContext *context)
545549
}
546550
LLVMOrcDisposeSharedModuleRef(smod);
547551
}
552+
#else/* LLVM 4.0 and 3.9 */
553+
{
554+
orc_handle=LLVMOrcAddEagerlyCompiledIR(compile_orc,context->module,
555+
llvm_resolve_symbol,NULL);
556+
LLVMDisposeModule(context->module);
557+
}
548558
#endif
549559
INSTR_TIME_SET_CURRENT(endtime);
550560
INSTR_TIME_ACCUM_DIFF(context->base.emission_counter,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp