class ObjectLinkingLayerJITLinkContext
Declaration
class ObjectLinkingLayerJITLinkContext : public JITLinkContext { /* full declaration omitted */ };
Description
Holds context for a single jitLink invocation.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:124
Inherits from: JITLinkContext
Member Variables
- private llvm::orc::ObjectLinkingLayer& Layer
- private std::unique_ptr<MaterializationResponsibility> MR
- private std::unique_ptr<MemoryBuffer> ObjBuffer
- private DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::SymbolNameSet> ExternalNamedSymbolDeps
- private DenseMap<llvm::orc::SymbolStringPtr, llvm::orc::SymbolNameSet> InternalNamedSymbolDeps
Method Overview
- public ObjectLinkingLayerJITLinkContext(llvm::orc::ObjectLinkingLayer & Layer, std::unique_ptr<MaterializationResponsibility> MR, std::unique_ptr<MemoryBuffer> ObjBuffer)
- private llvm::Error claimOrExternalizeWeakAndCommonSymbols(llvm::jitlink::LinkGraph & G)
- private llvm::orc::ObjectLinkingLayerJITLinkContext::BlockDependenciesMap computeBlockNonLocalDeps(llvm::jitlink::LinkGraph & G)
- private llvm::Error computeNamedSymbolDependencies(llvm::jitlink::LinkGraph & G)
- public llvm::jitlink::LinkGraphPassFunction getMarkLivePass(const llvm::Triple & TT) const
- public llvm::jitlink::JITLinkMemoryManager & getMemoryManager()
- public void lookup(const llvm::jitlink::JITLinkContext::LookupMap & Symbols, std::unique_ptr<JITLinkAsyncLookupContinuation> LC)
- private llvm::Error markResponsibilitySymbolsLive(llvm::jitlink::LinkGraph & G) const
- public llvm::Error modifyPassConfig(llvm::jitlink::LinkGraph & LG, llvm::jitlink::PassConfiguration & Config)
- public void notifyFailed(llvm::Error Err)
- public void notifyFinalized(JITLinkMemoryManager::FinalizedAlloc A)
- public void notifyMaterializing(llvm::jitlink::LinkGraph & G)
- public llvm::Error notifyResolved(llvm::jitlink::LinkGraph & G)
- private void registerDependencies(const llvm::orc::SymbolDependenceMap & QueryDeps)
- public ~ObjectLinkingLayerJITLinkContext()
Inherited from JITLinkContext:
- public getJITLinkDylib
- public getMarkLivePass
- public getMemoryManager
- public lookup
- public modifyPassConfig
- public notifyFailed
- public notifyFinalized
- public notifyResolved
- public shouldAddDefaultTargetPasses
Methods
¶ObjectLinkingLayerJITLinkContext(
llvm::orc::ObjectLinkingLayer& Layer,
std::unique_ptr<MaterializationResponsibility>
MR,
std::unique_ptr<MemoryBuffer> ObjBuffer)
ObjectLinkingLayerJITLinkContext(
llvm::orc::ObjectLinkingLayer& Layer,
std::unique_ptr<MaterializationResponsibility>
MR,
std::unique_ptr<MemoryBuffer> ObjBuffer)
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:126
Parameters
- llvm::orc::ObjectLinkingLayer& Layer
- std::unique_ptr<MaterializationResponsibility> MR
- std::unique_ptr<MemoryBuffer> ObjBuffer
¶llvm::Error
claimOrExternalizeWeakAndCommonSymbols(
llvm::jitlink::LinkGraph& G)
llvm::Error
claimOrExternalizeWeakAndCommonSymbols(
llvm::jitlink::LinkGraph& G)
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:420
Parameters
¶llvm::orc::ObjectLinkingLayerJITLinkContext::
BlockDependenciesMap
computeBlockNonLocalDeps(
llvm::jitlink::LinkGraph& G)
llvm::orc::ObjectLinkingLayerJITLinkContext::
BlockDependenciesMap
computeBlockNonLocalDeps(
llvm::jitlink::LinkGraph& G)
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:520
Parameters
¶llvm::Error computeNamedSymbolDependencies(
llvm::jitlink::LinkGraph& G)
llvm::Error computeNamedSymbolDependencies(
llvm::jitlink::LinkGraph& G)
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:465
Parameters
¶llvm::jitlink::LinkGraphPassFunction
getMarkLivePass(const llvm::Triple& TT) const
llvm::jitlink::LinkGraphPassFunction
getMarkLivePass(const llvm::Triple& TT) const
Description
Returns the mark-live pass to be used for this link. If no pass is returned (the default) then the target-specific linker implementation will choose a conservative default (usually marking all symbols live). This function is only called if shouldAddDefaultTargetPasses returns true, otherwise the JITContext is responsible for adding a mark-live pass in modifyPassConfig.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:323
Parameters
- const llvm::Triple& TT
¶llvm::jitlink::JITLinkMemoryManager&
getMemoryManager()
llvm::jitlink::JITLinkMemoryManager&
getMemoryManager()
Description
Return the MemoryManager to be used for this link.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:140
¶void lookup(
const llvm::jitlink::JITLinkContext::
LookupMap& Symbols,
std::unique_ptr<
JITLinkAsyncLookupContinuation> LC)
void lookup(
const llvm::jitlink::JITLinkContext::
LookupMap& Symbols,
std::unique_ptr<
JITLinkAsyncLookupContinuation> LC)
Description
Called by JITLink to resolve external symbols. This method is passed a lookup continutation which it must call with a result to continue the linking process.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:156
Parameters
- const llvm::jitlink::JITLinkContext::LookupMap& Symbols
- std::unique_ptr<JITLinkAsyncLookupContinuation> LC
¶llvm::Error markResponsibilitySymbolsLive(
llvm::jitlink::LinkGraph& G) const
llvm::Error markResponsibilitySymbolsLive(
llvm::jitlink::LinkGraph& G) const
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:457
Parameters
¶llvm::Error modifyPassConfig(
llvm::jitlink::LinkGraph& LG,
llvm::jitlink::PassConfiguration& Config)
llvm::Error modifyPassConfig(
llvm::jitlink::LinkGraph& LG,
llvm::jitlink::PassConfiguration& Config)
Description
Called by JITLink to modify the pass pipeline prior to linking. The default version performs no modification.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:327
Parameters
¶void notifyFailed(llvm::Error Err)
void notifyFailed(llvm::Error Err)
Description
Notify this context that linking failed. Called by JITLink if linking cannot be completed.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:149
Parameters
- llvm::Error Err
¶void notifyFinalized(
JITLinkMemoryManager::FinalizedAlloc A)
void notifyFinalized(
JITLinkMemoryManager::FinalizedAlloc A)
Description
Called by JITLink to notify the context that the object has been finalized (i.e. emitted to memory and memory permissions set). If all of this objects dependencies have also been finalized then the code is ready to run.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:311
Parameters
¶void notifyMaterializing(
llvm::jitlink::LinkGraph& G)
void notifyMaterializing(
llvm::jitlink::LinkGraph& G)
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:142
Parameters
¶llvm::Error notifyResolved(
llvm::jitlink::LinkGraph& G)
llvm::Error notifyResolved(
llvm::jitlink::LinkGraph& G)
Description
Called by JITLink once all defined symbols in the graph have been assigned their final memory locations in the target process. At this point the LinkGraph can be inspected to build a symbol table, however the block content will not generally have been copied to the target location yet. If the client detects an error in the LinkGraph state (e.g. unexpected or missing symbols) they may return an error here. The error will be propagated to notifyFailed and the linker will bail out.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:205
Parameters
¶void registerDependencies(
const llvm::orc::SymbolDependenceMap&
QueryDeps)
void registerDependencies(
const llvm::orc::SymbolDependenceMap&
QueryDeps)
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:584
Parameters
- const llvm::orc::SymbolDependenceMap& QueryDeps
¶~ObjectLinkingLayerJITLinkContext()
~ObjectLinkingLayerJITLinkContext()
Description
Destroy a JITLinkContext.
Declared at: llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp:133