LLVM: llvm::orc::LLJIT Class Reference (original) (raw)

A pre-fabricated ORC JIT stack that can serve as an alternative to MCJIT. More...

#include "[llvm/ExecutionEngine/Orc/LLJIT.h](llvm%5F2ExecutionEngine%5F2Orc%5F2LLJIT%5F8h%5Fsource.html)"

Public Member Functions
virtual ~LLJIT ()
Destruct this instance.
ExecutionSession & getExecutionSession ()
Returns the ExecutionSession for this instance.
const Triple & getTargetTriple () const
Returns a reference to the triple for this instance.
const DataLayout & getDataLayout () const
Returns a reference to the DataLayout for this instance.
JITDylib & getMainJITDylib ()
Returns a reference to the JITDylib representing the JIT'd main program.
JITDylibSP getProcessSymbolsJITDylib ()
Returns the ProcessSymbols JITDylib, which by default reflects non-JIT'd symbols in the host process.
JITDylibSP getPlatformJITDylib ()
Returns the Platform JITDylib, which will contain the ORC runtime (if given) and any platform symbols.
JITDylib * getJITDylibByName (StringRef Name)
Returns the JITDylib with the given name, or nullptr if no JITDylib with that name exists.
Expected< JITDylib & > loadPlatformDynamicLibrary (const char *Path)
Load a (real) dynamic library and make its symbols available through a new JITDylib with the same name.
Error linkStaticLibraryInto (JITDylib &JD, std::unique_ptr< MemoryBuffer > LibBuffer)
Link a static library into the given JITDylib.
Error linkStaticLibraryInto (JITDylib &JD, const char *Path)
Link a static library into the given JITDylib.
Expected< JITDylib & > createJITDylib (std::string Name)
Create a new JITDylib with the given name and return a reference to it.
JITDylibSearchOrder defaultLinkOrder ()
Returns the default link order for this LLJIT instance.
Error addIRModule (ResourceTrackerSP RT, ThreadSafeModule TSM)
Adds an IR module with the given ResourceTracker.
Error addIRModule (JITDylib &JD, ThreadSafeModule TSM)
Adds an IR module to the given JITDylib.
Error addIRModule (ThreadSafeModule TSM)
Adds an IR module to the Main JITDylib.
Error addObjectFile (ResourceTrackerSP RT, std::unique_ptr< MemoryBuffer > Obj)
Adds an object file to the given JITDylib.
Error addObjectFile (JITDylib &JD, std::unique_ptr< MemoryBuffer > Obj)
Adds an object file to the given JITDylib.
Error addObjectFile (std::unique_ptr< MemoryBuffer > Obj)
Adds an object file to the given JITDylib.
Expected< ExecutorAddr > lookupLinkerMangled (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).
Expected< ExecutorAddr > 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 their IR name use the lookup function instead).
Expected< ExecutorAddr > lookupLinkerMangled (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).
Expected< ExecutorAddr > lookup (JITDylib &JD, StringRef UnmangledName)
Look up a symbol in JITDylib JD based on its IR symbol name.
Expected< ExecutorAddr > lookup (StringRef UnmangledName)
Look up a symbol in the main JITDylib based on its IR symbol name.
void setPlatformSupport (std::unique_ptr< PlatformSupport > PS)
Set the PlatformSupport instance.
PlatformSupport * getPlatformSupport ()
Get the PlatformSupport instance.
Error initialize (JITDylib &JD)
Run the initializers for the given JITDylib.
Error deinitialize (JITDylib &JD)
Run the deinitializers for the given JITDylib.
ObjectLayer & getObjLinkingLayer ()
Returns a reference to the ObjLinkingLayer.
ObjectTransformLayer & getObjTransformLayer ()
Returns a reference to the object transform layer.
IRTransformLayer & getIRTransformLayer ()
Returns a reference to the IR transform layer.
IRCompileLayer & getIRCompileLayer ()
Returns a reference to the IR compile layer.
std::string mangle (StringRef UnmangledName) const
Returns a linker-mangled version of UnmangledName.
SymbolStringPtr mangleAndIntern (StringRef UnmangledName) const
Returns an interned, linker-mangled version of UnmangledName.
Protected Attributes
std::unique_ptr< ExecutionSession > ES
std::unique_ptr< PlatformSupport > PS
JITDylib * ProcessSymbols = nullptr
JITDylib * Platform = nullptr
JITDylib * Main = nullptr
JITDylibSearchOrder DefaultLinks
DataLayout DL
Triple TT
std::unique_ptr< ObjectLayer > ObjLinkingLayer
std::unique_ptr< ObjectTransformLayer > ObjTransformLayer
std::unique_ptr< IRCompileLayer > CompileLayer
std::unique_ptr< IRTransformLayer > TransformLayer
std::unique_ptr< IRTransformLayer > InitHelperTransformLayer
Friends
template<typename, typename, typename>
class LLJITBuilderSetters
LLVM_ABI friend Expected< JITDylibSP > setUpGenericLLVMIRPlatform (LLJIT &J)
Configure the LLJIT instance to scrape modules for llvm.global_ctors and llvm.global_dtors variables and (if present) build initialization and deinitialization functions.

