diff options
| author | Andres Freund | 2018-03-26 19:57:19 +0000 |
|---|---|---|
| committer | Andres Freund | 2018-03-26 19:57:19 +0000 |
| commit | 32af96b2b118cd204ca809d7c48c7f8ea7f879cf (patch) | |
| tree | d9a09cc42afb193293a0b65cfa080d676763d776 /src/backend/executor/execExpr.c | |
| parent | 64f85894ad2730fb1449a8e81dd8026604e9a546 (diff) | |
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/[email protected]
Diffstat (limited to 'src/backend/executor/execExpr.c')
| -rw-r--r-- | src/backend/executor/execExpr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index 13bf891cea7..e284fd71d75 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -2287,18 +2287,21 @@ ExecPushExprSlots(ExprState *state, LastAttnumInfo *info) { scratch.opcode = EEOP_INNER_FETCHSOME; scratch.d.fetch.last_var = info->last_inner; + scratch.d.fetch.known_desc = NULL; ExprEvalPushStep(state, &scratch); } if (info->last_outer > 0) { scratch.opcode = EEOP_OUTER_FETCHSOME; scratch.d.fetch.last_var = info->last_outer; + scratch.d.fetch.known_desc = NULL; ExprEvalPushStep(state, &scratch); } if (info->last_scan > 0) { scratch.opcode = EEOP_SCAN_FETCHSOME; scratch.d.fetch.last_var = info->last_scan; + scratch.d.fetch.known_desc = NULL; ExprEvalPushStep(state, &scratch); } } @@ -3250,10 +3253,12 @@ ExecBuildGroupingEqual(TupleDesc ldesc, TupleDesc rdesc, /* push deform steps */ scratch.opcode = EEOP_INNER_FETCHSOME; scratch.d.fetch.last_var = maxatt; + scratch.d.fetch.known_desc = ldesc; ExprEvalPushStep(state, &scratch); scratch.opcode = EEOP_OUTER_FETCHSOME; scratch.d.fetch.last_var = maxatt; + scratch.d.fetch.known_desc = rdesc; ExprEvalPushStep(state, &scratch); /* |
