Re: LLVM 22 - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Re: LLVM 22
Date
Msg-id CAO6_XqoH-6HBmrFZrRXQuc+_PvkMYDxXcbLW+fsUfTnUnMi2mA@mail.gmail.com
Whole thread Raw
In response to Re: LLVM 22  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
Hi,

I've tried to generate multiple bitcode for a simple 'select aid % 2
FROM pgbench_accounts limit 10;' query. To keep bitcode simple, I've
modified the passes to use "default<O0>,mem2reg,inline" when we have
JIT inline without optimization (as described in [0]). I've tried the
following
- LLVM21: With lifetime
- LLVM21: Without lifetime
- LLVM22: With Poison
- LLVM22: Without Poison

In the 4 scenarios, the generated bc were the same with the exact same
instructions. Removing the lifetime end or the poison value doesn't
seem to change anything at this level of optimisation.

I'm not sure how to interpret this. Maybe the test is incorrect and a
different function needs to be called to possibly trigger the issue?
Or the poison/lifetime is only useful when going through the O3
optimisation pass?

[0]: https://www.postgresql.org/message-id/CAO6_XqrNjJnbn15ctPv7o4yEAT9fWa-dK15RSyun6QNw9YDtKg%40mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Roman Khapov
Date:
Subject: Re: GIN pageinspect support for entry tree and posting tree
Next
From: Japin Li
Date:
Subject: Re: Add IS_INDEX macro to brin and gist index