A pre-fabricated ORC JIT stack that can serve as an alternative to MCJIT.

Create instances using LLJITBuilder.

Definition at line 42 of file LLJIT.h.

llvm::orc::LLJIT::~LLJIT ( ) virtual

Destruct this instance.

If a multi-threaded instance, waits for all compile threads to complete.

Definition at line 857 of file LLJIT.cpp.

References ES.

LLJIT()

Create an LLJIT instance with a single compile thread.

Definition at line 995 of file LLJIT.cpp.

References _, assert(), CompileLayer, llvm::orc::SelfExecutorProcessControl::Create(), createCompileFunction(), createJITDylib(), createObjectLinkingLayer(), DefaultLinks, DL, llvm::orc::LLJITBuilderState::EPC, ES, llvm::orc::LLJITBuilderState::ES, getTargetTriple(), InitHelperTransformLayer, llvm::orc::LLJITBuilderState::JTMB, llvm::orc::LLJITBuilderState::LinkProcessSymbolsByDefault, Main, llvm::orc::MatchExportedSymbolsOnly, llvm::move(), ObjLinkingLayer, ObjTransformLayer, Platform, llvm::orc::LLJITBuilderState::PrePlatformSetup, ProcessSymbols, setUpGenericLLVMIRPlatform, llvm::orc::LLJITBuilderState::SetUpPlatform, llvm::orc::LLJITBuilderState::SetupProcessSymbolsJITDylib, llvm::orc::LLJITBuilderState::SupportConcurrentCompilation, TransformLayer, and TT.

Referenced by llvm::orc::LLJIT::PlatformSupport::deinitialize(), LLJITBuilderSetters, llvm::orc::LLJIT::PlatformSupport::setInitTransform(), and setUpGenericLLVMIRPlatform.

addIRModule() [1/3]

addIRModule() [2/3]

addIRModule() [3/3]

addObjectFile() [1/3]

addObjectFile() [2/3]

addObjectFile() [3/3]

applyDataLayout()

Error llvm::orc::LLJIT::applyDataLayout ( Module & M) protected

createCompileFunction()

createJITDylib()

createObjectLinkingLayer()

defaultLinkOrder()

Returns the default link order for this LLJIT instance.

This link order will be appended to the link order of JITDylibs created by LLJIT's createJITDylib method.

Definition at line 135 of file LLJIT.h.

References DefaultLinks.

deinitialize()

getDataLayout()

Returns a reference to the DataLayout for this instance.

Definition at line 73 of file LLJIT.h.

References DL.

getExecutionSession()

getIRCompileLayer()

getIRTransformLayer()

getJITDylibByName()

