On Mon, 26 May 2025 19:17:53 +1200
David Rowley <[email protected]> wrote:
> On Mon, 26 May 2025 at 18:08, Yugo Nagata <[email protected]> wrote:
> > While building PostgreSQL 17 on Windows, I noticed bitcode files (.bc) are
> > not
> > generated with meson. Does this means that "inlining" of JIT doesn't
> > work when PostgreSQL is build with meson?
>
> Yes. I believe [1] aims to fix this.
>
> David
>
> [1] https://commitfest.postgresql.org/patch/5671/
Thank you for the clarification.
I've attached a patch to update the documentation.
I believe it's worth stating this explicitly, since the fix will not be
applied until at the earliest PostgreSQL 19.
Regards,
Yugo Nagata
--
Yugo Nagata <[email protected]>
diff --git a/doc/src/sgml/jit.sgml b/doc/src/sgml/jit.sgml
index 44e18bf1a6f..00092675288 100644
--- a/doc/src/sgml/jit.sgml
+++ b/doc/src/sgml/jit.sgml
@@ -36,7 +36,8 @@
<acronym>JIT</acronym> compilation using <ulink
url="https://llvm.org/"><productname>LLVM</productname></ulink> when
<productname>PostgreSQL</productname> is built with
- <link linkend="configure-with-llvm"><literal>--with-llvm</literal></link>.
+ <link linkend="configure-with-llvm"><literal>--with-llvm</literal></link>
+ or <link linkend="configure-with-llvm-meson"><option>-Dllvm</option></link>.
</para>
<para>
@@ -76,6 +77,15 @@
bodies of small functions into the expressions using them. That allows a
significant percentage of the overhead to be optimized away.
</para>
+ <note>
+ <para>
+ Inlining does not work if <productname>PostgreSQL</productname> is built using
+ <application>Meson</application> with
+ <link linkend="configure-with-llvm-meson"><option>-Dllvm</option></link>,
+ because the <productname>LLVM</productname> bitcode is not built.
+ See <xref linkend="jit-extensibility-bitcode"/> for more details about bitcode.
+ </para>
+ </note>
</sect2>
<sect2 id="jit-optimization">