Re: JIT compiling with LLVM v12.2

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JIT compiling with LLVM v12.2
Date: 2018-03-21 23:07:57
Message-ID: CAEepm=1JShWcY5RMdOd_zsMssJSNhYrB50qAMB7-B6H5Oa1UDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 22, 2018 at 11:46 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2018-03-22 11:36:47 +1300, Thomas Munro wrote:
>> Not sure if we'll want to try to actively identify and avoid known
>> buggy versions or not?
>
> I'm currently not inclined to invest a lot of effort into it, besides
> trying to get the bug fixed.
>
> A possible testcase would be to call
> createLocalIndirectStubsManagerBuilder() and report an error if it
> returns nullptr. But that'd fail once the bug is fixed, because we don't
> actually *need* that functionality, it's just that LLVM instantiates the
> stub manager unconditionally for some reason.

So how about we test createLocalIndirectStubsManagerBuilder(), and if
it's nullptr then we also test the LLVM version number? For each
major release (3.9, 4.0, 5.0, ... you can see that they did the same
kind of versioning schema change that we did!) there will eventually
be a minor/patch release number where this works even when nullptr is
returned here.

This problem is going to come up on any architecture not covered in
the following code, namely anything but x86, x86_64 and (since 6.0)
aarch64 (aka arm64), so we definitely don't want to leave JIT disabled
once that bug is fixed:

https://github.com/llvm-mirror/llvm/blob/release_39/lib/ExecutionEngine/Orc/IndirectionUtils.cpp#L48
https://github.com/llvm-mirror/llvm/blob/release_60/lib/ExecutionEngine/Orc/IndirectionUtils.cpp#L48

--
Thomas Munro
http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-03-21 23:18:39 Re: FOR EACH ROW triggers on partitioned tables
Previous Message Dmitry Dolgov 2018-03-21 23:02:02 Re: [HACKERS] advanced partition matching algorithm for partition-wise join