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

From Robert Haas
Subject Re: JIT compiling with LLVM v9.0
Date
Msg-id CA+TgmoadD4=XGG45Ytf1sk2pVXRfBf-4FRO2kRJXD7ettx_Umg@mail.gmail.com
Whole thread Raw
In response to Re: JIT compiling with LLVM v9.0  (Andres Freund <andres@anarazel.de>)
Responses Re: JIT compiling with LLVM v9.0
List pgsql-hackers
On Tue, Jan 30, 2018 at 5:57 PM, Andres Freund <andres@anarazel.de> wrote:
> Given that we need a shared library it'll be best buildsystem wise if
> all of this is in a directory, and there's a separate file containing
> the stubs that call into it.
>
> I'm not quite sure where to put the code. I'm a bit inclined to add a
> new
> src/backend/jit/
> because we're dealing with code from across different categories? There
> we could have a pgjit.c with the stubs, and llvmjit/ with the llvm
> specific code?

That's kind of ugly, in that if we eventually end up with many
different parts of the system using JIT, they're all going to have to
all put their code in that directory rather than putting it with the
subsystem to which it pertains.  On the other hand, I don't really
have a better idea.  I'd definitely at least try to keep
executor-specific considerations in a separate FILE from general JIT
infrastructure, and make, as far as possible, a clean separation at
the API level.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: [HACKERS] Bug in to_timestamp().
Next
From: Robert Haas
Date:
Subject: Re: Temporary tables prevent autovacuum, leading to XID wraparound