mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
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
This commit is contained in:
@ -32,6 +32,7 @@ extern "C"
|
||||
#include "fmgr.h"
|
||||
#include "jit/jit.h"
|
||||
#include "nodes/pg_list.h"
|
||||
#include "access/tupdesc.h"
|
||||
|
||||
|
||||
typedef struct LLVMJitContext
|
||||
@ -75,6 +76,7 @@ extern LLVMTypeRef StructAggStatePerGroupData;
|
||||
|
||||
extern LLVMValueRef AttributeTemplate;
|
||||
extern LLVMValueRef FuncStrlen;
|
||||
extern LLVMValueRef FuncVarsizeAny;
|
||||
extern LLVMValueRef FuncSlotGetsomeattrs;
|
||||
extern LLVMValueRef FuncHeapGetsysattr;
|
||||
extern LLVMValueRef FuncMakeExpandedObjectReadOnlyInternal;
|
||||
@ -107,6 +109,7 @@ extern LLVMValueRef llvm_function_reference(LLVMJitContext *context,
|
||||
****************************************************************************
|
||||
*/
|
||||
extern bool llvm_compile_expr(struct ExprState *state);
|
||||
extern LLVMValueRef slot_compile_deform(struct LLVMJitContext *context, TupleDesc desc, int natts);
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
|
Reference in New Issue
Block a user