pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: jit: Add missing inline pass for LLVM >= 17.
Date: Thu, 22 Jan 2026 03:29:27 +0000
Message-ID: <E1vilNv-001uzj-0f@gemulon.postgresql.org> (raw)

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7600dc79c231e7fd88172dde6c3a3ba701144298

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 4 ++++
1 file changed, 4 insertions(+)



view thread (6+ messages)  latest in thread

Message-ID: <E1vilNv-001uzj-0f@gemulon.postgresql.org>
Permalink:  ../E1vilNv-001uzj-0f@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vilNv-001uzj-0f@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: jit: Add missing inline pass for LLVM >= 17.
  In-Reply-To: <E1vilNv-001uzj-0f@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox