Re: JIT compiling with LLVM v9.1

2018-02-15 Thread Andreas Karlsson
On 02/15/2018 06:23 PM, Andres Freund wrote: 2) When I build with --with-cassert I expect the assertions to be there, both in the binaries and the bitcode. Is that just a bug or is there any thought behind this? Not sure what you mean by that. NDEBUG and cassert are independent mechanisms, no?

Re: JIT compiling with LLVM v9.1

2018-02-15 Thread Andres Freund
Hi, On 2018-02-15 12:54:34 +0100, Andreas Karlsson wrote: > 1) Why does config/llvm.m4 modify CPPFLAGS? That affects the building of the > binaries too which may be done with gcc like in my case. Shouldn't it use a > LLVM_CPPFLAGS or something? Well, most of the time cppflags just are things like

Re: JIT compiling with LLVM v9.1

2018-02-15 Thread Andreas Karlsson
On 02/05/2018 10:44 PM, Pierre Ducroquet wrote: psqlscanslash.l: In function ‘psql_scan_slash_option’: psqlscanslash.l:550:8: warning: variable ‘lexresult’ set but not used [-Wunused-but-set-variable] int final_state; ^ I'm not sure Andres's patches have anything to do w

Re: JIT compiling with LLVM v9.1

2018-02-05 Thread Pierre Ducroquet
On Monday, February 5, 2018 10:20:27 PM CET Andreas Karlsson wrote: > OK that fixed the issue, but you have a typo in your patch set. > > diff --git a/src/backend/lib/llvmjit_inline.cpp > b/src/backend/lib/llvmjit_inline.cpp > index a785261bea..51f38e10d2 100644 > --- a/src/backend/lib/llvmjit_inl

Re: JIT compiling with LLVM v9.1

2018-02-05 Thread Andreas Karlsson
OK that fixed the issue, but you have a typo in your patch set. diff --git a/src/backend/lib/llvmjit_inline.cpp b/src/backend/lib/llvmjit_inline.cpp index a785261bea..51f38e10d2 100644 --- a/src/backend/lib/llvmjit_inline.cpp +++ b/src/backend/lib/llvmjit_inline.cpp @@ -37,7 +37,7 @@ extern "C"

Re: JIT compiling with LLVM v9.1

2018-02-05 Thread Pierre Ducroquet
On Sunday, February 4, 2018 12:45:50 AM CET Andreas Karlsson wrote: > On 02/02/2018 10:48 AM, Pierre Ducroquet wrote: > > I have successfully built the JIT branch against LLVM 4.0.1 on Debian > > testing. This is not enough for Debian stable (LLVM 3.9 is the latest > > available there), but it's a

Re: JIT compiling with LLVM v9.1

2018-02-05 Thread Pierre Ducroquet
On Sunday, February 4, 2018 12:45:50 AM CET Andreas Karlsson wrote: > On 02/02/2018 10:48 AM, Pierre Ducroquet wrote: > > I have successfully built the JIT branch against LLVM 4.0.1 on Debian > > testing. This is not enough for Debian stable (LLVM 3.9 is the latest > > available there), but it's a

Re: JIT compiling with LLVM v9.1

2018-02-03 Thread Andreas Karlsson
On 02/02/2018 10:48 AM, Pierre Ducroquet wrote: I have successfully built the JIT branch against LLVM 4.0.1 on Debian testing. This is not enough for Debian stable (LLVM 3.9 is the latest available there), but it's a first step. I've split the patch in four files. The first three fix the build is

Re: JIT compiling with LLVM v9.1

2018-02-03 Thread Andres Freund
Hi, On 2018-02-03 01:13:21 -0800, Andres Freund wrote: > On 2018-02-02 18:21:12 -0800, Jeff Davis wrote: > > I think I saw about a 2% gain here over master, but when I applied it > > on top of the fast scans it did not seem to add anything on top of > > fast scans. Seems reproducible, but I don't

Re: JIT compiling with LLVM v9.1

2018-02-03 Thread Andres Freund
Hi, On 2018-02-02 18:21:12 -0800, Jeff Davis wrote: > On Mon, Jan 29, 2018 at 1:53 AM, Andres Freund wrote: > >> https://git.postgresql.org/git/users/andresfreund/postgres.git > > There's a patch in there to change the scan order. Yes - note it's "deactivated" at the moment in the series. I p

Re: JIT compiling with LLVM v9.1

2018-02-02 Thread Jeff Davis
On Mon, Jan 29, 2018 at 1:53 AM, Andres Freund wrote: >> https://git.postgresql.org/git/users/andresfreund/postgres.git There's a patch in there to change the scan order. I suggest that you rename the GUC "synchronize_seqscans" to something more generic like "optimize_scan_order", and use it to

Re: JIT compiling with LLVM v9.1

2018-02-02 Thread Pierre Ducroquet
On Friday, February 2, 2018 10:48:16 AM CET Pierre Ducroquet wrote: > On Monday, January 29, 2018 10:53:50 AM CET Andres Freund wrote: > > Hi, > > > > On 2018-01-23 23:20:38 -0800, Andres Freund wrote: > > > == Code == > > > > > > As the patchset is large (500kb) and I'm still quickly evolving it

Re: JIT compiling with LLVM v9.1

2018-02-02 Thread Pierre Ducroquet
On Monday, January 29, 2018 10:53:50 AM CET Andres Freund wrote: > Hi, > > On 2018-01-23 23:20:38 -0800, Andres Freund wrote: > > == Code == > > > > As the patchset is large (500kb) and I'm still quickly evolving it, I do > > not yet want to attach it. The git tree is at > > > > https://git.po

Re: JIT compiling with LLVM v9.1

2018-01-29 Thread Craig Ringer
On 29 January 2018 at 22:53, Andres Freund wrote: > Hi, > > On 2018-01-23 23:20:38 -0800, Andres Freund wrote: > > == Code == > > > > As the patchset is large (500kb) and I'm still quickly evolving it, I do > > not yet want to attach it. The git tree is at > > https://git.postgresql.org/git/use

Re: JIT compiling with LLVM v9.1

2018-01-29 Thread Andres Freund
Hi, On 2018-01-23 23:20:38 -0800, Andres Freund wrote: > == Code == > > As the patchset is large (500kb) and I'm still quickly evolving it, I do > not yet want to attach it. The git tree is at > https://git.postgresql.org/git/users/andresfreund/postgres.git > in the jit branch > > https://gi