Re: LLVM 16 (opaque pointers)
Ronan Dunklau <ronan.dunklau@aiven.io>
From: Ronan Dunklau <ronan.dunklau@aiven.io>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Thomas Munro <thomas.munro@gmail.com>
Date: 2023-08-10T14:56:54Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
jit: Adjust back-patch of f90b4a84 to 12 and 13.
- 9ad98627614b 12.17 landed
- 7c070e224c4a 13.13 landed
-
Log LLVM library version in configure output.
- 0a6e2c7f8694 11.22 landed
- 527e62a5e5d7 12.17 landed
- a13b63c788a3 13.13 landed
- 03e749c2b89e 14.10 landed
- 0e49e23782c5 15.5 landed
- 3b0f20f6ce14 16.1 landed
- 5e4dacb9878c 17.0 landed
-
jit: Changes for LLVM 17.
- 7da915e33abf 12.17 landed
- 53c4dabe18d3 13.13 landed
- 0a8b7d5c1126 14.10 landed
- b60e3ac7603d 15.5 landed
- 774185056834 16.1 landed
- 76200e5ee469 17.0 landed
-
jit: Supply LLVMGlobalGetValueType() for LLVM < 8.
- 60596f148a66 16.1 landed
- d701f0d1f3e7 12.17 landed
- 981292c19f38 13.13 landed
- ee3e4c41f354 14.10 landed
- b2e097788663 15.5 landed
- f90b4a846b32 17.0 landed
-
jit: Support opaque pointers in LLVM 16.
- 15ddc9725eb7 12.17 landed
- f28956b239f1 13.13 landed
- 82d9a782a296 14.10 landed
- eed1feb3fee1 15.5 landed
- 74d19ec096df 16.1 landed
- 37d5babb5cfa 17.0 landed
-
jit: Reference function pointer types via llvmjit_types.c.
- df99ddc70b97 14.0 cited
Le dimanche 21 mai 2023, 05:01:41 CEST Thomas Munro a écrit : > Hi, > > Here is a draft version of the long awaited patch to support LLVM 16. > It's mostly mechanical donkeywork, but it took some time: this donkey > found it quite hard to understand the mighty getelementptr > instruction[1] and the code generation well enough to figure out all > the right types, and small mistakes took some debugging effort*. I > now finally have a patch that passes all tests. > > Though it's not quite ready yet, I thought I should give this status > update to report that the main task is more or less complete, since > we're starting to get quite a few emails about it (mostly from Fedora > users) and there is an entry for it on the Open Items for 16 wiki > page. Comments/review/testing welcome. Hello Thomas, Thank you for this effort ! I've tested it against llvm 15 and 16, and found no problem with it. > 6. I need to go through the types again with a fine tooth comb, and > check the test coverage to look out for eg GEP array arithmetic with > the wrong type/size that isn't being exercised. I haven't gone through the test coverage myself, but I exercised the following things: - running make installcheck with jit_above_cost = 0 - letting sqlsmith hammer random queries at it for a few hours. This didn't show obvious issues. > *For anyone working with this type of IR generation code and > questioning their sanity, I can pass on some excellent advice I got > from Andres: build LLVM yourself with assertions enabled, as they > catch some classes of silly mistake that otherwise just segfault > > inscrutably on execution. I tried my hand at backporting it to previous versions, and not knowing anything about it made me indeed question my sanity. It's quite easy for PG 15, 14, 13. PG 12 is nothing insurmontable either, but PG 11 is a bit hairier most notably due to to the change in fcinfo args representation. But I guess that's also a topic for another day :-) Best regards, -- Ronan Dunklau