Returns the JITDylib with the given name, or nullptr if no JITDylib with that name exists.

Definition at line 94 of file LLJIT.h.

References ES.

getMainJITDylib()

JITDylib & llvm::orc::LLJIT::getMainJITDylib ( ) inline

Returns a reference to the JITDylib representing the JIT'd main program.

Definition at line 76 of file LLJIT.h.

References Main.

getObjLinkingLayer()

ObjectLayer & llvm::orc::LLJIT::getObjLinkingLayer ( ) inline

getObjTransformLayer()

getPlatformJITDylib()

JITDylibSP llvm::orc::LLJIT::getPlatformJITDylib ( )

getPlatformSupport()

getProcessSymbolsJITDylib()

JITDylibSP llvm::orc::LLJIT::getProcessSymbolsJITDylib ( )

getTargetTriple()

const Triple & llvm::orc::LLJIT::getTargetTriple ( ) const inline

initialize()

linkStaticLibraryInto() [1/2]

linkStaticLibraryInto() [2/2]

loadPlatformDynamicLibrary()

lookup() [1/2]

lookup() [2/2]

lookupLinkerMangled() [1/3]

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).

Definition at line 166 of file LLJIT.h.

References ES, and lookupLinkerMangled().

lookupLinkerMangled() [2/3]

lookupLinkerMangled() [3/3]

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).

Definition at line 174 of file LLJIT.h.

References lookupLinkerMangled(), and Main.

mangle()

std::string llvm::orc::LLJIT::mangle ( StringRef UnmangledName ) const

mangleAndIntern()

Returns an interned, linker-mangled version of UnmangledName.

Definition at line 232 of file LLJIT.h.

References ES, and mangle().

setPlatformSupport()

void llvm::orc::LLJIT::setPlatformSupport ( std::unique_ptr< PlatformSupport > PS) inline

LLJITBuilderSetters

template<typename, typename, typename>

setUpGenericLLVMIRPlatform

Configure the LLJIT instance to scrape modules for llvm.global_ctors and llvm.global_dtors variables and (if present) build initialization and deinitialization functions.

Platform specific initialization configurations should be preferred where available.

Definition at line 1208 of file LLJIT.cpp.

References llvm::orc::JITDylib::addToLinkOrder(), llvm::orc::EHFrameRegistrationPlugin::Create(), llvm::orc::UnwindInfoRegistrationPlugin::Create(), llvm::orc::ExecutionSession::createBareJITDylib(), llvm::dbgs(), llvm::dyn_cast(), ES, llvm::orc::ExecutionSession::getBootstrapMapValue(), getExecutionSession(), getObjLinkingLayer(), getProcessSymbolsJITDylib(), getTargetTriple(), llvm::inconvertibleErrorCode(), llvm::Triple::isOSBinFormatMachO(), llvm::Triple::isOSDarwin(), LLJIT(), LLVM_DEBUG, llvm::make_error(), and setPlatformSupport().

Referenced by LLJIT(), and LLJITBuilderSetters.

CompileLayer

DL

ES

Definition at line 248 of file LLJIT.h.

Referenced by createJITDylib(), createObjectLinkingLayer(), getExecutionSession(), getJITDylibByName(), LLJIT(), loadPlatformDynamicLibrary(), lookupLinkerMangled(), lookupLinkerMangled(), mangleAndIntern(), setUpGenericLLVMIRPlatform, and ~LLJIT().

InitHelperTransformLayer

Main

JITDylib* llvm::orc::LLJIT::Main = nullptr protected

ObjLinkingLayer

std::unique_ptr<ObjectLayer> llvm::orc::LLJIT::ObjLinkingLayer protected

ObjTransformLayer

Platform

JITDylib* llvm::orc::LLJIT::Platform = nullptr protected

ProcessSymbols

JITDylib* llvm::orc::LLJIT::ProcessSymbols = nullptr protected

PS

TransformLayer

TT


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