public inbox for [email protected]
help / color / mirror / Atom feedFrom: Andres Freund <[email protected]>
To: Dmitry Dolgov <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Devrim Gündüz <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: Fabien COELHO <[email protected]>
Cc: Ronan Dunklau <[email protected]>
Subject: Re: LLVM 16 (opaque pointers)
Date: Fri, 13 Oct 2023 07:55:10 -0700
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CA+hUKGKNX_=f+1C4r06WETKTq0G4Z_7q4L4Fxn5WWpMycDj9Fw@mail.gmail.com>
<CA+hUKG+WXznXCyTgCADd=HWkP9Qksa6chd7L=GCnZo-MBgg9Lg@mail.gmail.com>
<[email protected]>
<CA+hUKG+UQq_qZWuAd8Mv=RpL4sACEb=4UNgNL2--=xZHixVspg@mail.gmail.com>
<[email protected]>
<CA+hUKGLdgmOGFUEefFGCaofPCsPj4WoCFJ-NpFTMjOFQnaog_w@mail.gmail.com>
<CA+hUKGJnG8jJJkyULpg1xTxzNtL2FreS4C16TFcRLwu8RR1yUQ@mail.gmail.com>
<[email protected]>
<[email protected]>
Hi,
On 2023-10-13 11:06:21 +0200, Dmitry Dolgov wrote:
> > On Thu, Oct 12, 2023 at 04:31:20PM -0700, Andres Freund wrote:
> > I also don't think we should add the mem2reg pass outside of -O0 - running it
> > after a real optimization pipeline doesn't seem useful and might even make the
> > code worse? mem2reg is included in default<O1> (and obviously also in O3).
>
> My understanding was that while mem2reg is included everywhere above
> -O0, this set of passes won't hurt. But yeah, if you say it could
> degrade the final result, it's better to not do this. I'll update this
> part.
It's indeed included anywhere above that, but adding it explicitly to the
schedule means it's excuted twice:
echo 'int foo(int a) { return a / 343; }' | clang-16 -emit-llvm -x c -c -o - -S -|sed -e 's/optnone//'|opt-17 -debug-pass-manager -passes='default<O1>,mem2reg' -o /dev/null 2>&1|grep Promote
Running pass: PromotePass on foo (2 instructions)
Running pass: PromotePass on foo (2 instructions)
The second one is in a point in the pipeline where it doesn't help. It also
requires another analysis pass to be executed unnecessarily.
Greetings,
Andres Freund
view thread (9+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: LLVM 16 (opaque pointers)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox