pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: jit: Fix type used for Datum values in LLVM IR.
Date: Wed, 17 Sep 2025 03:00:24 +0000
Message-ID: <E1uyiPA-0016JY-0V@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0951942bba25f85ad29a4f096ed51a356652b5a2

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c        |   2 +
src/backend/jit/llvm/llvmjit_deform.c |  10 +--
src/backend/jit/llvm/llvmjit_expr.c   | 150 +++++++++++++++++-----------------
src/backend/jit/llvm/llvmjit_types.c  |   1 +
src/include/jit/llvmjit.h             |   1 +
src/include/jit/llvmjit_emit.h        |  11 ++-
6 files changed, 94 insertions(+), 81 deletions(-)



Message-ID: <E1uyiPA-0016JY-0V@gemulon.postgresql.org>
Permalink:  ../E1uyiPA-0016JY-0V@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uyiPA-0016JY-0V@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: jit: Fix type used for Datum values in LLVM IR.
  In-Reply-To: <E1uyiPA-0016JY-0V@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox