LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Protected Types | 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

struct  ReexportsEntry
 

Public Types

using NotifyResolvedFunction = unique_function< Error(ExecutorAddr ResolvedAddr)>
 

Public Member Functions

 LazyCallThroughManager (ExecutionSession &ES, ExecutorAddr ErrorHandlerAddr, TrampolinePool *TP)
 
Expected< ExecutorAddrgetCallThroughTrampoline (JITDylib &SourceJD, SymbolStringPtr SymbolName, NotifyResolvedFunction NotifyResolved)
 
void resolveTrampolineLandingAddress (ExecutorAddr TrampolineAddr, TrampolinePool::NotifyLandingResolvedFunction NotifyLandingResolved)
 
virtual ~LazyCallThroughManager ()=default
 

Protected Types

using NotifyLandingResolvedFunction = TrampolinePool::NotifyLandingResolvedFunction
 

Protected Member Functions

ExecutorAddr reportCallThroughError (Error Err)
 
Expected< ReexportsEntryfindReexport (ExecutorAddr TrampolineAddr)
 
Error notifyResolved (ExecutorAddr TrampolineAddr, ExecutorAddr ResolvedAddr)
 
void setTrampolinePool (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 39 of file LazyReexports.h.

Member Typedef Documentation

◆ NotifyLandingResolvedFunction

Definition at line 60 of file LazyReexports.h.

◆ NotifyResolvedFunction

Definition at line 41 of file LazyReexports.h.

Constructor & Destructor Documentation

◆ LazyCallThroughManager()

llvm::orc::LazyCallThroughManager::LazyCallThroughManager ( ExecutionSession ES,
ExecutorAddr  ErrorHandlerAddr,
TrampolinePool TP 
)

Definition at line 21 of file LazyReexports.cpp.

◆ ~LazyCallThroughManager()

virtual llvm::orc::LazyCallThroughManager::~LazyCallThroughManager ( )
virtualdefault

Member Function Documentation

◆ findReexport()

Expected< LazyCallThroughManager::ReexportsEntry > llvm::orc::LazyCallThroughManager::findReexport ( ExecutorAddr  TrampolineAddr)
protected

◆ getCallThroughTrampoline()

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

Definition at line 26 of file LazyReexports.cpp.

References assert(), and llvm::orc::TrampolinePool::getTrampoline().

◆ notifyResolved()

Error llvm::orc::LazyCallThroughManager::notifyResolved ( ExecutorAddr  TrampolineAddr,
ExecutorAddr  ResolvedAddr 
)
protected

Definition at line 58 of file LazyReexports.cpp.

References I, and llvm::Error::success().

Referenced by resolveTrampolineLandingAddress().

◆ reportCallThroughError()

ExecutorAddr llvm::orc::LazyCallThroughManager::reportCallThroughError ( Error  Err)
protected

◆ resolveTrampolineLandingAddress()

void llvm::orc::LazyCallThroughManager::resolveTrampolineLandingAddress ( ExecutorAddr  TrampolineAddr,
TrampolinePool::NotifyLandingResolvedFunction  NotifyLandingResolved 
)

◆ setTrampolinePool()

void llvm::orc::LazyCallThroughManager::setTrampolinePool ( TrampolinePool TP)
inlineprotected

Definition at line 71 of file LazyReexports.h.


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