LLVM  14.0.0git
Public Member Functions | Friends | List of all members
llvm::orc::LLLazyJIT Class Reference

An extended version of LLJIT that supports lazy function-at-a-time compilation of LLVM IR. More...

#include "llvm/ExecutionEngine/Orc/LLJIT.h"

Inheritance diagram for llvm::orc::LLLazyJIT:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::LLLazyJIT:
Collaboration graph
[legend]

Public Member Functions

void setPartitionFunction (CompileOnDemandLayer::PartitionFunction Partition)
 Sets the partition function. More...
 
CompileOnDemandLayergetCompileOnDemandLayer ()
 Returns a reference to the on-demand layer. More...
 
Error addLazyIRModule (JITDylib &JD, ThreadSafeModule M)
 Add a module to be lazily compiled to JITDylib JD. More...
 
Error addLazyIRModule (ThreadSafeModule M)
 Add a module to be lazily compiled to the main JITDylib. More...
 
- Public Member Functions inherited from llvm::orc::LLJIT
 ~LLJIT ()
 Destruct this instance. More...
 
ExecutionSessiongetExecutionSession ()
 Returns the ExecutionSession for this instance. More...
 
const TriplegetTargetTriple () const
 Returns a reference to the triple for this instance. More...
 
const DataLayoutgetDataLayout () const
 Returns a reference to the DataLayout for this instance. More...
 
JITDylibgetMainJITDylib ()
 Returns a reference to the JITDylib representing the JIT'd main program. More...
 
JITDylibgetJITDylibByName (StringRef Name)
 Returns the JITDylib with the given name, or nullptr if no JITDylib with that name exists. More...
 
Expected< JITDylib & > createJITDylib (std::string Name)
 Create a new JITDylib with the given name and return a reference to it. More...
 
Error addIRModule (ResourceTrackerSP RT, ThreadSafeModule TSM)
 Adds an IR module with the given ResourceTracker. More...
 
Error addIRModule (JITDylib &JD, ThreadSafeModule TSM)
 Adds an IR module to the given JITDylib. More...
 
Error addIRModule (ThreadSafeModule TSM)
 Adds an IR module to the Main JITDylib. More...
 
Error addObjectFile (ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > Obj)
 Adds an object file to the given JITDylib. More...
 
Error addObjectFile (JITDylib &JD, std::unique_ptr< MemoryBuffer > Obj)
 Adds an object file to the given JITDylib. More...
 
Error addObjectFile (std::unique_ptr< MemoryBuffer > Obj)
 Adds an object file to the given JITDylib. More...
 
Expected< JITEvaluatedSymbollookupLinkerMangled (JITDylib &JD, SymbolStringPtr Name)
 Look up a symbol in JITDylib JD by the symbol's linker-mangled name (to look up symbols based on their IR name use the lookup function instead). More...
 
Expected< JITEvaluatedSymbollookupLinkerMangled (JITDylib &JD, StringRef Name)
 Look up a symbol in JITDylib JD by the symbol's linker-mangled name (to look up symbols based on their IR name use the lookup function instead). More...
 
Expected< JITEvaluatedSymbollookupLinkerMangled (StringRef Name)
 Look up a symbol in the main JITDylib by the symbol's linker-mangled name (to look up symbols based on their IR name use the lookup function instead). More...
 
Expected< JITEvaluatedSymbollookup (JITDylib &JD, StringRef UnmangledName)
 Look up a symbol in JITDylib JD based on its IR symbol name. More...
 
Expected< JITEvaluatedSymbollookup (StringRef UnmangledName)
 Look up a symbol in the main JITDylib based on its IR symbol name. More...
 
void setPlatformSupport (std::unique_ptr< PlatformSupport > PS)
 Set the PlatformSupport instance. More...
 
PlatformSupportgetPlatformSupport ()
 Get the PlatformSupport instance. More...
 
Error initialize (JITDylib &JD)
 Run the initializers for the given JITDylib. More...
 
Error deinitialize (JITDylib &JD)
 Run the deinitializers for the given JITDylib. More...
 
ObjectLayergetObjLinkingLayer ()
 Returns a reference to the ObjLinkingLayer. More...
 
ObjectTransformLayergetObjTransformLayer ()
 Returns a reference to the object transform layer. More...
 
IRTransformLayergetIRTransformLayer ()
 Returns a reference to the IR transform layer. More...
 
IRCompileLayergetIRCompileLayer ()
 Returns a reference to the IR compile layer. More...
 
std::string mangle (StringRef UnmangledName) const
 Returns a linker-mangled version of UnmangledName. More...
 
SymbolStringPtr mangleAndIntern (StringRef UnmangledName) const
 Returns an interned, linker-mangled version of UnmangledName. More...
 

Friends

template<typename , typename , typename >
class LLJITBuilderSetters
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::orc::LLJIT
 LLJIT (LLJITBuilderState &S, Error &Err)
 Create an LLJIT instance with a single compile thread. More...
 
Error applyDataLayout (Module &M)
 
void recordCtorDtors (Module &M)
 
- Static Protected Member Functions inherited from llvm::orc::LLJIT
static Expected< std::unique_ptr< ObjectLayer > > createObjectLinkingLayer (LLJITBuilderState &S, ExecutionSession &ES)
 
static Expected< std::unique_ptr< IRCompileLayer::IRCompiler > > createCompileFunction (LLJITBuilderState &S, JITTargetMachineBuilder JTMB)
 
- Protected Attributes inherited from llvm::orc::LLJIT
std::unique_ptr< ExecutionSessionES
 
std::unique_ptr< PlatformSupportPS
 
JITDylibMain = nullptr
 
DataLayout DL
 
Triple TT
 
std::unique_ptr< ThreadPoolCompileThreads
 
std::unique_ptr< ObjectLayerObjLinkingLayer
 
std::unique_ptr< ObjectTransformLayerObjTransformLayer
 
std::unique_ptr< IRCompileLayerCompileLayer
 
std::unique_ptr< IRTransformLayerTransformLayer
 
std::unique_ptr< IRTransformLayerInitHelperTransformLayer
 

Detailed Description

An extended version of LLJIT that supports lazy function-at-a-time compilation of LLVM IR.

Definition at line 220 of file LLJIT.h.

Member Function Documentation

◆ addLazyIRModule() [1/2]

Error llvm::orc::LLLazyJIT::addLazyIRModule ( JITDylib JD,
ThreadSafeModule  M 
)

Add a module to be lazily compiled to JITDylib JD.

Definition at line 857 of file LLJIT.cpp.

References assert().

Referenced by addLazyIRModule().

◆ addLazyIRModule() [2/2]

Error llvm::orc::LLLazyJIT::addLazyIRModule ( ThreadSafeModule  M)
inline

Add a module to be lazily compiled to the main JITDylib.

Definition at line 238 of file LLJIT.h.

References addLazyIRModule(), M, llvm::orc::LLJIT::Main, and move.

◆ getCompileOnDemandLayer()

CompileOnDemandLayer& llvm::orc::LLLazyJIT::getCompileOnDemandLayer ( )
inline

Returns a reference to the on-demand layer.

Definition at line 232 of file LLJIT.h.

◆ setPartitionFunction()

void llvm::orc::LLLazyJIT::setPartitionFunction ( CompileOnDemandLayer::PartitionFunction  Partition)
inline

Sets the partition function.

Definition at line 227 of file LLJIT.h.

References move.

Friends And Related Function Documentation

◆ LLJITBuilderSetters

template<typename , typename , typename >
friend class LLJITBuilderSetters
friend

Definition at line 221 of file LLJIT.h.


The documentation for this class was generated from the following files: