Re: upcoming API changes for LLVM 12 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: upcoming API changes for LLVM 12
Date
Msg-id 20201102184020.4fos3iort72obfor@alap3.anarazel.de
Whole thread Raw
In response to Re: upcoming API changes for LLVM 12  (Jesse Zhang <sbjesse@gmail.com>)
Responses Re: upcoming API changes for LLVM 12  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

On 2020-11-02 10:28:33 -0800, Jesse Zhang wrote:
> On Thu, Oct 15, 2020 at 6:12 PM Andres Freund <andres@anarazel.de> wrote:
> > There will be a breaking API change for JIT related API in LLVM
> > 12. Mostly about making control over various aspects easier, and then
> > building on top of that providing new features (like JIT compiling in
> > the background and making it easier to share JIT compiled output between
> > processes).
> >
> > I've worked with Lang Hames to ensure that the new C API has feature
> > parity...
> >
> 
> I assume you're alluding to the removal of ORC legacy (v1) API?

Yes.


> How far back was feature parity in the new API, or we could only switch starting
> with LLVM 12?

Parity is in 12 only - I had to work with Lang for a while to get to
parity. There really is no reason to switch earlier anyway.


> > The postgres changes are fairly localized, all in llvmjit.c - it's just
> > a few #ifdefs to support both LLVM 12 and before.
> >
> > The two questions I have are:
> >
> > 1) Which versions do we want to add LLVM 12 support?  It'd be fairly
> >    easy to backport all the way. But it's not quite a bugfix... OTOH,
> >    it'd probably painful for packagers to have dependencies on different
> >    versions of LLVM for different versions of postgres.
> >
> > 2) When do we want to add LLVM 12 support? PG will soon stop compiling
> >    against LLVM 12, which will be released in about 6 months. I worked
> >    with Lang to make most of the breaking changes in a branch (to be
> >    merged in the next few days), but it's possible that there will be a
> >    few smaller changes.
> 
> I think this has already happened about two weeks ago when Lang's commit
> 6154c4115cd4b78d landed in LLVM master.

Yea, I just need to polish the support a bit more. Shouldn't be too
much more work (right now it has too much unnecessary duplication, need
to split some reindation out into a separate commit).

https://github.com/anarazel/postgres/commits/llvm-12

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Split copy.c
Next
From: Stephen Frost
Date:
Subject: Re: public schema default ACL