LLVM
8.0.1
|
IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR. More...
#include "llvm/ExecutionEngine/Orc/Layer.h"
Public Types | |
using | SymbolNameToDefinitionMap = std::map< SymbolStringPtr, GlobalValue * > |
Public Member Functions | |
IRMaterializationUnit (ExecutionSession &ES, ThreadSafeModule TSM, VModuleKey K) | |
Create an IRMaterializationLayer. More... | |
IRMaterializationUnit (ThreadSafeModule TSM, VModuleKey K, SymbolFlagsMap SymbolFlags, SymbolNameToDefinitionMap SymbolToDefinition) | |
Create an IRMaterializationLayer from a module, and pre-existing SymbolFlags and SymbolToDefinition maps. More... | |
StringRef | getName () const override |
Return the ModuleIdentifier as the name for this MaterializationUnit. More... | |
const ThreadSafeModule & | getModule () const |
Public Member Functions inherited from llvm::orc::MaterializationUnit | |
MaterializationUnit (SymbolFlagsMap InitalSymbolFlags, VModuleKey K) | |
virtual | ~MaterializationUnit () |
const SymbolFlagsMap & | getSymbols () const |
Return the set of symbols that this source provides. More... | |
void | doMaterialize (JITDylib &JD) |
Called by materialization dispatchers (see ExecutionSession::DispatchMaterializationFunction) to trigger materialization of this MaterializationUnit. More... | |
void | doDiscard (const JITDylib &JD, const SymbolStringPtr &Name) |
Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden. More... | |
Protected Attributes | |
ThreadSafeModule | TSM |
SymbolNameToDefinitionMap | SymbolToDefinition |
Protected Attributes inherited from llvm::orc::MaterializationUnit | |
SymbolFlagsMap | SymbolFlags |
VModuleKey | K |
IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR.
Represents materialization responsibility for all symbols in the given module. If symbols are overridden by other definitions, then their linkage is changed to available-externally.
using llvm::orc::IRMaterializationUnit::SymbolNameToDefinitionMap = std::map<SymbolStringPtr, GlobalValue *> |
llvm::orc::IRMaterializationUnit::IRMaterializationUnit | ( | ExecutionSession & | ES, |
ThreadSafeModule | TSM, | ||
VModuleKey | K | ||
) |
Create an IRMaterializationLayer.
Scans the module to build the SymbolFlags and SymbolToDefinition maps.
Definition at line 27 of file Layer.cpp.
References assert(), llvm::JITSymbolFlags::fromGlobalValue(), G, llvm::Module::getDataLayout(), llvm::orc::ThreadSafeModule::getModule(), llvm::Module::global_values(), llvm::orc::MaterializationUnit::SymbolFlags, and SymbolToDefinition.
llvm::orc::IRMaterializationUnit::IRMaterializationUnit | ( | ThreadSafeModule | TSM, |
VModuleKey | K, | ||
SymbolFlagsMap | SymbolFlags, | ||
SymbolNameToDefinitionMap | SymbolToDefinition | ||
) |
Create an IRMaterializationLayer from a module, and pre-existing SymbolFlags and SymbolToDefinition maps.
The maps must provide entries for each definition in M. This constructor is useful for delegating work from one IRMaterializationUnit to another.
|
inline |
|
overridevirtual |
Return the ModuleIdentifier as the name for this MaterializationUnit.
Implements llvm::orc::MaterializationUnit.
Definition at line 50 of file Layer.cpp.
References assert(), llvm::GlobalValue::AvailableExternallyLinkage, llvm::dbgs(), llvm::orc::JITDylib::getExecutionSession(), llvm::orc::ThreadSafeModule::getModule(), llvm::Module::getModuleIdentifier(), llvm::orc::JITDylib::getName(), I, LLVM_DEBUG, Name, llvm::orc::ExecutionSession::runSessionLocked(), SymbolToDefinition, and TSM.
|
protected |
Definition at line 92 of file Layer.h.
Referenced by llvm::orc::BasicIRLayerMaterializationUnit::BasicIRLayerMaterializationUnit(), getName(), and IRMaterializationUnit().
|
protected |
Definition at line 91 of file Layer.h.
Referenced by llvm::orc::BasicIRLayerMaterializationUnit::BasicIRLayerMaterializationUnit(), and getName().