summaryrefslogtreecommitdiffstats
path: root/eval
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-09-18 18:00:23 +0200
committerTor Egge <Tor.Egge@online.no>2022-09-18 18:00:23 +0200
commit3e71efd8f700b471dba962be315473c35e4c67ca (patch)
tree0101db46e2e4a3823566ba40e320c780abd2c923 /eval
parentd2574e6352c26d9d40256e606376a3e0f6638225 (diff)
Drop support for llvm versions < 11.
Diffstat (limited to 'eval')
-rw-r--r--eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp b/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
index 08cf3330157..158bc91dd6a 100644
--- a/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
+++ b/eval/src/vespa/eval/eval/llvm/llvm_wrapper.cpp
@@ -16,9 +16,7 @@
#include <llvm/IR/DataLayout.h>
#include <llvm/Transforms/Scalar.h>
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
-#if LLVM_VERSION_MAJOR > 9
#include <llvm/Support/ManagedStatic.h>
-#endif
#include <vespa/eval/eval/check_type.h>
#include <vespa/vespalib/stllike/hash_set.h>
#include <vespa/vespalib/util/approx.h>
@@ -339,7 +337,6 @@ struct FunctionBuilder : public NodeVisitor, public NodeTraverser {
llvm::Value *a = pop_double();
push(builder.CreateCall(fun, a));
}
-#if LLVM_VERSION_MAJOR >= 9
void make_call_1(llvm::FunctionCallee fun) {
if (!fun || fun.getFunctionType()->getNumParams() != 1) {
return make_error(1);
@@ -347,16 +344,11 @@ struct FunctionBuilder : public NodeVisitor, public NodeTraverser {
llvm::Value *a = pop_double();
push(builder.CreateCall(fun, a));
}
-#endif
void make_call_1(const llvm::Intrinsic::ID &id) {
make_call_1(llvm::Intrinsic::getDeclaration(&module, id, builder.getDoubleTy()));
}
void make_call_1(const char *name) {
-#if LLVM_VERSION_MAJOR >= 9
make_call_1(module.getOrInsertFunction(name, make_call_1_fun_t()));
-#else
- make_call_1(llvm::dyn_cast<llvm::Function>(module.getOrInsertFunction(name, make_call_1_fun_t())));
-#endif
}
void make_call_2(llvm::Function *fun) {
@@ -367,7 +359,6 @@ struct FunctionBuilder : public NodeVisitor, public NodeTraverser {
llvm::Value *a = pop_double();
push(builder.CreateCall(fun, {a, b}));
}
-#if LLVM_VERSION_MAJOR >= 9
void make_call_2(llvm::FunctionCallee fun) {
if (!fun || fun.getFunctionType()->getNumParams() != 2) {
return make_error(2);
@@ -376,16 +367,11 @@ struct FunctionBuilder : public NodeVisitor, public NodeTraverser {
llvm::Value *a = pop_double();
push(builder.CreateCall(fun, {a, b}));
}
-#endif
void make_call_2(const llvm::Intrinsic::ID &id) {
make_call_2(llvm::Intrinsic::getDeclaration(&module, id, builder.getDoubleTy()));
}
void make_call_2(const char *name) {
-#if LLVM_VERSION_MAJOR >= 9
make_call_2(module.getOrInsertFunction(name, make_call_2_fun_t()));
-#else
- make_call_2(llvm::dyn_cast<llvm::Function>(module.getOrInsertFunction(name, make_call_2_fun_t())));
-#endif
}
//-------------------------------------------------------------------------