postgresql/src
Thomas Munro e5d99b4d9e jit: Add missing inline pass for LLVM >= 17.
With LLVM >= 17, transform passes are provided as a string to
LLVMRunPasses. Only two strings were used: "default<O3>" and
"default<O0>,mem2reg".

With previous LLVM versions, an additional inline pass was added when
JIT inlining was enabled without optimization. With LLVM >= 17, the code
would go through llvm_inline, prepare the functions for inlining, but
the generated bitcode would be the same due to the missing inline pass.

This patch restores the previous behavior by adding an inline pass when
inlining is enabled but no optimization is done.

This fixes an oversight introduced by 76200e5e when support for LLVM 17
was added.

Backpatch-through: 14
Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Reviewed-by: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Andreas Karlsson <andreas@proxel.se>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Pierre Ducroquet <p.psql@pinaraf.info>
Reviewed-by: Matheus Alcantara <matheusssilv97@gmail.com>
Discussion: https://postgr.es/m/CAO6_XqrNjJnbn15ctPv7o4yEAT9fWa-dK15RSyun6QNw9YDtKg%40mail.gmail.com
2026-01-22 16:03:47 +13:00
..
backend jit: Add missing inline pass for LLVM >= 17. 2026-01-22 16:03:47 +13:00
bin Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
common Remove #include <math.h> where not needed 2026-01-15 19:09:47 +01:00
fe_utils Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
include Refactor some SIMD and popcount macros. 2026-01-21 14:21:00 -06:00
interfaces Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
makefiles tests: Add a test C++ extension module 2026-01-20 16:42:30 +01:00
pl plpython: Streamline initialization 2026-01-15 12:11:52 +01:00
port Refactor some SIMD and popcount macros. 2026-01-21 14:21:00 -06:00
template Remove traces of support for Sun Studio compiler 2025-09-12 07:39:05 +02:00
test file_fdw: Support multi-line HEADER option. 2026-01-22 10:14:12 +09:00
timezone Update time zone data files to tzdata release 2025c. 2026-01-18 14:54:33 -05:00
tools Allow Boolean reloptions to have ternary values 2026-01-21 20:06:01 +01:00
tutorial Force standard_conforming_strings to always be ON. 2026-01-21 15:08:38 -05:00
.gitignore
DEVELOPERS
Makefile Remove distprep 2023-11-06 15:18:04 +01:00
Makefile.global.in tests: Add a test C++ extension module 2026-01-20 16:42:30 +01:00
Makefile.shlib Use exported symbols list on macOS for loadable modules as well 2025-06-10 07:04:43 +02:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
nls-global.mk Fix update-po for the PGXS case 2025-10-16 20:21:05 +02:00