LLVM  8.0.1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
llvm::orc::LazyCallThroughManager Class Reference

Manages a set of 'lazy call-through' trampolines. More...

#include "llvm/ExecutionEngine/Orc/LazyReexports.h"

Inheritance diagram for llvm::orc::LazyCallThroughManager:
Inheritance graph
[legend]

Classes

class  NotifyResolvedFunction
 Clients will want to take some action on first resolution, e.g. More...
 
class  NotifyResolvedFunctionImpl
 

Public Member Functions

Expected< JITTargetAddressgetCallThroughTrampoline (JITDylib &SourceJD, SymbolStringPtr SymbolName, std::shared_ptr< NotifyResolvedFunction > NotifyResolved)
 

Static Public Member Functions

template<typename NotifyResolvedImpl >
static std::unique_ptr< NotifyResolvedFunctioncreateNotifyResolvedFunction (NotifyResolvedImpl NotifyResolved)
 Create a shared NotifyResolvedFunction from a given type that is callable with the correct signature. More...
 

Protected Member Functions

 LazyCallThroughManager (ExecutionSession &ES, JITTargetAddress ErrorHandlerAddr, std::unique_ptr< TrampolinePool > TP)
 
JITTargetAddress callThroughToSymbol (JITTargetAddress TrampolineAddr)
 
void setTrampolinePool (std::unique_ptr< TrampolinePool > TP)
 

Detailed Description

Manages a set of 'lazy call-through' trampolines.

These are compiler re-entry trampolines that are pre-bound to look up a given symbol in a given JITDylib, then jump to that address. Since compilation of symbols is triggered on first lookup, these call-through trampolines can be used to implement lazy compilation.

The easiest way to construct these call-throughs is using the lazyReexport function.

Definition at line 37 of file LazyReexports.h.

Constructor & Destructor Documentation

◆ LazyCallThroughManager()

llvm::orc::LazyCallThroughManager::LazyCallThroughManager ( ExecutionSession ES,
JITTargetAddress  ErrorHandlerAddr,
std::unique_ptr< TrampolinePool TP 
)
protected

Definition at line 22 of file LazyReexports.cpp.

Referenced by createNotifyResolvedFunction().

Member Function Documentation

◆ callThroughToSymbol()

JITTargetAddress llvm::orc::LazyCallThroughManager::callThroughToSymbol ( JITTargetAddress  TrampolineAddr)
protected

◆ createNotifyResolvedFunction()

template<typename NotifyResolvedImpl >
static std::unique_ptr<NotifyResolvedFunction> llvm::orc::LazyCallThroughManager::createNotifyResolvedFunction ( NotifyResolvedImpl  NotifyResolved)
inlinestatic

Create a shared NotifyResolvedFunction from a given type that is callable with the correct signature.

Definition at line 73 of file LazyReexports.h.

References callThroughToSymbol(), getCallThroughTrampoline(), LazyCallThroughManager(), and llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName.

◆ getCallThroughTrampoline()

Expected< JITTargetAddress > llvm::orc::LazyCallThroughManager::getCallThroughTrampoline ( JITDylib SourceJD,
SymbolStringPtr  SymbolName,
std::shared_ptr< NotifyResolvedFunction NotifyResolved 
)

◆ setTrampolinePool()

void llvm::orc::LazyCallThroughManager::setTrampolinePool ( std::unique_ptr< TrampolinePool TP)
inlineprotected

Definition at line 91 of file LazyReexports.h.


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