public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dmitry Dolgov <[email protected]>
To: Andres Freund <[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 11:06:21 +0200
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]>

> On Thu, Oct 12, 2023 at 04:31:20PM -0700, Andres Freund wrote:
> Hi,
>
> On 2023-10-11 21:59:50 +1300, Thomas Munro wrote:
> > +#else
> > +	LLVMPassBuilderOptionsRef options;
> > +	LLVMErrorRef err;
> > +	int			compile_optlevel;
> > +	char	   *passes;
> > +
> > +	if (context->base.flags & PGJIT_OPT3)
> > +		compile_optlevel = 3;
> > +	else
> > +		compile_optlevel = 0;
> > +
> > +	passes = psprintf("default<O%d>,mem2reg,function(no-op-function),no-op-module",
> > +					  compile_optlevel);
>
> I don't think the "function(no-op-function),no-op-module" bit does something
> particularly useful?

Right, looks like leftovers after verifying which passes were actually
applied. My bad, could be removed.

> 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.






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