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

Commit8583b1f

Browse files
committed
Run LLVM verify pass on IR in assert builds.
The problem fixed by commit53c8d6c would have been noticed if we'dbeen running LLVM's verify pass on generated IR. Doing so also revealsa complaint about incorrect name mangling, fixed here. Only enabled forLLVM 17+ because it uses the new pass manager API.Suggested-by: Dmitry Dolgov <9erthalion6@gmail.com>Discussion:https://postgr.es/m/CAFj8pRACpVFr7LMdVYENUkScG5FCYMZDDdSGNU-tch%2Bw98OxYg%40mail.gmail.com
1 parent9165134 commit8583b1f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,11 @@ llvm_optimize_module(LLVMJitContext *context, LLVMModuleRef module)
714714
LLVMPassBuilderOptionsSetDebugLogging(options,1);
715715
#endif
716716

717+
/* In assertion builds, run the LLVM verify pass. */
718+
#ifdefUSE_ASSERT_CHECKING
719+
LLVMPassBuilderOptionsSetVerifyEach(options, true);
720+
#endif
721+
717722
LLVMPassBuilderOptionsSetInlinerThreshold(options,512);
718723

719724
err=LLVMRunPasses(module,passes,NULL,options);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,7 @@ create_LifetimeEnd(LLVMModuleRef mod)
27652765
LLVMContextReflc;
27662766

27672767
/* variadic pointer argument */
2768-
constchar*nm="llvm.lifetime.end.p0i8";
2768+
constchar*nm="llvm.lifetime.end.p0";
27692769

27702770
fn=LLVMGetNamedFunction(mod,nm);
27712771
if (fn)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp