Re: LLVM 16 (opaque pointers)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: LLVM 16 (opaque pointers)
Дата
Msg-id 20231021060805.of3ukvyfmxnlvwcd@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: LLVM 16 (opaque pointers)  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: LLVM 16 (opaque pointers)  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Hi,

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
jit_above_cost=0.


> 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
Stellard.

> [1]
https://www.postgresql.org/message-id/flat/20210319190047.7o4bwhbp5dzkqif3%40alap3.anarazel.de#ec51b488ca8eac8c603d91c0439d38b2

Greetings,

Andres Freund

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Remove last traces of HPPA support
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Remove last traces of HPPA support