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

Commit27b57f8

Browse files
committed
jit: Correct parameter type for generated expression evaluation functions.
clang only uses the 'i1' type for scalar booleans, not for pointers tobooleans (as the pointer might be pointing into a larger memoryallocation). Therefore a pointer-to-bool needs to the "storage" boolean.There's no known case of wrong code generation due to this, but it seems quitepossible that it could cause problems (see e.g.7255943).Author: Andres FreundDiscussion:https://postgr.es/m/20201207212142.wz5tnbk2jsaqzogb@alap3.anarazel.deBackpatch: 11-, where jit support was added
1 parentb07490b commit27b57f8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ llvm_compile_expr(ExprState *state)
151151

152152
param_types[0]=l_ptr(StructExprState);/* state */
153153
param_types[1]=l_ptr(StructExprContext);/* econtext */
154-
param_types[2]=l_ptr(TypeParamBool);/* isnull */
154+
param_types[2]=l_ptr(TypeStorageBool);/* isnull */
155155

156156
eval_sig=LLVMFunctionType(TypeSizeT,
157157
param_types,lengthof(param_types),
@@ -258,8 +258,6 @@ llvm_compile_expr(ExprState *state)
258258

259259
v_tmpvalue=LLVMBuildLoad(b,v_tmpvaluep,"");
260260
v_tmpisnull=LLVMBuildLoad(b,v_tmpisnullp,"");
261-
v_tmpisnull=
262-
LLVMBuildTrunc(b,v_tmpisnull,TypeParamBool,"");
263261

264262
LLVMBuildStore(b,v_tmpisnull,v_isnullp);
265263

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp