summaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm
diff options
context:
space:
mode:
authorPeter Eisentraut2024-10-01 09:05:51 +0000
committerPeter Eisentraut2024-10-01 10:10:15 +0000
commitee4859123e3d47aef8cfe078f7faee2ebcecb613 (patch)
tree9fe243917dd9ee551b661c669384c5b5d2909fb3 /src/backend/jit/llvm
parent972c2cd2882b6dd7a2059d030d03e89dae47ede7 (diff)
jit: Use opaque pointers in all supported LLVM versions.
LLVM's opaque pointer change began in LLVM 14, but remained optional until LLVM 16. When commit 37d5babb added opaque pointer support, we didn't turn it on for LLVM 14 and 15 yet because we didn't want to risk weird bitcode incompatibility problems in released branches of PostgreSQL. (That might have been overly cautious, I don't know.) Now that PostgreSQL 18 has dropped support for LLVM versions < 14, and since it hasn't been released yet and no extensions or bitcode have been built against it in the wild yet, we can be more aggressive. We can rip out the support code and build system clutter that made opaque pointer use optional. Author: Thomas Munro <[email protected]> Reviewed-by: Peter Eisentraut <[email protected]> Discussions: https://postgr.es/m/CA%2BhUKGLhNs5geZaVNj2EJ79Dx9W8fyWUU3HxcpZy55sMGcY%3DiA%40mail.gmail.com
Diffstat (limited to 'src/backend/jit/llvm')
-rw-r--r--src/backend/jit/llvm/llvmjit.c13
-rw-r--r--src/backend/jit/llvm/meson.build3
2 files changed, 0 insertions, 16 deletions
diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c
index 2a83415d439..f346af9c755 100644
--- a/src/backend/jit/llvm/llvmjit.c
+++ b/src/backend/jit/llvm/llvmjit.c
@@ -841,19 +841,6 @@ llvm_session_initialize(void)
}
/*
- * When targeting LLVM 15, turn off opaque pointers for the context we
- * build our code in. We don't need to do so for other contexts (e.g.
- * llvm_ts_context). Once the IR is generated, it carries the necessary
- * information.
- *
- * For 16 and above, opaque pointers must be used, and we have special
- * code for that.
- */
-#if LLVM_VERSION_MAJOR == 15
- LLVMContextSetOpaquePointers(LLVMGetGlobalContext(), false);
-#endif
-
- /*
* Synchronize types early, as that also includes inferring the target
* triple.
*/
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index 4a4232661ba..c1b6a9363eb 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -60,9 +60,6 @@ endif
# XXX: Need to determine proper version of the function cflags for clang
bitcode_cflags = ['-fno-strict-aliasing', '-fwrapv']
-if llvm.version().version_compare('=15.0')
- bitcode_cflags += ['-Xclang', '-no-opaque-pointers']
-endif
bitcode_cflags += get_option('c_args')
bitcode_cflags += cppflags