|
LLVM
3.7.0
|
Classes | |
| class | CompileOnDemandLayer |
| Compile-on-demand layer. More... | |
| class | SimpleCompiler |
| Simple compile functor: Takes a single IR module and returns an ObjectFile. 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 |
| Convenience class for recording constructor/destructor names for later execution. More... | |
| class | LocalCXXRuntimeOverrides |
| Support class for static dtor execution. More... | |
| class | JITCompileCallbackManagerBase |
| Base class for JITLayer independent aspects of JITCompileCallbackManager. More... | |
| class | JITCompileCallbackManager |
| Manage compile callbacks. More... | |
| class | IRCompileLayer |
| Eager IR compiling layer. More... | |
| class | IRTransformLayer |
| IR mutating layer. More... | |
| class | JITSymbol |
| Represents a symbol in the JIT. More... | |
| class | LambdaResolver |
| class | LazyEmittingLayer |
| Lazy-emitting IR layer. More... | |
| class | LogicalDylib |
| class | NullResolver |
| SymbolResolver impliementation that rejects all resolution requests. More... | |
| class | ObjectLinkingLayerBase |
| class | DoNothingOnNotifyLoaded |
| Default (no-op) action to perform when loading objects. More... | |
| class | ObjectLinkingLayer |
| Bare bones object linking layer. More... | |
| class | ObjectTransformLayer |
| Object mutating layer. More... | |
| class | OrcX86_64 |
| class | GlobalRenamer |
| class | OrcMCJITReplacement |
Typedefs | |
| typedef uint64_t | TargetAddress |
| Represents an address in the target process's address space. More... | |
Functions | |
| 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... | |
| Constant * | createIRTypedAddress (FunctionType &FT, TargetAddress 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, GlobalVariable &ImplPointer) |
| Turn a function declaration into a stub function that makes an indirect call using the given function pointer. More... | |
| void | makeAllSymbolsExternallyAccessible (Module &M) |
| Raise linkage types and rename as necessary to ensure that all symbols are accessible for other modules. 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... | |
| template<typename ExternalLookupFtorT , typename DylibLookupFtorT > | |
| std::unique_ptr < LambdaResolver < ExternalLookupFtorT, DylibLookupFtorT > > | createLambdaResolver (ExternalLookupFtorT ExternalLookupFtor, DylibLookupFtorT DylibLookupFtor) |
| static void | raiseVisibilityOnValue (GlobalValue &V, GlobalRenamer &R) |
| typedef uint64_t llvm::orc::TargetAddress |
Represents an address in the target process's address space.
Definition at line 26 of file JITSymbol.h.
| 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 111 of file IndirectionUtils.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::Function::copyAttributesFrom(), llvm::Function::Create(), F(), llvm::SequentialType::getElementType(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getParent(), and llvm::GlobalValue::getType().
| GlobalVariable * llvm::orc::cloneGlobalVariableDecl | ( | Module & | Dst, |
| const GlobalVariable & | GV, | ||
| ValueToValueMapTy * | VMap = nullptr |
||
| ) |
Clone a global variable declaration into a new module.
Definition at line 149 of file IndirectionUtils.cpp.
References llvm::GlobalVariable::copyAttributesFrom(), llvm::PointerType::getAddressSpace(), llvm::SequentialType::getElementType(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::GlobalValue::getThreadLocalMode(), llvm::GlobalValue::getType(), and llvm::GlobalVariable::isConstant().
| 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 31 of file IndirectionUtils.cpp.
References llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::HiddenVisibility, llvm::IP, and llvm::GlobalValue::NotThreadLocal.
| Constant * llvm::orc::createIRTypedAddress | ( | FunctionType & | FT, |
| TargetAddress | 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 22 of file IndirectionUtils.cpp.
References llvm::ConstantInt::get(), llvm::PointerType::get(), llvm::ConstantExpr::getCast(), llvm::Type::getContext(), and llvm::Type::getInt64Ty().
| std::unique_ptr<LambdaResolver<ExternalLookupFtorT, DylibLookupFtorT> > llvm::orc::createLambdaResolver | ( | ExternalLookupFtorT | ExternalLookupFtor, |
| DylibLookupFtorT | DylibLookupFtor | ||
| ) |
Definition at line 52 of file LambdaResolver.h.
| 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 74 of file ExecutionUtils.cpp.
References llvm::Module::getNamedGlobal(), and llvm::make_range().
| 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 80 of file ExecutionUtils.cpp.
References llvm::Module::getNamedGlobal(), and llvm::make_range().
| void llvm::orc::makeAllSymbolsExternallyAccessible | ( | Module & | M | ) |
Raise linkage types and rename as necessary to ensure that all symbols are accessible for other modules.
This should be called before partitioning a module to ensure that the partitions retain access to each other's symbols.
Definition at line 101 of file IndirectionUtils.cpp.
References F(), and raiseVisibilityOnValue().
| void llvm::orc::makeStub | ( | Function & | F, |
| GlobalVariable & | ImplPointer | ||
| ) |
Turn a function declaration into a stub function that makes an indirect call using the given function pointer.
Definition at line 40 of file IndirectionUtils.cpp.
References llvm::ARM_PROC::A, llvm::Function::args(), llvm::Call, llvm::BasicBlock::Create(), F(), llvm::Function::getAttributes(), llvm::GlobalValue::getParent(), llvm::Function::getReturnType(), llvm::GlobalValue::isDeclaration(), llvm::Type::isVoidTy(), llvm::CallInst::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 130 of file IndirectionUtils.cpp.
References 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 162 of file IndirectionUtils.cpp.
References llvm::GlobalVariable::getInitializer(), llvm::GlobalValue::getParent(), llvm::GlobalVariable::hasInitializer(), llvm::MapValue(), llvm::RF_None, and llvm::GlobalVariable::setInitializer().
|
static |
Definition at line 90 of file IndirectionUtils.cpp.
References llvm::GlobalValue::ExternalLinkage, llvm::orc::GlobalRenamer::getRename(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::HiddenVisibility, llvm::orc::GlobalRenamer::needsRenaming(), llvm::GlobalValue::setLinkage(), llvm::Value::setName(), llvm::GlobalValue::setUnnamedAddr(), and llvm::GlobalValue::setVisibility().
Referenced by makeAllSymbolsExternallyAccessible().
1.8.6