14 #ifndef LLVM_EXECUTIONENGINE_ORC_LLJIT_H 15 #define LLVM_EXECUTIONENGINE_ORC_LLJIT_H 44 unsigned NumCompileThreads = 0);
54 return ES->createJITDylib(std::move(Name));
112 LLJIT(std::unique_ptr<ExecutionSession>
ES, std::unique_ptr<TargetMachine>
TM,
125 std::unique_ptr<ExecutionSession>
ES;
152 TransformLayer.setTransform(std::move(Transform));
158 CODLayer.setPartitionFunction(std::move(Partition));
166 return addLazyIRModule(
Main, std::move(M));
174 std::unique_ptr<LazyCallThroughManager> LCTMgr,
175 std::function<std::unique_ptr<IndirectStubsManager>()> ISMBuilder);
180 std::unique_ptr<LazyCallThroughManager> LCTMgr,
181 std::function<std::unique_ptr<IndirectStubsManager>()> ISMBuilder);
183 std::unique_ptr<LazyCallThroughManager> LCTMgr;
184 std::function<std::unique_ptr<IndirectStubsManager>()> ISMBuilder;
193 #endif // LLVM_EXECUTIONENGINE_ORC_LLJIT_H ExecutionSession & getExecutionSession()
Returns the ExecutionSession for this instance.
A parsed version of the target data layout string in and methods for querying it. ...
IRCompileLayer CompileLayer
Error addObjectFile(std::unique_ptr< MemoryBuffer > Obj)
Adds an object file to the given JITDylib.
JITDylib & createJITDylib(std::string Name)
Create a new JITDylib with the given name and return a reference to it.
This class represents lattice values for constants.
Error defineAbsolute(StringRef Name, JITEvaluatedSymbol Address)
Convenience method for defining an absolute symbol.
A Module instance is used to store all the information related to an LLVM module. ...
Error addIRModule(JITDylib &JD, ThreadSafeModule TSM)
Convenience method for defining an.
Error runConstructors()
Runs all not-yet-run static constructors.
RTDyldObjectLinkingLayer ObjLinkingLayer
amdgpu Simplify well known AMD library false Value Value const Twine & Name
std::function< Optional< GlobalValueSet >(GlobalValueSet Requested)> PartitionFunction
Partitioning function.
Tagged union holding either a T or a Error.
CtorDtorRunner DtorRunner
uint64_t JITTargetAddress
Represents an address in the target process's address space.
Error addLazyIRModule(ThreadSafeModule M)
Add a module to be lazily compiled to the main JITDylib.
Error runDestructors()
Runs all not-yet-run static destructors.
static Expected< std::unique_ptr< LLJIT > > Create(JITTargetMachineBuilder JTMB, DataLayout DL, unsigned NumCompileThreads=0)
Create an LLJIT instance.
Expected< JITEvaluatedSymbol > lookup(StringRef UnmangledName)
Look up a symbol in the main JITDylib based on its IR symbol name.
std::string mangle(StringRef UnmangledName)
LLJIT(std::unique_ptr< ExecutionSession > ES, std::unique_ptr< TargetMachine > TM, DataLayout DL)
Create an LLJIT instance with a single compile thread.
An LLVM Module together with a shared ThreadSafeContext.
CtorDtorRunner CtorRunner
Expected< JITEvaluatedSymbol > lookup(JITDylib &JD, StringRef UnmangledName)
Look up a symbol in JITDylib JD based on its IR symbol name.
void setLazyCompileTransform(IRTransformLayer::TransformFunction Transform)
Set an IR transform (e.g.
std::unique_ptr< ThreadPool > CompileThreads
std::unique_ptr< ExecutionSession > ES
void recordCtorDtors(Module &M)
Expected< JITEvaluatedSymbol > lookupLinkerMangled(StringRef Name)
Look up a symbol in the main JITDylib by the symbol's linker-mangled name (to look up symbols based o...
A pre-fabricated ORC JIT stack that can serve as an alternative to MCJIT.
An ExecutionSession represents a running JIT program.
An extended version of LLJIT that supports lazy function-at-a-time compilation of LLVM IR...
void setPartitionFunction(CompileOnDemandLayer::PartitionFunction Partition)
Sets the partition function.
Represents a symbol that has been evaluated to an address already.
Error addIRModule(ThreadSafeModule TSM)
Adds an IR module to the Main JITDylib.
RTDyldObjectLinkingLayer & getObjLinkingLayer()
Returns a reference to the ObjLinkingLayer.
Expected< JITEvaluatedSymbol > lookupLinkerMangled(JITDylib &JD, StringRef Name)
Look up a symbol in JITDylib JD by the symbol's linker-mangled name (to look up symbols based on thei...
Error addObjectFile(JITDylib &JD, std::unique_ptr< MemoryBuffer > Obj)
Adds an object file to the given JITDylib.
Error applyDataLayout(Module &M)
~LLJIT()
Destruct this instance.
Lightweight error class with error context and mandatory checking.
print Print MemDeps of function
StringRef - Represent a constant reference to a string, i.e.
JITDylib & getMainJITDylib()
Returns a reference to the JITDylib representing the JIT'd main program.
A symbol table that supports asynchoronous symbol queries.
A utility class for building TargetMachines for JITs.