Re: LLVM 22
Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
From: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Matheus Alcantara <matheusssilv97@gmail.com>
Date: 2026-01-14T16:12:45Z
Lists: pgsql-hackers
Attachments
- 21_lifetime.s (application/octet-stream)
- 22_no_poisoned.s (application/octet-stream)
- 22_poisoned.s (application/octet-stream)
- 21_no_lifetime.s (application/octet-stream)
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
Commits
-
jit: No backport::SectionMemoryManager for LLVM 22.
- 9b354cfc5584 14.23 landed
- 963fccc09cc6 15.18 landed
- 8354cd7ff575 16.14 landed
- 0a2291b59f9b 17.10 landed
- 5c54e0f48fa2 18.4 landed
- be21341e13d9 19 (unreleased) landed
-
jit: Stop emitting lifetime.end for LLVM 22.
- b4e7cd428c00 14.23 landed
- c00ea2b5b4f1 15.18 landed
- 26f27c592c5d 16.14 landed
- b6d0cddbe27d 17.10 landed
- 78cea19bf7da 18.4 landed
- de6b80e5ff4b 19 (unreleased) landed