pgsql: JIT tuple deforming in LLVM JIT provider.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: JIT tuple deforming in LLVM JIT provider.
Date: 2018-03-26 20:18:01
Message-ID: E1f0YZ7-0005ut-LQ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

JIT tuple deforming in LLVM JIT provider.

Performing JIT compilation for deforming gains performance benefits
over unJITed deforming from compile-time knowledge of the tuple
descriptor. Fixed column widths, NOT NULLness, etc can be taken
advantage of.

Right now the JITed deforming is only used when deforming tuples as
part of expression evaluation (and obviously only if the descriptor is
known). It's likely to be beneficial in other cases, too.

By default tuple deforming is JITed whenever an expression is JIT
compiled. There's a separate boolean GUC controlling it, but that's
expected to be primarily useful for development and benchmarking.

Docs will follow in a later commit containing docs for the whole JIT
feature.

Author: Andres Freund
Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/32af96b2b118cd204ca809d7c48c7f8ea7f879cf

Modified Files
--------------
src/backend/access/common/heaptuple.c | 10 +
src/backend/executor/execExpr.c | 5 +
src/backend/executor/execTuples.c | 1 +
src/backend/executor/nodeForeignscan.c | 6 +-
src/backend/jit/jit.c | 1 +
src/backend/jit/llvm/Makefile | 2 +-
src/backend/jit/llvm/llvmjit.c | 2 +
src/backend/jit/llvm/llvmjit_deform.c | 729 +++++++++++++++++++++++++++++++++
src/backend/jit/llvm/llvmjit_expr.c | 45 +-
src/backend/jit/llvm/llvmjit_types.c | 1 +
src/backend/optimizer/plan/planner.c | 2 +
src/backend/utils/misc/guc.c | 11 +
src/include/access/htup_details.h | 1 +
src/include/executor/execExpr.h | 1 +
src/include/jit/jit.h | 2 +
src/include/jit/llvmjit.h | 3 +
src/include/nodes/execnodes.h | 8 +
17 files changed, 827 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-03-26 23:09:42 pgsql: LLVMJIT: Free created module in LLVM < 5.
Previous Message Alvaro Herrera 2018-03-26 15:33:33 Re: pgsql: Allow FOR EACH ROW triggers on partitioned tables