LLVM 20.0.0git
|
Base class for pools of compiler re-entry trampolines. More...
#include "llvm/ExecutionEngine/Orc/IndirectionUtils.h"
Public Types | |
using | NotifyLandingResolvedFunction = unique_function< void(ExecutorAddr) const > |
using | ResolveLandingFunction = unique_function< void(ExecutorAddr TrampolineAddr, NotifyLandingResolvedFunction OnLandingResolved) const > |
Public Member Functions | |
virtual | ~TrampolinePool () |
Expected< ExecutorAddr > | getTrampoline () |
Get an available trampoline address. | |
void | releaseTrampoline (ExecutorAddr TrampolineAddr) |
Returns the given trampoline to the pool for re-use. | |
Protected Member Functions | |
virtual Error | grow ()=0 |
Protected Attributes | |
std::mutex | TPMutex |
std::vector< ExecutorAddr > | AvailableTrampolines |
Base class for pools of compiler re-entry trampolines.
These trampolines are callable addresses that save all register state before calling a supplied function to return the trampoline landing address, then restore all state before jumping to that address. They are used by various ORC APIs to support lazy compilation
Definition at line 64 of file IndirectionUtils.h.
using llvm::orc::TrampolinePool::NotifyLandingResolvedFunction = unique_function<void(ExecutorAddr) const> |
Definition at line 66 of file IndirectionUtils.h.
using llvm::orc::TrampolinePool::ResolveLandingFunction = unique_function<void( ExecutorAddr TrampolineAddr, NotifyLandingResolvedFunction OnLandingResolved) const> |
Definition at line 69 of file IndirectionUtils.h.
|
virtualdefault |
|
inline |
Get an available trampoline address.
Returns an error if no trampoline can be created.
Definition at line 77 of file IndirectionUtils.h.
References assert(), AvailableTrampolines, grow(), and TPMutex.
Referenced by llvm::orc::LazyCallThroughManager::getCallThroughTrampoline().
|
protectedpure virtual |
Referenced by getTrampoline().
|
inline |
Returns the given trampoline to the pool for re-use.
Definition at line 90 of file IndirectionUtils.h.
References AvailableTrampolines, and TPMutex.
|
protected |
Definition at line 99 of file IndirectionUtils.h.
Referenced by getTrampoline(), and releaseTrampoline().
|
protected |
Definition at line 98 of file IndirectionUtils.h.
Referenced by getTrampoline(), and releaseTrampoline().