Re: broken JIT support on Fedora 40

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: broken JIT support on Fedora 40
Дата
Msg-id 20240405160109.fhxm2izluogzwik3@erthalion.local
обсуждение исходный текст
Ответ на Re: broken JIT support on Fedora 40  (Dmitry Dolgov <9erthalion6@gmail.com>)
Ответы Re: broken JIT support on Fedora 40  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
> On Fri, Apr 05, 2024 at 03:50:50PM +0200, Dmitry Dolgov wrote:
> > On Fri, Apr 05, 2024 at 03:21:06PM +0200, Dmitry Dolgov wrote:
> > > On Sat, Apr 06, 2024 at 02:00:38AM +1300, Thomas Munro wrote:
> > > On Sun, Mar 31, 2024 at 12:49 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > > > https://github.com/llvm/llvm-project/pull/87093
> > >
> > > Oh, with those clues, I think I might see...  It is a bit strange that
> > > we copy attributes from AttributeTemplate(), a function that returns
> > > Datum, to our void deform function.  It works (I mean doesn't crash)
> > > if you just comment this line out:
> > >
> > >     llvm_copy_attributes(AttributeTemplate, v_deform_fn);
> > >
> > > ... but I guess that disables inlining of the deform function?  So
> > > perhaps we just need to teach that thing not to try to copy the return
> > > value's attributes, which also seems to work here:
> >
> > Yep, I think this is it. I've spent some hours trying to understand why
> > suddenly deform function has noundef ret attribute, when it shouldn't --
> > this explains it and the proposed change fixes the crash. One thing that
> > is still not clear to me though is why this copied attribute doesn't
> > show up in the bitcode dumped right before running inline pass (I've
> > added this to troubleshoot the issue).
>
> One thing to consider in this context is indeed adding "verify" pass as
> suggested in the PR, at least for the debugging configuration. Without the fix
> it immediately returns:
>
>     Running analysis: VerifierAnalysis on deform_0_1
>     Attribute 'noundef' applied to incompatible type!
>
>     llvm error: Broken function found, compilation aborted!

Here is what I have in mind. Interestingly enough, it also shows few
more errors besides "noundef":

    Intrinsic name not mangled correctly for type arguments! Should be: llvm.lifetime.end.p0
    ptr @llvm.lifetime.end.p0i8

It refers to the function from create_LifetimeEnd, not sure how
important is this.

Вложения

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

Предыдущее
От: Pavel Borisov
Дата:
Сообщение: Re: Table AM Interface Enhancements
Следующее
От: Robert Haas
Дата:
Сообщение: Re: documentation structure