jit: Fix type used for Datum values in LLVM IR.
Thomas Munro <tmunro@postgresql.org>
jit: Fix type used for Datum values in LLVM IR. Commit 2a600a93 made Datum 8 bytes wide everywhere. It was no longer appropriate to use TypeSizeT on 32 bit systems, and JIT compilation would fail with various type check errors. Introduce a separate LLVMTypeRef with the name TypeDatum. TypeSizeT is still used in some places for actual size_t values. Reported-by: Dmitry Mityugov <d.mityugov@postgrespro.ru> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Tested-by: Dmitry Mityugov <d.mityugov@postgrespro.ru> Discussion: https://postgr.es/m/0a9f0be59171c2e8f1b3bc10f4fcf267%40postgrespro.ru
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/jit/llvm/llvmjit.c | modified | +2 −0 |
| src/backend/jit/llvm/llvmjit_deform.c | modified | +5 −5 |
| src/backend/jit/llvm/llvmjit_expr.c | modified | +75 −75 |
| src/backend/jit/llvm/llvmjit_types.c | modified | +1 −0 |
| src/include/jit/llvmjit_emit.h | modified | +10 −1 |
| src/include/jit/llvmjit.h | modified | +1 −0 |
Discussion
- --with-llvm on 32-bit platforms? 20 messages · 2025-09-04 → 2025-09-17