Re: LLVM 16 (opaque pointers)

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: LLVM 16 (opaque pointers)
Дата
Msg-id 20231013090621.jmnlnij5slwiwwym@erthalion.local
обсуждение исходный текст
Ответ на Re: LLVM 16 (opaque pointers)  (Andres Freund <andres@anarazel.de>)
Ответы Re: LLVM 16 (opaque pointers)  (Dmitry Dolgov <9erthalion6@gmail.com>)
Re: LLVM 16 (opaque pointers)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
> 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.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrei Lepikhov
Дата:
Сообщение: Re: Removing unneeded self joins
Следующее
От: Benoit Lobréau
Дата:
Сообщение: Re: Questions about the new subscription parameter: password_required