Re: JIT compiling with LLVM v12.2

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
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 21:36:24
Message-ID: 20180321213624.mwtykxvqpygg6kf7@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2018-03-21 14:21:01 -0700, Andres Freund wrote:
> I think it's I that did something wrong not you. And the architecture
> thing is a non-issue, because we're taking the target triple from the
> right place. I think it's a separate issue. Notably the generated code
> is apparently corrupt, when reading in the generated bitcode:
>
> $ opt-6.0 -O3 -S < /tmp/data/6814.1.bc|less
> opt-6.0: <stdin>: error: Invalid record (Producer: 'LLVM6.0.0' Reader: 'LLVM 6.0.0')
>
> I suspect there's a 32bit vs 64bit confusion in the expression code
> somewhere, might've accidentally used a 64bit type for Datum somewhere
> or such. Will compile an LLVM with assertions enabled, to figure this
> out (which verifies this kinda thing).

Yup, that's it. Found it by searching for 64bit references, while LLVM
was compiling. I've pushed quickfixes (for the 32 warnings, as well as
for the 32bit x86 issue, as for configure typos).

Passes
PGOPTIONS='-c jit_above_cost=0' make -s check
now.

I'll still run 32bit through an LLVM w/ assert run once finished (takes
~30min to compile LLVM).

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-03-21 21:44:28 Re: JIT compiling with LLVM v12.2
Previous Message Tom Lane 2018-03-21 21:36:19 Multiple-output-file make rules: We're Doing It Wrong