aboutsummaryrefslogtreecommitdiff
path: root/src/backend/jit/llvm/llvmjit_inline.cpp
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-10-01 04:49:11 -0400
committerPeter Eisentraut <peter@eisentraut.org>2024-10-01 04:49:11 -0400
commit972c2cd2882b6dd7a2059d030d03e89dae47ede7 (patch)
tree854f3705f09fbe826577a0d575173aab3c0dd6e5 /src/backend/jit/llvm/llvmjit_inline.cpp
parent1b4d52c3556b9abad10165ce7298062cf7eb7005 (diff)
downloadpostgresql-972c2cd2882b6dd7a2059d030d03e89dae47ede7.tar.gz
postgresql-972c2cd2882b6dd7a2059d030d03e89dae47ede7.zip
jit: Require at least LLVM 14, if enabled.
Remove support for LLVM versions 10-13. The default on all non-EOL'd OSes represented in our build farm will be at least LLVM 14 when PostgreSQL 18 ships. Author: Thomas Munro <thomas.munro@gmail.com> Reviewed-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/CA%2BhUKGLhNs5geZaVNj2EJ79Dx9W8fyWUU3HxcpZy55sMGcY%3DiA%40mail.gmail.com
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_inline.cpp')
-rw-r--r--src/backend/jit/llvm/llvmjit_inline.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/backend/jit/llvm/llvmjit_inline.cpp b/src/backend/jit/llvm/llvmjit_inline.cpp
index 2007eb523c9..23a8053311d 100644
--- a/src/backend/jit/llvm/llvmjit_inline.cpp
+++ b/src/backend/jit/llvm/llvmjit_inline.cpp
@@ -594,10 +594,6 @@ function_inlinable(llvm::Function &F,
if (F.materialize())
elog(FATAL, "failed to materialize metadata");
-#if LLVM_VERSION_MAJOR < 14
-#define hasFnAttr hasFnAttribute
-#endif
-
if (F.getAttributes().hasFnAttr(llvm::Attribute::NoInline))
{
ilog(DEBUG1, "ineligibile to import %s due to noinline",
@@ -858,9 +854,6 @@ create_redirection_function(std::unique_ptr<llvm::Module> &importMod,
llvm::Function *AF;
llvm::BasicBlock *BB;
llvm::CallInst *fwdcall;
-#if LLVM_VERSION_MAJOR < 14
- llvm::Attribute inlineAttribute;
-#endif
AF = llvm::Function::Create(F->getFunctionType(),
LinkageTypes::AvailableExternallyLinkage,
@@ -869,13 +862,7 @@ create_redirection_function(std::unique_ptr<llvm::Module> &importMod,
Builder.SetInsertPoint(BB);
fwdcall = Builder.CreateCall(F, &*AF->arg_begin());
-#if LLVM_VERSION_MAJOR < 14
- inlineAttribute = llvm::Attribute::get(Context,
- llvm::Attribute::AlwaysInline);
- fwdcall->addAttribute(~0U, inlineAttribute);
-#else
fwdcall->addFnAttr(llvm::Attribute::AlwaysInline);
-#endif
Builder.CreateRet(fwdcall);
return AF;