pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Add expression compilation support to LLVM JIT provider.
2+ messages / 1 participants
[nested] [flat]
* pgsql: Add expression compilation support to LLVM JIT provider.
@ 2018-03-22 21:50 Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 2+ messages in thread
From: Andres Freund @ 2018-03-22 21:50 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Add expression compilation support to LLVM JIT provider.
In addition to the interpretation of expressions (which back
evaluation of WHERE clauses, target list projection, aggregates
transition values etc) support compiling expressions to native code,
using the infrastructure added in earlier commits.
To avoid duplicating a lot of code, only support emitting code for
cases that are likely to be performance critical. For expression steps
that aren't deemed that, use the existing interpreter.
The generated code isn't great - some architectural changes are
required to address that. But this already yields a significant
speedup for some analytics queries, particularly with WHERE clauses
filtering a lot, or computing multiple aggregates.
Author: Andres Freund
Tested-By: Thomas Munro
Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
Disable JITing for VALUES() nodes.
VALUES() nodes are only ever executed once. This is primarily helpful
for debugging, when forcing JITing even for cheap queries.
Author: Andres Freund
Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2a0faed9d7028e3830998bd6ca900be651274e27
Modified Files
--------------
src/backend/executor/execExpr.c | 4 +
src/backend/executor/nodeValuesscan.c | 10 +
src/backend/jit/jit.c | 37 +
src/backend/jit/llvm/Makefile | 2 +-
src/backend/jit/llvm/llvmjit.c | 64 +
src/backend/jit/llvm/llvmjit_expr.c | 2637 +++++++++++++++++++++++++++++++++
src/backend/optimizer/plan/planner.c | 6 +
src/backend/utils/fmgr/fmgr.c | 94 +-
src/backend/utils/misc/guc.c | 11 +
src/include/fmgr.h | 2 +
src/include/jit/jit.h | 13 +
src/include/jit/llvmjit.h | 12 +
src/tools/pgindent/typedefs.list | 1 +
13 files changed, 2890 insertions(+), 3 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgsql: Add expression compilation support to LLVM JIT provider.
@ 2018-03-22 21:54 Andres Freund <andres@anarazel.de>
parent: Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 2+ messages in thread
From: Andres Freund @ 2018-03-22 21:54 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
On 2018-03-22 21:50:32 +0000, Andres Freund wrote:
> Disable JITing for VALUES() nodes.
>
> VALUES() nodes are only ever executed once. This is primarily helpful
> for debugging, when forcing JITing even for cheap queries.
>
> Author: Andres Freund
> Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de
Sorry for leaving that in the commit message, I'd gone back and forth
between leaving this as a separate commit once too often.
- Andres
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-03-22 21:54 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 21:50 pgsql: Add expression compilation support to LLVM JIT provider. Andres Freund <andres@anarazel.de>
2018-03-22 21:54 ` Andres Freund <andres@anarazel.de>
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