Re: JIT compiling with LLVM v9.1

From: Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Andreas Karlsson <andreas(at)proxel(dot)se>, Pierre Ducroquet <pierre(dot)ducroquet(at)people-doc(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: JIT compiling with LLVM v9.1
Date: 2018-02-05 21:44:07
Message-ID: 8206842.mJjBK04PmG@peanuts2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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_inline.cpp
> +++ b/src/backend/lib/llvmjit_inline.cpp
> @@ -37,7 +37,7 @@ extern "C"
> #include <llvm/ADT/StringSet.h>
> #include <llvm/ADT/StringMap.h>
> #include <llvm/Analysis/ModuleSummaryAnalysis.h>
> -#if LLVM_MAJOR_VERSION > 3
> +#if LLVM_VERSION_MAJOR > 3
> #include <llvm/Bitcode/BitcodeReader.h>
> #else
> #include "llvm/Bitcode/ReaderWriter.h"

Thanks, it's weird I had no issue with it. I will fix in the next patch set.

> Also I get some warning. Not sure if they are from your patches or from
> Andres's.
>
> llvmjit_error.cpp:118:1: warning: unused function
> 'fatal_llvm_new_handler' [-Wunused-function]
> fatal_llvm_new_handler(void *user_data,
> ^
> 1 warning generated.
> llvmjit_inline.cpp:114:6: warning: no previous prototype for function
> 'operator!' [-Wmissing-prototypes]
> bool operator!(const llvm::ValueInfo &vi) {
> ^
> 1 warning generated.

Both are mine, I knew about the first one, but I did not see the second one. I
will fix them too, thanks for the review!

> 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 with psql, it's surprising.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2018-02-05 21:45:23 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Previous Message Tels 2018-02-05 21:39:07 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)