Re: LLVM 22

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Matheus Alcantara <matheusssilv97(at)gmail(dot)com>, Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Subject: Re: LLVM 22
Date: 2026-01-11 07:09:58
Message-ID: CA+hUKGLJ63fpt_u0OXDR91fbpicDXK01fivzDSBMOtPazEanFQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 4, 2026 at 6:02 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Sat, Jan 3, 2026 at 3:02 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> > 1. We won't need our local llvm::backport::SectionMemoryManager for
> > LLVM 22, so it will be nice to draw a line under that messy business.
> > See commit message for details.
>
> While that's true, there is a problem with the patch I posted:
> "ReserveAlloc" is not enabled when called from C. I can't actually
> reproduce the issue locally due to lack of RAM connected to an ARM
> CPU, or I'd have noticed that... I'll attempt to do something about
> that upstream[1], let's see... if not, we can still use the new
> in-tree SectionMemoryManager, but we'll still need some C++ glue code.

That was successful, so here is an update.

A new unrelated assertion started firing in LLVM main/22 a few days ago:

v_nullbytemask = l_int8_const(lc, 1 << ((attnum) & 0x07));
Assertion failed: (llvm::isUIntN(BitWidth, val) && "Value is not
an N-bit unsigned value")

Here is a fix for that.

Attachment Content-Type Size
v2-0001-jit-Skip-local-SectionMemoryManager-for-LLVM-22.patch text/x-patch 5.3 KB
v2-0002-jit-Stop-using-lifetime.end-intrinsic-for-LLVM-22.patch text/x-patch 3.9 KB
v2-0003-jit-Fix-integer-constants-for-LLVM-22.patch text/x-patch 2.3 KB

In response to

Responses

  • Re: LLVM 22 at 2026-01-14 16:12:45 from Anthonin Bonnefoy
  • Re: LLVM 22 at 2026-01-22 02:24:56 from Thomas Munro
  • Re: LLVM 22 at 2026-03-13 13:36:04 from Devrim Gündüz

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-01-11 07:10:36 Re: [PATCH] Fix minor issues in astreamer_zstd.c
Previous Message Michael Paquier 2026-01-11 06:27:18 Re: Inconsistent terminology for -j/--jobs option in documentation