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

Commit5da871b

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 parent9543f08 commit5da871b

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
@@ -155,7 +155,7 @@ llvm_compile_expr(ExprState *state)
155155

156156
param_types[0]=l_ptr(StructExprState);/* state */
157157
param_types[1]=l_ptr(StructExprContext);/* econtext */
158-
param_types[2]=l_ptr(TypeParamBool);/* isnull */
158+
param_types[2]=l_ptr(TypeStorageBool);/* isnull */
159159

160160
eval_sig=LLVMFunctionType(TypeSizeT,
161161
param_types,lengthof(param_types),
@@ -265,8 +265,6 @@ llvm_compile_expr(ExprState *state)
265265

266266
v_tmpvalue=LLVMBuildLoad(b,v_tmpvaluep,"");
267267
v_tmpisnull=LLVMBuildLoad(b,v_tmpisnullp,"");
268-
v_tmpisnull=
269-
LLVMBuildTrunc(b,v_tmpisnull,TypeParamBool,"");
270268

271269
LLVMBuildStore(b,v_tmpisnull,v_isnullp);
272270

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp