pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: jit: Add missing inline pass for LLVM >= 17.
6+ messages / 1 participants
[nested] [flat]

* pgsql: jit: Add missing inline pass for LLVM >= 17.
@ 2026-01-22 03:28 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2026-01-22 03:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e5d99b4d9ef4b92fb74f05bf783e06766bb661ee

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: jit: Add missing inline pass for LLVM >= 17.
@ 2026-01-22 03:28 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2026-01-22 03:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f1c6b153cabdc9ea33c3396f13e1cee92836df75

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: jit: Add missing inline pass for LLVM >= 17.
@ 2026-01-22 03:29 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2026-01-22 03:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d0bb0e5b364f157e93a00658c370527ae91e985e

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: jit: Add missing inline pass for LLVM >= 17.
@ 2026-01-22 03:29 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2026-01-22 03:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: jit: Add missing inline pass for LLVM >= 17.
@ 2026-01-22 03:29 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2026-01-22 03:29 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cbdd09ae1b571e8ecd9dbc7cd9d43600f86b56f6

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: jit: Add missing inline pass for LLVM >= 17.
@ 2026-01-22 03:30 Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Thomas Munro @ 2026-01-22 03:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/de8081c30e5a09e1295e2e8e8c69d65f7802f4b6

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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-01-22 03:30 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-01-22 03:28 pgsql: jit: Add missing inline pass for LLVM >= 17. Thomas Munro <tmunro@postgresql.org>
2026-01-22 03:28 pgsql: jit: Add missing inline pass for LLVM >= 17. Thomas Munro <tmunro@postgresql.org>
2026-01-22 03:29 pgsql: jit: Add missing inline pass for LLVM >= 17. Thomas Munro <tmunro@postgresql.org>
2026-01-22 03:29 pgsql: jit: Add missing inline pass for LLVM >= 17. Thomas Munro <tmunro@postgresql.org>
2026-01-22 03:29 pgsql: jit: Add missing inline pass for LLVM >= 17. Thomas Munro <tmunro@postgresql.org>
2026-01-22 03:30 pgsql: jit: Add missing inline pass for LLVM >= 17. Thomas Munro <tmunro@postgresql.org>

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