5 #ifndef ROADRUNNER_LLJIT_H
6 #define ROADRUNNER_LLJIT_H
10 #include "SBMLModelObjectCache.h"
13 #pragma warning(disable: 4146)
14 #pragma warning(disable: 4141)
15 #pragma warning(disable: 4267)
16 #pragma warning(disable: 4624)
19 #include <llvm/IRReader/IRReader.h>
21 #include "llvm/ExecutionEngine/Orc/LLJIT.h"
22 #include "llvm/Support/SourceMgr.h"
25 #pragma warning(default: 4146)
26 #pragma warning(default: 4141)
27 #pragma warning(default: 4267)
28 #pragma warning(default: 4624)
35 class SBMLModelObjectCache;
47 ~
LLJit()
override =
default;
49 std::string mangleName(
const std::string &unmangledName)
const override;
51 explicit LLJit(std::uint32_t options);
53 void mapFunctionsToJitSymbols()
override;
55 std::uint64_t lookupFunctionAddress(
const std::string &name)
override;
57 void addObjectFile(rrOwningBinary owningObject)
override;
59 const llvm::DataLayout &getDataLayout()
const override;
61 void addModule(llvm::Module *M)
override;
63 void addModule()
override;
65 void addObjectFile(std::unique_ptr<llvm::MemoryBuffer> obj)
override;
67 void addObjectFile(std::unique_ptr<llvm::object::ObjectFile> objectFile)
override;
69 void addModule(llvm::orc::ThreadSafeModule tsm);
71 void addModule(std::unique_ptr<llvm::Module> M, std::unique_ptr<llvm::LLVMContext> ctx)
override;
81 std::unique_ptr<llvm::MemoryBuffer> getCompiledModelFromCache(
const std::string& sbmlMD5)
override;
83 llvm::orc::LLJIT *getLLJitNonOwning();
92 friend std::ostream& operator<<(std::ostream& os,
LLJit* llJit);
94 std::string getModuleAsString(std::string sbmlMD5)
override;
101 std::unique_ptr<llvm::orc::LLJIT> llJit;
102 llvm::TargetMachine* targetMachineNonOwning =
nullptr;
superclass of all Jit types.
Definition: Jit.h:150
Thin layer around the llvm::orc::LLJit.
Definition: LLJit.h:42