Re: [PATCH] LLVM tuple deforming improvements

From: Andres Freund <andres(at)anarazel(dot)de>
To: Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] LLVM tuple deforming improvements
Date: 2018-07-13 21:08:45
Message-ID: 20180713210845.frs6lan5h7of2llv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for looking at this!

On 2018-07-13 10:20:42 +0200, Pierre Ducroquet wrote:
> 2) improve the LLVM IR code
>
> The code generator in llvmjit-deform.c currently rely on the LLVM optimizer to
> do the right thing. For instance, it can generate a lot of empty blocks with
> only a jump. If we don't want to enable the LLVM optimizer for every code, we
> have to get rid of this kind of pattern. The attached patch does that. When
> the optimizer is not used, this gets a few cycles boost, nothing impressive.
> I have tried to go closer to the optimized bitcode, but it requires building
> phi nodes manually instead of using alloca, and this isn't enough to bring us
> to the performance level of -O1.

Building phi blocks manually is too painful imo. But there's plenty
blocks we could easily skip entirely, even without creating phi nodes.

> From 4da278ee49b91d34120747c6763c248ad52da7b7 Mon Sep 17 00:00:00 2001
> From: Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info>
> Date: Mon, 2 Jul 2018 13:44:10 +0200
> Subject: [PATCH] Introduce opt1 in LLVM/JIT, and force it with deforming

I think I'd rather go for more explicit pipelines than defaulting to OX
pipelines. This is too late for v11, and I suspect quite strongly that
we'll end up not relying on any of the default pipelines going forward -
they're just not targeted at our usecase. I just didn't go there for
v11, because I was running out of steam / time.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-07-13 21:11:31 Re: partition pruning doesn't work with IS NULL clause in multikey range partition case
Previous Message Tom Lane 2018-07-13 20:54:15 Re: cannot restore schema with is not distinct from on hstore since PG 9.6.8