Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a0a08c1

Browse files
committed
Fix mistakes in the just added JIT docs.
Reported-By: Lukas Fittl Author: Andres Freund
1 parent e6c039d commit a0a08c1

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

doc/src/sgml/config.sgml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7498,7 +7498,7 @@ SET XML OPTION { DOCUMENT | CONTENT };
74987498
used. The built-in default is <literal>llvmjit</literal>.
74997499
</para>
75007500
<para>
7501-
If set to a non-existent library <acronym>JIT</acronym> will not
7501+
If set to a non-existent library <acronym>JIT</acronym> will not be
75027502
available, but no error will be raised. This allows JIT support to be
75037503
installed separately from the main
75047504
<productname>PostgreSQL</productname> package.

doc/src/sgml/jit.sgml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
</para>
3333

3434
<para>
35-
<productname>PostgreSQL</productname> has builtin support perform
35+
<productname>PostgreSQL</productname> has builtin support to perform
3636
<acronym>JIT</acronym> using <ulink
37-
url="https://llvm.org/"><productname>LLVM</productname></ulink> when built
37+
url="https://llvm.org/"><productname>LLVM</productname></ulink> when
3838
<productname>PostgreSQL</productname> was built with
3939
<literal>--with-llvm</literal> (see <xref linkend="configure-with-llvm"/>).
4040
</para>

src/backend/jit/README

+10-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ the shared library providing JIT support can be loaded (i.e. postgres
7474
was compiled with LLVM support and the shared library is installed),
7575
the task of JIT compiling an expression gets handed of to shared
7676
library. This obviously requires that the function in jit.c is allowed
77-
to fail in case not JIT provider can be loaded.
77+
to fail in case no JIT provider can be loaded.
7878

7979
Which shared library is loaded is determined by the jit_provider GUC,
8080
defaulting to "llvmjit".
@@ -174,7 +174,7 @@ least a few postgres types. While it is possible to inform LLVM about
174174
type definitions by recreating them manually in C code, that is failure
175175
prone and labor intensive.
176176

177-
Instead the is one small file (llvmjit_types.c) which references each of
177+
Instead there is one small file (llvmjit_types.c) which references each of
178178
the types required for JITing. That file is translated to bitcode at
179179
compile time, and loaded when LLVM is initialized in a backend.
180180

@@ -232,10 +232,16 @@ an ExprState, rather than absolute pointers into memory.
232232

233233
Once that is addressed, adding an LRU cache that's keyed by the
234234
generated LLVM IR will allow to use optimized functions even for
235-
shorter functions.
235+
faster queries.
236236

237237
A longer term project is to move expression compilation to the planner
238-
stage, allowing to tie
238+
stage, allowing e.g. to tie compiled expressions to prepared
239+
statements.
240+
241+
An even more advanced approach would be to use JIT with few
242+
optimizations initially, and build an optimized version in the
243+
background. But that's even further off.
244+
239245

240246
What to JIT
241247
===========

0 commit comments

Comments
 (0)