|
17 | 17 | #include <llvm/Analysis/MemorySSA.h>
|
18 | 18 | #include <llvm/IR/IRPrintingPasses.h>
|
19 | 19 | #include <llvm/IR/Instructions.h>
|
| 20 | +#include <llvm/IR/PassManager.h> |
20 | 21 | #include <llvm/IR/Verifier.h>
|
21 | 22 | #include <llvm/Passes/PassBuilder.h>
|
| 23 | +#include <llvm/Passes/StandardInstrumentations.h> |
| 24 | +#include <llvm/Support/Path.h> |
22 | 25 | #include <llvm/Transforms/IPO.h>
|
23 | 26 | #include <llvm/Transforms/IPO/AlwaysInliner.h>
|
24 | 27 | #include <llvm/Transforms/IPO/GlobalOpt.h>
|
|
37 | 40 | #include <llvm/Transforms/Utils/BasicBlockUtils.h>
|
38 | 41 | #include <llvm/Transforms/Utils/Cloning.h>
|
39 | 42 | #include <llvm/Transforms/Utils/Mem2Reg.h>
|
40 |
| -#include "llvm/IR/PassManager.h" |
41 |
| -#include "llvm/Passes/StandardInstrumentations.h" |
42 |
| -#include "llvm/Support/Path.h" |
| 43 | + |
| 44 | +#include <optional> |
43 | 45 |
|
44 | 46 | #include "QueryEngine/Compiler/Exceptions.h"
|
45 | 47 | #include "QueryEngine/Optimization/AnnotateInternalFunctionsPass.h"
|
@@ -188,7 +190,11 @@ void optimize_ir(llvm::Function* query_func,
|
188 | 190 |
|
189 | 191 | llvm::PassBuilder PB(nullptr,
|
190 | 192 | llvm::PipelineTuningOptions(),
|
| 193 | +#if LLVM_VERSION_MAJOR > 15 |
| 194 | + std::nullopt, |
| 195 | +#else |
191 | 196 | llvm::None,
|
| 197 | +#endif |
192 | 198 | (co.dump_llvm_ir_after_each_pass == 2) ? &PIC : nullptr);
|
193 | 199 | llvm::LoopAnalysisManager LAM;
|
194 | 200 | llvm::FunctionAnalysisManager FAM;
|
|
0 commit comments