|
LLVM
10.0.0
|
Namespaces | |
| remote | |
| rpc | |
Classes | |
| class | AbsoluteSymbolsMaterializationUnit |
| A MaterializationUnit implementation for pre-existing absolute symbols. More... | |
| class | AsynchronousSymbolQuery |
| A symbol query that returns results via a callback when results are ready. More... | |
| class | BasicIRLayerMaterializationUnit |
| MaterializationUnit that materializes modules by calling the 'emit' method on the given IRLayer. More... | |
| class | BasicObjectLayerMaterializationUnit |
| Materializes the given object file (represented by a MemoryBuffer instance) by calling 'emit' on the given ObjectLayer. More... | |
| class | BlockFreqQuery |
| class | CompileOnDemandLayer |
| class | ConcurrentIRCompiler |
| A thread-safe version of SimpleCompiler. More... | |
| class | CtorDtorIterator |
| This iterator provides a convenient way to iterate over the elements of an llvm.global_ctors/llvm.global_dtors instance. More... | |
| class | CtorDtorRunner |
| class | DumpObjects |
| A function object that can be used as an ObjectTransformLayer transform to dump object files to disk at a specified path. More... | |
| class | DuplicateDefinition |
| class | DynamicLibrarySearchGenerator |
| A utility class to expose symbols found via dlsym to the JIT. More... | |
| class | EHFrameRegistrationPlugin |
| class | ExecutionSession |
| An ExecutionSession represents a running JIT program. More... | |
| class | FailedToMaterialize |
| Used to notify a JITDylib that the given set of symbols failed to materialize. More... | |
| class | GenericIndirectStubsInfo |
| Provide information about stub blocks generated by the makeIndirectStubsBlock function. More... | |
| class | GlobalMappingLayer |
| Global mapping layer. More... | |
| class | ImplSymbolMap |
| class | IndirectStubsManager |
| Base class for managing collections of named indirect stubs. More... | |
| class | IRCompileLayer |
| class | IRLayer |
| Interface for layers that accept LLVM IR. More... | |
| class | IRMaterializationUnit |
| IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR. More... | |
| class | IRSpeculationLayer |
| class | IRTransformLayer |
| A layer that applies a transform to emitted modules. More... | |
| class | JITCompileCallbackManager |
| Target-independent base class for compile callback management. More... | |
| class | JITDylib |
| A symbol table that supports asynchoronous symbol queries. More... | |
| class | JITSymbolNotFound |
| class | JITSymbolResolverAdapter |
| Legacy adapter. Remove once we kill off the old ORC layers. More... | |
| class | JITTargetMachineBuilder |
| A utility class for building TargetMachines for JITs. More... | |
| class | LambdaResolver |
| class | LambdaSymbolResolver |
| Implements SymbolResolver with a pair of supplied function objects for convenience. More... | |
| class | LazyCallThroughManager |
| Manages a set of 'lazy call-through' trampolines. More... | |
| class | LazyEmittingLayer |
| Lazy-emitting IR layer. More... | |
| class | LazyReexportsMaterializationUnit |
| A materialization unit that builds lazy re-exports. More... | |
| class | LegacyCompileOnDemandLayer |
| Compile-on-demand layer. More... | |
| class | LegacyCtorDtorRunner |
| Convenience class for recording constructor/destructor names for later execution. More... | |
| class | LegacyIRCompileLayer |
| Eager IR compiling layer. More... | |
| class | LegacyIRTransformLayer |
| IR mutating layer. More... | |
| class | LegacyLocalCXXRuntimeOverrides |
| class | LegacyLookupFnResolver |
| An ORC SymbolResolver implementation that uses a legacy findSymbol-like function to perform lookup;. More... | |
| class | LegacyObjectTransformLayer |
| Object mutating layer. More... | |
| class | LegacyRTDyldObjectLinkingLayer |
| Bare bones object linking layer. More... | |
| class | LegacyRTDyldObjectLinkingLayerBase |
| class | LLJIT |
| A pre-fabricated ORC JIT stack that can serve as an alternative to MCJIT. More... | |
| class | LLJITBuilder |
| Constructs LLJIT instances. More... | |
| class | LLJITBuilderSetters |
| class | LLJITBuilderState |
| class | LLLazyJIT |
| An extended version of LLJIT that supports lazy function-at-a-time compilation of LLVM IR. More... | |
| class | LLLazyJITBuilder |
| Constructs LLLazyJIT instances. More... | |
| class | LLLazyJITBuilderSetters |
| class | LLLazyJITBuilderState |
| class | LocalCXXRuntimeOverrides |
| class | LocalCXXRuntimeOverridesBase |
| Support class for static dtor execution. More... | |
| class | LocalIndirectStubsManager |
| IndirectStubsManager implementation for the host architecture, e.g. More... | |
| class | LocalJITCompileCallbackManager |
| Manage compile callbacks for in-process JITs. More... | |
| class | LocalLazyCallThroughManager |
| A lazy call-through manager that builds trampolines in the current process. More... | |
| class | LocalTrampolinePool |
| A trampoline pool for trampolines within the current process. More... | |
| class | MangleAndInterner |
| Mangles symbol names then uniques them in the context of an ExecutionSession. More... | |
| class | MaterializationResponsibility |
| Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and JDs. More... | |
| class | MaterializationUnit |
| A MaterializationUnit represents a set of symbol definitions that can be materialized as a group, or individually discarded (when overriding definitions are encountered). More... | |
| class | NullLegacyResolver |
| SymbolResolver impliementation that rejects all resolution requests. More... | |
| class | NullResolver |
| class | ObjectLayer |
| Interface for Layers that accept object files. More... | |
| class | ObjectLinkingLayer |
| An ObjectLayer implementation built on JITLink. More... | |
| class | ObjectLinkingLayerJITLinkContext |
| class | ObjectTransformLayer |
| class | OrcAArch64 |
| class | OrcGenericABI |
| Generic ORC ABI support. More... | |
| class | OrcI386 |
| I386 support. More... | |
| class | OrcMCJITReplacement |
| class | OrcMips32_Base |
| class | OrcMips32Be |
| class | OrcMips32Le |
| class | OrcMips64 |
| class | OrcX86_64_Base |
| X86_64 code that's common to all ABIs. More... | |
| class | OrcX86_64_SysV |
| X86_64 support for SysV ABI (Linux, MacOSX). More... | |
| class | OrcX86_64_Win32 |
| X86_64 support for Win32. More... | |
| class | PartitioningIRMaterializationUnit |
| class | ReexportsGenerator |
| ReexportsGenerator can be used with JITDylib::addGenerator to automatically re-export a subset of the source JITDylib's symbols in the target. More... | |
| class | ReExportsMaterializationUnit |
| A materialization unit for symbol aliases. More... | |
| class | RemoteObjectClientLayer |
| RemoteObjectClientLayer forwards the ORC Object Layer API over an RPC connection. More... | |
| class | RemoteObjectLayer |
| Base class containing common utilities for RemoteObjectClientLayer and RemoteObjectServerLayer. More... | |
| class | RemoteObjectLayerAPI |
| RPC API needed by RemoteObjectClientLayer and RemoteObjectServerLayer. More... | |
| class | RemoteObjectServerLayer |
| RemoteObjectServerLayer acts as a server and handling RPC calls for the object layer API from the given RPC connection. More... | |
| class | RTDyldObjectLinkingLayer |
| class | SequenceBBQuery |
| class | SimpleCompiler |
| Simple compile functor: Takes a single IR module and returns an ObjectFile. More... | |
| class | SpeculateQuery |
| class | Speculator |
| class | StaticLibraryDefinitionGenerator |
| A utility class to expose symbols from a static library. More... | |
| struct | SymbolAliasMapEntry |
| class | SymbolLinkagePromoter |
| Promotes private symbols to global hidden, and renames to prevent clashes with other promoted symbols. More... | |
| class | SymbolLookupSet |
| A set of symbols to look up, each associated with a SymbolLookupFlags value. More... | |
| class | SymbolResolver |
| SymbolResolver is a composable interface for looking up symbol flags and addresses using the AsynchronousSymbolQuery type. More... | |
| class | SymbolsCouldNotBeRemoved |
| Used to notify clients that a set of symbols could not be removed. More... | |
| class | SymbolsNotFound |
| Used to notify clients when symbols can not be found during a lookup. More... | |
| class | SymbolStringPool |
| String pool for symbol names used by the JIT. More... | |
| class | SymbolStringPtr |
| Pointer to a pooled string representing a symbol name. More... | |
| class | ThreadSafeContext |
| An LLVMContext together with an associated mutex that can be used to lock the context to prevent concurrent access by other threads. More... | |
| class | ThreadSafeModule |
| An LLVM Module together with a shared ThreadSafeContext. More... | |
| class | TMOwningSimpleCompiler |
| A SimpleCompiler that owns its TargetMachine. More... | |
| class | TrampolinePool |
| Base class for pools of compiler re-entry trampolines. More... | |
Typedefs | |
| using | VModuleKey = uint8_t uint64_t |
| VModuleKey provides a unique identifier (allocated and managed by ExecutionSessions) for a module added to the JIT. More... | |
| using | SymbolNameSet = DenseSet< SymbolStringPtr > |
| A set of symbol names (represented by SymbolStringPtrs for. More... | |
| using | SymbolNameVector = std::vector< SymbolStringPtr > |
| A vector of symbol names. More... | |
| using | SymbolMap = DenseMap< SymbolStringPtr, JITEvaluatedSymbol > |
| A map from symbol names (as SymbolStringPtrs) to JITSymbols (address/flags pairs). More... | |
| using | SymbolFlagsMap = DenseMap< SymbolStringPtr, JITSymbolFlags > |
| A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags. More... | |
| using | SymbolDependenceMap = DenseMap< JITDylib *, SymbolNameSet > |
| A map from JITDylibs to sets of symbols. More... | |
| using | JITDylibSearchOrder = std::vector< std::pair< JITDylib *, JITDylibLookupFlags > > |
| A list of (JITDylib*, JITDylibLookupFlags) pairs to be used as a search order during symbol lookup. More... | |
| using | SymbolAliasMap = DenseMap< SymbolStringPtr, SymbolAliasMapEntry > |
| A map of Symbols to (Symbol, Flags) pairs. More... | |
| using | SymbolsResolvedCallback = unique_function< void(Expected< SymbolMap >)> |
| Callback to notify client that symbols have been resolved. More... | |
| using | RegisterDependenciesFunction = std::function< void(const SymbolDependenceMap &)> |
| Callback to register the dependencies for a given query. More... | |
| using | MaterializationUnitList = std::vector< std::unique_ptr< MaterializationUnit > > |
| using | GVPredicate = std::function< bool(const GlobalValue &)> |
| using | GVModifier = std::function< void(GlobalValue &)> |
Functions | |
| IRMaterializationUnit::ManglingOptions | irManglingOptionsFromTargetOptions (const TargetOptions &Opts) |
| JITDylibSearchOrder | makeJITDylibSearchOrder (ArrayRef< JITDylib *> JDs, JITDylibLookupFlags Flags=JITDylibLookupFlags::MatchExportedSymbolsOnly) |
| Convenience function for creating a search order from an ArrayRef of JITDylib*, all with the same flags. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolStringPtr &Sym) |
| Render a SymbolStringPtr. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolNameSet &Symbols) |
| Render a SymbolNameSet. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolNameVector &Symbols) |
| Render a SymbolNameVector. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolFlagsMap::value_type &KV) |
| Render a SymbolFlagsMap entry. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolMap::value_type &KV) |
| Render a SymbolMap entry. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolFlagsMap &SymbolFlags) |
| Render a SymbolFlagsMap. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolMap &Symbols) |
| Render a SymbolMap. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolDependenceMap::value_type &KV) |
| Render a SymbolDependenceMap entry. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const MaterializationUnit &MU) |
| Render a MaterializationUnit. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const JITDylibLookupFlags &JDLookupFlags) |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolLookupFlags &LookupFlags) |
| Rendar a SymbolLookupFlags instance. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const LookupKind &K) |
| Render a JITDylibLookupFlags instance. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolLookupSet::value_type &KV) |
| Render a SymbolLookupSet entry. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolLookupSet &LookupSet) |
| Render a SymbolLookupSet. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const JITDylibSearchOrder &SearchOrder) |
| Render a JITDylibSearchOrder. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolAliasMap &Aliases) |
| Render a SymbolAliasMap. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const SymbolState &S) |
| Render a SymbolState. More... | |
| std::unique_ptr< AbsoluteSymbolsMaterializationUnit > | absoluteSymbols (SymbolMap Symbols, VModuleKey K=VModuleKey()) |
| Create an AbsoluteSymbolsMaterializationUnit with the given symbols. More... | |
| std::unique_ptr< ReExportsMaterializationUnit > | symbolAliases (SymbolAliasMap Aliases, VModuleKey K=VModuleKey()) |
| Create a ReExportsMaterializationUnit with the given aliases. More... | |
| std::unique_ptr< ReExportsMaterializationUnit > | reexports (JITDylib &SourceJD, SymbolAliasMap Aliases, JITDylibLookupFlags SourceJDLookupFlags=JITDylibLookupFlags::MatchExportedSymbolsOnly, VModuleKey K=VModuleKey()) |
| Create a materialization unit for re-exporting symbols from another JITDylib with alternative names/flags. More... | |
| Expected< SymbolAliasMap > | buildSimpleReexportsAAliasMap (JITDylib &SourceJD, const SymbolNameSet &Symbols) |
| Build a SymbolAliasMap for the common case where you want to re-export symbols from another JITDylib with the same linkage/flags. More... | |
| int | runAsMain (int(*Main)(int, char *[]), ArrayRef< std::string > Args, Optional< StringRef > ProgramName=None) |
| Run a main function, returning the result. More... | |
| iterator_range< CtorDtorIterator > | getConstructors (const Module &M) |
| Create an iterator range over the entries of the llvm.global_ctors array. More... | |
| iterator_range< CtorDtorIterator > | getDestructors (const Module &M) |
| Create an iterator range over the entries of the llvm.global_ctors array. More... | |
| Expected< std::unique_ptr< JITCompileCallbackManager > > | createLocalCompileCallbackManager (const Triple &T, ExecutionSession &ES, JITTargetAddress ErrorHandlerAddress) |
| Create a local compile callback manager. More... | |
| std::function< std::unique_ptr< IndirectStubsManager >)> | createLocalIndirectStubsManagerBuilder (const Triple &T) |
| Create a local indriect stubs manager builder. More... | |
| Constant * | createIRTypedAddress (FunctionType &FT, JITTargetAddress Addr) |
| Build a function pointer of FunctionType with the given constant address. More... | |
| GlobalVariable * | createImplPointer (PointerType &PT, Module &M, const Twine &Name, Constant *Initializer) |
| Create a function pointer with the given type, name, and initializer in the given Module. More... | |
| void | makeStub (Function &F, Value &ImplPointer) |
| Turn a function declaration into a stub function that makes an indirect call using the given function pointer. More... | |
| Function * | cloneFunctionDecl (Module &Dst, const Function &F, ValueToValueMapTy *VMap=nullptr) |
| Clone a function declaration into a new module. More... | |
| void | moveFunctionBody (Function &OrigF, ValueToValueMapTy &VMap, ValueMaterializer *Materializer=nullptr, Function *NewF=nullptr) |
| Move the body of function 'F' to a cloned function declaration in a different module (See related cloneFunctionDecl). More... | |
| GlobalVariable * | cloneGlobalVariableDecl (Module &Dst, const GlobalVariable &GV, ValueToValueMapTy *VMap=nullptr) |
| Clone a global variable declaration into a new module. More... | |
| void | moveGlobalVariableInitializer (GlobalVariable &OrigGV, ValueToValueMapTy &VMap, ValueMaterializer *Materializer=nullptr, GlobalVariable *NewGV=nullptr) |
| Move global variable GV from its parent module to cloned global declaration in a different module. More... | |
| GlobalAlias * | cloneGlobalAliasDecl (Module &Dst, const GlobalAlias &OrigA, ValueToValueMapTy &VMap) |
| Clone a global alias declaration into a new module. More... | |
| void | cloneModuleFlagsMetadata (Module &Dst, const Module &Src, ValueToValueMapTy &VMap) |
| Clone module flags metadata into the destination module. More... | |
| template<typename DylibLookupFtorT , typename ExternalLookupFtorT > | |
| std::shared_ptr< LambdaResolver< DylibLookupFtorT, ExternalLookupFtorT > > | createLambdaResolver (DylibLookupFtorT DylibLookupFtor, ExternalLookupFtorT ExternalLookupFtor) |
| template<typename DylibLookupFtorT , typename ExternalLookupFtorT > | |
| std::shared_ptr< LambdaResolver< DylibLookupFtorT, ExternalLookupFtorT > > | createLambdaResolver (ORCv1DeprecationAcknowledgement, DylibLookupFtorT DylibLookupFtor, ExternalLookupFtorT ExternalLookupFtor) |
| Expected< SymbolFlagsMap > | getObjectSymbolFlags (ExecutionSession &ES, MemoryBufferRef ObjBuffer) |
| Returns a SymbolFlagsMap for the object file represented by the given buffer, or an error if the buffer does not contain a valid object file. More... | |
| Expected< std::unique_ptr< LazyCallThroughManager > > | createLocalLazyCallThroughManager (const Triple &T, ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr) |
| Create a LocalLazyCallThroughManager from the given triple and execution session. More... | |
| std::unique_ptr< LazyReexportsMaterializationUnit > | lazyReexports (LazyCallThroughManager &LCTManager, IndirectStubsManager &ISManager, JITDylib &SourceJD, SymbolAliasMap CallableAliases, ImplSymbolMap *SrcJDLoc=nullptr, VModuleKey K=VModuleKey()) |
| Define lazy-reexports based on the given SymbolAliasMap. More... | |
| template<typename GetResponsibilitySetFn , typename LookupFn > | |
| std::unique_ptr< LambdaSymbolResolver< typename std::remove_cv< typename std::remove_reference< GetResponsibilitySetFn >::type >::type, typename std::remove_cv< typename std::remove_reference< LookupFn >::type >::type > > | createSymbolResolver (GetResponsibilitySetFn &&GetResponsibilitySet, LookupFn &&Lookup) |
| Creates a SymbolResolver implementation from the pair of supplied function objects. More... | |
| template<typename FindSymbolFn > | |
| Expected< SymbolNameSet > | getResponsibilitySetWithLegacyFn (const SymbolNameSet &Symbols, FindSymbolFn FindSymbol) |
| Use the given legacy-style FindSymbol function (i.e. More... | |
| template<typename FindSymbolFn > | |
| SymbolNameSet | lookupWithLegacyFn (ExecutionSession &ES, AsynchronousSymbolQuery &Query, const SymbolNameSet &Symbols, FindSymbolFn FindSymbol) |
| Use the given legacy-style FindSymbol function (i.e. More... | |
| template<typename LegacyLookupFn > | |
| std::shared_ptr< LegacyLookupFnResolver< LegacyLookupFn > > | createLegacyLookupResolver (ExecutionSession &ES, LegacyLookupFn LegacyLookup, std::function< void(Error)> ErrorReporter) |
| std::error_code | orcError (OrcErrorCode ErrCode) |
| ThreadSafeModule | cloneToNewContext (ThreadSafeModule &TSMW, GVPredicate ShouldCloneDef=GVPredicate(), GVModifier UpdateClonedDefSource=GVModifier()) |
| Clones the given module on to a new context. More... | |
| raw_ostream & | operator<< (raw_ostream &OS, const JITSymbolFlags &Flags) |
| raw_ostream & | operator<< (raw_ostream &OS, const JITEvaluatedSymbol &Sym) |
| Expected< SymbolAliasMap > | buildSimpleReexportsAliasMap (JITDylib &SourceJD, const SymbolNameSet &Symbols) |
Variables | |
| RegisterDependenciesFunction | NoDependenciesToRegister |
| This can be used as the value for a RegisterDependenciesFunction if there are no dependants to register with. More... | |
| using llvm::orc::GVModifier = typedef std::function<void(GlobalValue &)> |
Definition at line 164 of file ThreadSafeModule.h.
| using llvm::orc::GVPredicate = typedef std::function<bool(const GlobalValue &)> |
Definition at line 163 of file ThreadSafeModule.h.
| using llvm::orc::JITDylibSearchOrder = typedef std::vector<std::pair<JITDylib *, JITDylibLookupFlags> > |
| using llvm::orc::MaterializationUnitList = typedef std::vector<std::unique_ptr<MaterializationUnit> > |
| using llvm::orc::RegisterDependenciesFunction = typedef std::function<void(const SymbolDependenceMap &)> |
| using llvm::orc::SymbolAliasMap = typedef DenseMap<SymbolStringPtr, SymbolAliasMapEntry> |
| using llvm::orc::SymbolDependenceMap = typedef DenseMap<JITDylib *, SymbolNameSet> |
| using llvm::orc::SymbolFlagsMap = typedef DenseMap<SymbolStringPtr, JITSymbolFlags> |
A map from symbol names (as SymbolStringPtrs) to JITSymbolFlags.
| using llvm::orc::SymbolMap = typedef DenseMap<SymbolStringPtr, JITEvaluatedSymbol> |
| using llvm::orc::SymbolNameSet = typedef DenseSet<SymbolStringPtr> |
| using llvm::orc::SymbolNameVector = typedef std::vector<SymbolStringPtr> |
| using llvm::orc::SymbolsResolvedCallback = typedef unique_function<void(Expected<SymbolMap>)> |
|
strong |
|
strong |
Lookup flags that apply to each dylib in the search order for a lookup.
If MatchHiddenSymbolsOnly is used (the default) for a given dylib, then only symbols in that Dylib's interface will be searched. If MatchHiddenSymbols is used then symbols with hidden visibility will match as well.
| Enumerator | |
|---|---|
| MatchExportedSymbolsOnly | |
| MatchAllSymbols | |
|
strong |
Describes the kind of lookup being performed.
The lookup kind is passed to symbol generators (if they're invoked) to help them determine what definitions to generate.
Static – Lookup is being performed as-if at static link time (e.g. generators representing static archives should pull in new definitions).
DLSym – Lookup is being performed as-if at runtime (e.g. generators representing static archives should not pull in new definitions).
| Enumerator | |
|---|---|
| Static | |
| DLSym | |
|
strong |
Definition at line 24 of file OrcError.h.
|
strong |
Lookup flags that apply to each symbol in a lookup.
If RequiredSymbol is used (the default) for a given symbol then that symbol must be found during the lookup or the lookup will fail returning a SymbolNotFound error. If WeaklyReferencedSymbol is used and the given symbol is not found then the query will continue, and no result for the missing symbol will be present in the result (assuming the rest of the lookup succeeds).
| Enumerator | |
|---|---|
| RequiredSymbol | |
| WeaklyReferencedSymbol | |
|
strong |
Represents the state that a symbol has reached during materialization.
|
inline |
Create an AbsoluteSymbolsMaterializationUnit with the given symbols.
Useful for inserting absolute symbols into a JITDylib. E.g.:
Definition at line 630 of file Core.h.
Referenced by llvm::orc::Speculator::addSpeculationRuntime(), llvm::orc::LLJIT::defineAbsolute(), llvm::orc::LocalCXXRuntimeOverrides::enable(), and llvm::orc::DynamicLibrarySearchGenerator::tryToGenerate().
| Expected<SymbolAliasMap> llvm::orc::buildSimpleReexportsAAliasMap | ( | JITDylib & | SourceJD, |
| const SymbolNameSet & | Symbols | ||
| ) |
Build a SymbolAliasMap for the common case where you want to re-export symbols from another JITDylib with the same linkage/flags.
Referenced by reexports().
| Expected<SymbolAliasMap> llvm::orc::buildSimpleReexportsAliasMap | ( | JITDylib & | SourceJD, |
| const SymbolNameSet & | Symbols | ||
| ) |
Definition at line 752 of file Core.cpp.
References assert(), llvm::orc::SymbolLookupSet::empty(), llvm::orc::SymbolLookupSet::getSymbolNames(), llvm::orc::JITDylib::lookupFlags(), MatchAllSymbols, Name, llvm::orc::SymbolLookupSet::sortByName(), and Static.
| Function * llvm::orc::cloneFunctionDecl | ( | Module & | Dst, |
| const Function & | F, | ||
| ValueToValueMapTy * | VMap = nullptr |
||
| ) |
Clone a function declaration into a new module.
This function can be used as the first step towards creating a callback stub (see makeStub), or moving a function body (see moveFunctionBody).
If the VMap argument is non-null, a mapping will be added between F and the new declaration, and between each of F's arguments and the new declaration's arguments. This map can then be passed in to moveFunction to move the function body if required. Note: When moving functions between modules with these utilities, all decls should be cloned (and added to a single VMap) before any bodies are moved. This will ensure that references between functions all refer to the versions in the new module.
Definition at line 289 of file IndirectionUtils.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::Function::copyAttributesFrom(), llvm::Function::Create(), F(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), and llvm::GlobalValue::getValueType().
Referenced by extractSubModule().
| GlobalAlias * llvm::orc::cloneGlobalAliasDecl | ( | Module & | Dst, |
| const GlobalAlias & | OrigA, | ||
| ValueToValueMapTy & | VMap | ||
| ) |
Clone a global alias declaration into a new module.
Definition at line 356 of file IndirectionUtils.cpp.
References assert(), llvm::GlobalIndirectSymbol::copyAttributesFrom(), llvm::GlobalAlias::create(), llvm::GlobalAlias::getAliasee(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::Type::getPointerAddressSpace(), llvm::GlobalValue::getType(), and llvm::GlobalValue::getValueType().
| GlobalVariable * llvm::orc::cloneGlobalVariableDecl | ( | Module & | Dst, |
| const GlobalVariable & | GV, | ||
| ValueToValueMapTy * | VMap = nullptr |
||
| ) |
Clone a global variable declaration into a new module.
Definition at line 326 of file IndirectionUtils.cpp.
References llvm::GlobalVariable::copyAttributesFrom(), llvm::PointerType::getAddressSpace(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), llvm::GlobalValue::getValueType(), and llvm::GlobalVariable::isConstant().
Referenced by extractSubModule().
| void llvm::orc::cloneModuleFlagsMetadata | ( | Module & | Dst, |
| const Module & | Src, | ||
| ValueToValueMapTy & | VMap | ||
| ) |
Clone module flags metadata into the destination module.
Definition at line 367 of file IndirectionUtils.cpp.
References llvm::Module::addModuleFlag(), llvm::Module::getModuleFlagsMetadata(), and llvm::MapMetadata().
| ThreadSafeModule llvm::orc::cloneToNewContext | ( | ThreadSafeModule & | TSMW, |
| GVPredicate | ShouldCloneDef = GVPredicate(), |
||
| GVModifier | UpdateClonedDefSource = GVModifier() |
||
| ) |
Clones the given module on to a new context.
Definition at line 18 of file ThreadSafeModule.cpp.
References assert(), llvm::cantFail(), llvm::CloneModule(), llvm::SmallVectorTemplateCommon< T >::data(), llvm::orc::ThreadSafeContext::getContext(), llvm::Module::getName(), llvm::ValueMap< KeyT, ValueT, Config >::insert(), llvm::parseBitcodeFile(), llvm::SmallVectorBase::size(), llvm::orc::ThreadSafeModule::withModuleDo(), llvm::BitcodeWriter::writeModule(), llvm::BitcodeWriter::writeStrtab(), and llvm::BitcodeWriter::writeSymtab().
Referenced by llvm::orc::BasicIRLayerMaterializationUnit::BasicIRLayerMaterializationUnit(), and extractSubModule().
| GlobalVariable * llvm::orc::createImplPointer | ( | PointerType & | PT, |
| Module & | M, | ||
| const Twine & | Name, | ||
| Constant * | Initializer | ||
| ) |
Create a function pointer with the given type, name, and initializer in the given Module.
Definition at line 231 of file IndirectionUtils.cpp.
References llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::HiddenVisibility, and llvm::GlobalValue::NotThreadLocal.
| Constant * llvm::orc::createIRTypedAddress | ( | FunctionType & | FT, |
| JITTargetAddress | Addr | ||
| ) |
Build a function pointer of FunctionType with the given constant address.
Usage example: Turn a trampoline address into a function pointer constant for use in a stub.
Definition at line 222 of file IndirectionUtils.cpp.
References llvm::ConstantInt::get(), llvm::PointerType::get(), llvm::ConstantExpr::getCast(), llvm::Type::getContext(), and llvm::Type::getInt64Ty().
| std::shared_ptr<LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT> > llvm::orc::createLambdaResolver | ( | DylibLookupFtorT | DylibLookupFtor, |
| ExternalLookupFtorT | ExternalLookupFtor | ||
| ) |
Definition at line 63 of file LambdaResolver.h.
Referenced by llvm::orc::RemoteObjectServerLayer< BaseLayerT, RPCEndpoint >::RemoteObjectServerLayer().
| std::shared_ptr<LambdaResolver<DylibLookupFtorT, ExternalLookupFtorT> > llvm::orc::createLambdaResolver | ( | ORCv1DeprecationAcknowledgement | , |
| DylibLookupFtorT | DylibLookupFtor, | ||
| ExternalLookupFtorT | ExternalLookupFtor | ||
| ) |
Definition at line 72 of file LambdaResolver.h.
References llvm::AcknowledgeORCv1Deprecation.
| std::shared_ptr<LegacyLookupFnResolver<LegacyLookupFn> > llvm::orc::createLegacyLookupResolver | ( | ExecutionSession & | ES, |
| LegacyLookupFn | LegacyLookup, | ||
| std::function< void(Error)> | ErrorReporter | ||
| ) |
| Expected< std::unique_ptr< JITCompileCallbackManager > > llvm::orc::createLocalCompileCallbackManager | ( | const Triple & | T, |
| ExecutionSession & | ES, | ||
| JITTargetAddress | ErrorHandlerAddress | ||
| ) |
Create a local compile callback manager.
The given target triple will determine the ABI, and the given ErrorHandlerAddress will be used by the resulting compile callback manager if a compile callback fails.
Definition at line 119 of file IndirectionUtils.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::getArch(), llvm::Triple::getOS(), llvm::inconvertibleErrorCode(), llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::str(), llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::OrcCBindingsStack::UnregisterJITEventListener().
| std::function< std::unique_ptr< IndirectStubsManager >)> llvm::orc::createLocalIndirectStubsManagerBuilder | ( | const Triple & | T | ) |
Create a local indriect stubs manager builder.
The given target triple will determine the ABI.
Definition at line 166 of file IndirectionUtils.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::getArch(), llvm::Triple::getOS(), llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by LLVMOrcCreateInstance().
| Expected< std::unique_ptr< LazyCallThroughManager > > llvm::orc::createLocalLazyCallThroughManager | ( | const Triple & | T, |
| ExecutionSession & | ES, | ||
| JITTargetAddress | ErrorHandlerAddr | ||
| ) |
Create a LocalLazyCallThroughManager from the given triple and execution session.
Definition at line 86 of file LazyReexports.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::getArch(), llvm::Triple::getOS(), llvm::inconvertibleErrorCode(), llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::str(), llvm::Triple::x86, and llvm::Triple::x86_64.
| std::unique_ptr<LambdaSymbolResolver< typename std::remove_cv< typename std::remove_reference<GetResponsibilitySetFn>::type>::type, typename std::remove_cv< typename std::remove_reference<LookupFn>::type>::type> > llvm::orc::createSymbolResolver | ( | GetResponsibilitySetFn && | GetResponsibilitySet, |
| LookupFn && | Lookup | ||
| ) |
Creates a SymbolResolver implementation from the pair of supplied function objects.
Definition at line 80 of file Legacy.h.
References Lookup().
| iterator_range< CtorDtorIterator > llvm::orc::getConstructors | ( | const Module & | M | ) |
Create an iterator range over the entries of the llvm.global_ctors array.
Definition at line 104 of file ExecutionUtils.cpp.
References llvm::orc::CtorDtorIterator::CtorDtorIterator(), llvm::Module::getNamedGlobal(), and llvm::make_range().
Referenced by llvm::OrcCBindingsStack::addIRModule(), llvm::orc::OrcMCJITReplacement::addModule(), and llvm::orc::LLJIT::recordCtorDtors().
| iterator_range< CtorDtorIterator > llvm::orc::getDestructors | ( | const Module & | M | ) |
Create an iterator range over the entries of the llvm.global_ctors array.
Definition at line 110 of file ExecutionUtils.cpp.
References llvm::orc::CtorDtorIterator::CtorDtorIterator(), llvm::Module::getNamedGlobal(), and llvm::make_range().
Referenced by llvm::OrcCBindingsStack::addIRModule(), llvm::orc::OrcMCJITReplacement::addModule(), and llvm::orc::LLJIT::recordCtorDtors().
| Expected< SymbolFlagsMap > llvm::orc::getObjectSymbolFlags | ( | ExecutionSession & | ES, |
| MemoryBufferRef | ObjBuffer | ||
| ) |
Returns a SymbolFlagsMap for the object file represented by the given buffer, or an error if the buffer does not contain a valid object file.
Definition at line 187 of file Layer.cpp.
References llvm::object::ObjectFile::createObjectFile(), llvm::JITSymbolFlags::fromObjectSymbol(), llvm::orc::ExecutionSession::intern(), llvm::object::BasicSymbolRef::SF_Global, llvm::object::BasicSymbolRef::SF_Undefined, and llvm::orc::MaterializationUnit::SymbolFlags.
Referenced by llvm::orc::BasicObjectLayerMaterializationUnit::Create().
| Expected<SymbolNameSet> llvm::orc::getResponsibilitySetWithLegacyFn | ( | const SymbolNameSet & | Symbols, |
| FindSymbolFn | FindSymbol | ||
| ) |
Use the given legacy-style FindSymbol function (i.e.
a function that takes a const std::string& or StringRef and returns a JITSymbol) to get the subset of symbols that the caller is responsible for materializing. If any JITSymbol returned by FindSymbol is in an error state the function returns immediately with that error.
Useful for implementing getResponsibilitySet bodies that query legacy resolvers.
Definition at line 117 of file Legacy.h.
References llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert().
Referenced by llvm::orc::LegacyLookupFnResolver< LegacyLookupFn >::getResponsibilitySet().
| IRMaterializationUnit::ManglingOptions llvm::orc::irManglingOptionsFromTargetOptions | ( | const TargetOptions & | Opts | ) |
Definition at line 28 of file CompileUtils.cpp.
References llvm::orc::IRMaterializationUnit::ManglingOptions::EmulatedTLS, and llvm::TargetOptions::EmulatedTLS.
|
inline |
Define lazy-reexports based on the given SymbolAliasMap.
Each lazy re-export is a callable symbol that will look up and dispatch to the given aliasee on first call. All subsequent calls will go directly to the aliasee.
Definition at line 185 of file LazyReexports.h.
Referenced by llvm::orc::LazyReexportsMaterializationUnit::getName().
| SymbolNameSet llvm::orc::lookupWithLegacyFn | ( | ExecutionSession & | ES, |
| AsynchronousSymbolQuery & | Query, | ||
| const SymbolNameSet & | Symbols, | ||
| FindSymbolFn | FindSymbol | ||
| ) |
Use the given legacy-style FindSymbol function (i.e.
a function that takes a const std::string& or StringRef and returns a JITSymbol) to find the address and flags for each symbol in Symbols and store the result in Query. If any JITSymbol returned by FindSymbol is in an error then Query.notifyFailed(...) is called with that error and the function returns immediately. On success, returns the set of symbols not found.
Useful for implementing lookup bodies that query legacy resolvers.
Definition at line 143 of file Legacy.h.
References llvm::orc::ExecutionSession::legacyFailQuery(), and llvm::orc::AsynchronousSymbolQuery::notifySymbolMetRequiredState().
Referenced by llvm::orc::LegacyLookupFnResolver< LegacyLookupFn >::lookup().
|
inline |
Convenience function for creating a search order from an ArrayRef of JITDylib*, all with the same flags.
Definition at line 98 of file Core.h.
References llvm::RISCVFenceField::O, and llvm::ArrayRef< T >::size().
Referenced by llvm::orc::LazyCallThroughManager::callThroughToSymbol(), llvm::orc::JITCompileCallbackManager::executeCompileCallback(), llvm::orc::ExecutionSession::lookup(), llvm::orc::LLJIT::lookupLinkerMangled(), llvm::orc::Speculator::registerSymbols(), and llvm::orc::CtorDtorRunner::run().
Turn a function declaration into a stub function that makes an indirect call using the given function pointer.
Definition at line 240 of file IndirectionUtils.cpp.
References llvm::Function::args(), assert(), llvm::BasicBlock::Create(), F(), llvm::Function::getAttributes(), llvm::Function::getFunctionType(), llvm::GlobalValue::getParent(), llvm::Function::getReturnType(), llvm::GlobalValue::getType(), llvm::GlobalValue::isDeclaration(), llvm::Type::isVoidTy(), llvm::CallBase::setAttributes(), and llvm::CallInst::setTailCall().
| void llvm::orc::moveFunctionBody | ( | Function & | OrigF, |
| ValueToValueMapTy & | VMap, | ||
| ValueMaterializer * | Materializer = nullptr, |
||
| Function * | NewF = nullptr |
||
| ) |
Move the body of function 'F' to a cloned function declaration in a different module (See related cloneFunctionDecl).
If the target function declaration is not supplied via the NewF parameter then it will be looked up via the VMap.
This will delete the body of function 'F' from its original parent module, but leave its declaration.
Definition at line 307 of file IndirectionUtils.cpp.
References assert(), llvm::CloneFunctionInto(), llvm::Function::deleteBody(), llvm::GlobalValue::getParent(), and llvm::GlobalValue::isDeclaration().
| void llvm::orc::moveGlobalVariableInitializer | ( | GlobalVariable & | OrigGV, |
| ValueToValueMapTy & | VMap, | ||
| ValueMaterializer * | Materializer = nullptr, |
||
| GlobalVariable * | NewGV = nullptr |
||
| ) |
Move global variable GV from its parent module to cloned global declaration in a different module.
If the target global declaration is not supplied via the NewGV parameter then it will be looked up via the VMap.
This will delete the initializer of GV from its original parent module, but leave its declaration.
Definition at line 338 of file IndirectionUtils.cpp.
References assert(), llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getParent(), llvm::GlobalVariable::hasInitializer(), llvm::MapValue(), llvm::RF_None, and llvm::GlobalVariable::setInitializer().
| raw_ostream& llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const JITSymbolFlags & | Flags | ||
| ) |
Definition at line 165 of file Core.cpp.
References llvm::JITSymbolFlags::hasError(), llvm::JITSymbolFlags::isCallable(), llvm::JITSymbolFlags::isCommon(), llvm::JITSymbolFlags::isExported(), and llvm::JITSymbolFlags::isWeak().
| raw_ostream& llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const JITEvaluatedSymbol & | Sym | ||
| ) |
Definition at line 183 of file Core.cpp.
References llvm::format(), llvm::JITEvaluatedSymbol::getAddress(), and llvm::JITEvaluatedSymbol::getFlags().
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolStringPtr & | Sym | ||
| ) |
Render a SymbolStringPtr.
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolNameSet & | Symbols | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolNameVector & | Symbols | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolFlagsMap::value_type & | KV | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolMap::value_type & | KV | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolFlagsMap & | SymbolFlags | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolMap & | Symbols | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolDependenceMap::value_type & | KV | ||
| ) |
Render a SymbolDependenceMap entry.
Definition at line 206 of file Core.cpp.
References llvm::operator<<().
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const MaterializationUnit & | MU | ||
| ) |
Render a MaterializationUnit.
Definition at line 216 of file Core.cpp.
References llvm::orc::MaterializationUnit::getName(), and llvm::orc::MaterializationUnit::getSymbols().
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const JITDylibLookupFlags & | JDLookupFlags | ||
| ) |
Definition at line 233 of file Core.cpp.
References llvm_unreachable.
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolLookupFlags & | LookupFlags | ||
| ) |
Rendar a SymbolLookupFlags instance.
Definition at line 244 of file Core.cpp.
References llvm_unreachable.
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const LookupKind & | K | ||
| ) |
Render a JITDylibLookupFlags instance.
Render a LookupKind.
Definition at line 223 of file Core.cpp.
References llvm_unreachable, and llvm::Reloc::Static.
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolLookupSet::value_type & | KV | ||
| ) |
Render a SymbolLookupSet entry.
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolLookupSet & | LookupSet | ||
| ) |
Render a SymbolLookupSet.
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const JITDylibSearchOrder & | SearchOrder | ||
| ) |
Render a JITDylibSearchOrder.
Definition at line 264 of file Core.cpp.
References assert(), and llvm::make_range().
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolAliasMap & | Aliases | ||
| ) |
| raw_ostream & llvm::orc::operator<< | ( | raw_ostream & | OS, |
| const SymbolState & | S | ||
| ) |
Render a SymbolState.
Definition at line 291 of file Core.cpp.
References llvm::Invalid, and llvm_unreachable.
| std::error_code llvm::orc::orcError | ( | OrcErrorCode | ErrCode | ) |
Definition at line 78 of file OrcError.cpp.
Referenced by llvm::orc::remote::ResourceNotFound< ResourceIdT >::convertToErrorCode(), llvm::orc::rpc::ConnectionClosed::convertToErrorCode(), llvm::orc::DuplicateDefinition::convertToErrorCode(), llvm::orc::rpc::BadFunctionCall< FnIdT, SeqNoT >::convertToErrorCode(), llvm::orc::rpc::InvalidSequenceNumberForResponse< SeqNoT >::convertToErrorCode(), llvm::orc::rpc::ResponseAbandoned::convertToErrorCode(), llvm::orc::rpc::CouldNotNegotiate::convertToErrorCode(), llvm::orc::FailedToMaterialize::convertToErrorCode(), llvm::orc::SymbolsNotFound::convertToErrorCode(), and llvm::orc::SymbolsCouldNotBeRemoved::convertToErrorCode().
|
inline |
Create a materialization unit for re-exporting symbols from another JITDylib with alternative names/flags.
SourceJD will be searched using the given JITDylibLookupFlags.
Definition at line 685 of file Core.h.
References buildSimpleReexportsAAliasMap().
Referenced by llvm::orc::ReExportsMaterializationUnit::getName(), and llvm::orc::ReexportsGenerator::tryToGenerate().
| int llvm::orc::runAsMain | ( | int(*)(int, char *[]) | Main, |
| ArrayRef< std::string > | Args, | ||
| Optional< StringRef > | ProgramName = None |
||
| ) |
Run a main function, returning the result.
If the optional ProgramName argument is given then it will be inserted before the strings in Args as the first argument to the called function.
It is legal to have an empty argument list and no program name, however many main functions will expect a name argument at least, and will fail if none is provided.
Definition at line 22 of file ExecutionUtils.cpp.
References Arg, llvm::copy(), and llvm::ArrayRef< T >::size().
|
inline |
Create a ReExportsMaterializationUnit with the given aliases.
Useful for defining symbol aliases.: E.g., given a JITDylib JD containing symbols "foo" and "bar", we can define aliases "baz" (for "foo") and "qux" (for "bar") with:
Definition at line 675 of file Core.h.
References MatchAllSymbols.
Referenced by llvm::orc::ReExportsMaterializationUnit::getName().
| RegisterDependenciesFunction llvm::orc::NoDependenciesToRegister |
This can be used as the value for a RegisterDependenciesFunction if there are no dependants to register with.
Definition at line 148 of file Core.cpp.
Referenced by llvm::orc::ExecutionSession::lookup(), and llvm::orc::Speculator::registerSymbols().
1.8.13