Rebased over ca89db5f. I looked into whether we could drop the "old pass manager" code too[1]. Almost, but nope, even the C++ API lacks a way to set the inline threshold before LLVM 16, so that would cause a regression. Although we just hard-code the threshold to 512 with a comment that sounds like it's pretty arbitrary, a change to the default (225?) would be unjustifiable just for code cleanup. Oh well.
[1] https://github.com/macdice/postgres/commit/0d40abdf1feb75210c3a3d2a35e3d6146185974c
v2-0001-jit-Require-at-least-LLVM-14-if-enabled.patch
Description: Binary data
v2-0002-jit-Use-opaque-pointers-in-all-supported-LLVM-ver.patch
Description: Binary data