LLVM 22.0.0git
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:
[legend]

Classes

struct  ReexportsEntry

Public Types

using NotifyResolvedFunction

Public Member Functions

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

Protected Types

using NotifyLandingResolvedFunction

Protected Member Functions

LLVM_ABI ExecutorAddr reportCallThroughError (Error Err)
LLVM_ABI Expected< ReexportsEntryfindReexport (ExecutorAddr TrampolineAddr)
LLVM_ABI 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 40 of file LazyReexports.h.

Member Typedef Documentation

◆ NotifyLandingResolvedFunction

Initial value:
unique_function< void(ExecutorAddr) const > NotifyLandingResolvedFunction

Definition at line 62 of file LazyReexports.h.

◆ NotifyResolvedFunction

Initial value:
Represents an address in the executor process.
unique_function is a type-erasing functor similar to std::function.

Definition at line 42 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().

◆ 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

Definition at line 42 of file LazyReexports.cpp.

Referenced by resolveTrampolineLandingAddress().

◆ resolveTrampolineLandingAddress()

◆ setTrampolinePool()

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

Definition at line 74 of file LazyReexports.h.


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