Re: LLVM 16 (opaque pointers) - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: LLVM 16 (opaque pointers)
Date
Msg-id CA+hUKGJnG8jJJkyULpg1xTxzNtL2FreS4C16TFcRLwu8RR1yUQ@mail.gmail.com
Whole thread Raw
In response to Re: LLVM 16 (opaque pointers)  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: LLVM 16 (opaque pointers)
Re: LLVM 16 (opaque pointers)
List pgsql-hackers
On Thu, Sep 21, 2023 at 12:47 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Thu, Sep 21, 2023 at 12:24 PM Devrim Gündüz <devrim@gunduz.org> wrote:
> > RHEL releases new LLVM version along with their new minor releases every
> > 6 month, and we have to build older versions with new LLVM each time.
> > From RHEL point of view, it would be great if we can back-patch back to
> > v12 :(
>
> Got it.  OK, I'll work on 12 and 13 now.

The back-patch to 12 was a little trickier than anticipated, but after
taking a break and trying again I now have PG 12...17 patches that
I've tested against LLVM 10...18 (that's 54 combinations), in every
case only with the clang corresponding to LLVM.

For 12, I decided to back-patch the llvm_types_module variable that
was introduced in 13, to keep the code more similar.

For master, I had to rebase over Daniel's recent commits, which
required re-adding unused variables removed by 2dad308e, and
then changing a bunch of LLVM type constructors like LLVMInt8Type() to
the LLVMInt8TypeInContext(lc, ...) variants following the example of
9dce2203.  Without that, type assertions in my LLVM 18 debug build
would fail (and maybe there could be a leak problem, though I'm not
sure that really applied to integer (non-struct) types).

I've attached only the patches for master, but the 12-16 versions are
available at https://github.com/macdice/postgres/tree/llvm16-$N in
case anyone has comments on those.

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: False "pg_serial": apparent wraparound” in logs
Next
From: tender wang
Date:
Subject: Re: Problem, partition pruning for prepared statement with IS NULL clause.