Re: JIT compiling with LLVM v10.0 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: JIT compiling with LLVM v10.0
Date
Msg-id 20180207145405.om6lsxovkbehvin2@alap3.anarazel.de
Whole thread Raw
In response to [HACKERS] JIT compiling expressions/deform + inlining prototype v2.0  (Andres Freund <andres@anarazel.de>)
Responses Re: JIT compiling with LLVM v10.0  (Pierre Ducroquet <p.psql@pinaraf.info>)
Re: JIT compiling with LLVM v10.0  (Thomas Munro <thomas.munro@enterprisedb.com>)
Re: JIT compiling with LLVM v10.0  (Andreas Karlsson <andreas@proxel.se>)
Re: JIT compiling with LLVM v10.1  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

I've pushed v10.0. The big (and pretty painful to make) change is that
now all the LLVM specific code lives in src/backend/jit/llvm, which is
built as a shared library which is loaded on demand.

The layout is now as follows:

src/backend/jit/jit.c:
    Part of JITing always linked into the server. Supports loading the
    LLVM using JIT library.

src/backend/jit/llvm/
Infrastructure:
 llvmjit.c:
    General code generation and optimization infrastructure
 llvmjit_error.cpp, llvmjit_wrap.cpp:
    Error / backward compat wrappers
 llvmjit_inline.cpp:
    Cross module inlining support
Code-Gen:
  llvmjit_expr.c
    Expression compilation
  llvmjit_deform.c
    Deform compilation

I generally like how this shaped out. There's a good amount of followup
cleanup needed, but I'd appreciate some early feedback.


I've also rebased onto a recent master version.

postgres[21915][1]=# SELECT pg_llvmjit_available();
┌──────────────────────┐
│ pg_llvmjit_available │
├──────────────────────┤
│ t                    │
└──────────────────────┘
(1 row)

make -C src/backend/jit/llvm/ uninstall
postgres[21915][1]=# \c
You are now connected to database "postgres" as user "andres".
postgres[21922][1]=# SELECT pg_llvmjit_available();
┌──────────────────────┐
│ pg_llvmjit_available │
├──────────────────────┤
│ f                    │
└──────────────────────┘
(1 row)

Yeha ;)

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: Obsolete fmgr() declaration in fmgr.h
Next
From: David Steele
Date:
Subject: Re: Re: [HACKERS] WIP: Separate log file for extension