Re: --with-llvm on 32-bit platforms?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Dmitry Mityugov <d.mityugov@postgrespro.ru>, Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers@postgresql.org
Date: 2025-09-16T13:45:10Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Tue, Sep 16, 2025 at 12:51 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> On Tue, Sep 16, 2025 at 12:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Oh!  Yeah, that is surely broken now.

> This patch seems to work OK here.  The deform code is a little tricky
> as you have to think carefully about which places need TypeDatum and
> which need TypeSizeT in llvmjit_deform.c, since the v_offp variable
> really is size_t.  Tested on Debian 13 with i386 packages installed.

Thanks for doing that.  It looks generally plausible to my eye,
but I'm hardly qualified to do a detailed review.

> More changes would be needed if Datum is changed into a struct.

I can only imagine us doing that as a compile option to help
catch errors.  Our ambition need not reach to making the compile
option play with --with-llvm, perhaps.

			regards, tom lane



Commits

  1. jit: Fix type used for Datum values in LLVM IR.

  2. Avoid faulty alignment of Datums in build_sorted_items().

  3. Make type Datum be 8 bytes wide everywhere.