Re: Optimizing PostgreSQL with LLVM's PGO+LTO - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Optimizing PostgreSQL with LLVM's PGO+LTO
Date
Msg-id 20230127230850.swranm4ikydcmjpe@awork3.anarazel.de
Whole thread Raw
In response to Re: Optimizing PostgreSQL with LLVM's PGO+LTO  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Optimizing PostgreSQL with LLVM's PGO+LTO
List pgsql-hackers
Hi,

On 2023-01-27 15:06:37 -0500, Tom Lane wrote:
> There are a lot of places where we're implicitly relying on
> cross-compilation-unit optimizations NOT happening, because the code isn't
> adequately decorated with memory barriers and the like.

We have a fallback compiler barrier implementation doing that, but it
shouldn't be used on any halfway reasonable compiler. Cross-compilation-unit
calls don't provide a memory barrier - I assume you're thinking about a
compiler barrier?

I'm sure we have a few places that aren't that careful, but I would hope it's
not a large number. Are you thinking of specific "patterns" we've repeated all
over, or just a few cases you recall?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Optimizing PostgreSQL with LLVM's PGO+LTO
Next
From: Nathan Bossart
Date:
Subject: Re: improving user.c error messages