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?

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


Thanks for working on this stuff!


I'm working on setting up buildfarm animals for 16, 17, each once with
a normal and an assertion enabled LLVM build.

Greetings,

Andres Freund


Reply via email to