Re: LLVM 16 (opaque pointers)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Ronan Dunklau <ronan(dot)dunklau(at)aiven(dot)io>, Devrim Gündüz <devrim(at)gunduz(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Tom Stellard <tstellar(at)redhat(dot)com>, Mark Wong <markwkm(at)gmail(dot)com>
Subject: Re: LLVM 16 (opaque pointers)
Date: 2023-10-21 06:08:05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 2023-10-19 06:20:26 +1300, Thomas Munro wrote:
> Interestingly, a new problem just showed up on the the RHEL9 s390x
> machine "lora", where a previously reported problem [1] apparently
> re-appeared. It complains about incompatible layout, previously
> blamed on mismatch between clang and LLVM versions.

I've attached a patch revision that I spent the last couple hours working
on. It's very very roughly based on a patch Tom Stellard had written (which I
think a few rpm packages use). But instead of encoding details about specific
layout details, I made the code check if the data layout works and fall back
to the cpu / features used for llvmjit_types.bc. This way it's not s390x
specific, future odd architecture behaviour would "automatically" be handled
the same.

With that at least the main regression tests pass on s390x, even with

> I can see that its clang is v15 from clues in the conflig log, but I don't
> know which version of LLVM is being used. However, I see now that
> --with-llvm was literally just turned on, so there is no reason to think
> that this would have worked before or this work is relevant. Strange though
> -- we must be able to JIT further than that on s390x because we have crash
> reports in other threads (ie we made it past this and into other more
> advanced brokenness).

You can avoid the borkedness by a) running on an older cpu b) adding
compilation flags to change the code generation target
(e.g. -march=native). And some RPM packages have applied the patch by Tom

> [1]


Andres Freund

Attachment Content-Type Size
v2-0001-jit-Add-fallback-in-case-of-runtime-compile-time-.patch text/x-diff 9.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-10-21 06:18:19 Re: Remove last traces of HPPA support
Previous Message Andres Freund 2023-10-21 05:56:31 Re: Remove last traces of HPPA support