Re: broken JIT support on Fedora 40
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, Pavel Stehule <pavel.stehule@gmail.com>, Robert Haas <robertmhaas@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-04-10T20:23:52Z
Lists: pgsql-hackers
Hi, On 2024-04-10 22:15:27 +0200, Dmitry Dolgov wrote: > > On Wed, Apr 10, 2024 at 12:43:23PM +1200, Thomas Munro wrote: > > On Tue, Apr 9, 2024 at 10:05 PM Dmitry Dolgov <9erthalion6@gmail.com> wrote: > > > + /* In assertion builds, run the LLVM verify pass. */ > > > +#ifdef USE_ASSERT_CHECKING > > > + LLVMPassBuilderOptionsSetVerifyEach(options, true); > > > +#endif > > > > Thanks, that seems nicer. I think the question is whether it will > > slow down build farm/CI/local meson test runs to a degree that exceeds > > its value. Another option would be to have some other opt-in macro, > > like the existing #ifdef LLVM_PASS_DEBUG, for people who maintain > > JIT-related stuff to turn on. > > Oh, I see. I'm afraid I don't have enough knowledge of the CI pipeline, > but at least locally for me installcheck became only few percent slower > with the verify pass. I think it's worthwhile to add. It makes some problems so much easier to find. And if you're building with debug enabled llvm, performance is so atrocious anyway, that this isn't going to change the big picture... > > Supposing we go with USE_ASSERT_CHECKING, I have another question: > > > > - const char *nm = "llvm.lifetime.end.p0i8"; > > + const char *nm = "llvm.lifetime.end.p0"; > > > > Was that a mistake, or did the mangling rules change in some version? > > I'm not sure, but inclined to think it's the same as with noundef -- a > mistake, which was revealed in some recent version of LLVM. From what I > understand the suffix i8 indicates an overloaded argument of that type, > which is probably not needed. At the same time I can't get this error > from the verify pass with LLVM-12 or LLVM-15 (I have those at hand by > accident). To make it even more confusing I've found a few similar > examples in other projects, where this was really triggered by an issue > in LLVM [1]. I'm afraid that it actually has changed over time, I'm fairly sure that it was required at some point. Greetings, Andres Freund
Commits
-
Run LLVM verify pass on IR in assert builds.
- 8583b1f99340 18.0 landed
-
Fix illegal attribute propagation in LLVM JIT.
- 01b55203ace0 12.19 landed
- 4f90750b5326 13.15 landed
- 7fe32eaa4a87 14.12 landed
- 74992929a79e 15.7 landed
- 53c8d6c9f157 17.0 landed
- bf1cfe77ed49 16.3 landed
-
Track LLVM 18 changes.
- d282e88e5052 17.0 cited
-
jit: Changes for LLVM 17.
- 76200e5ee469 17.0 cited