LLVM 22.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 65 of file IndirectionUtils.h.
using llvm::orc::TrampolinePool::NotifyLandingResolvedFunction = unique_function<void(ExecutorAddr) const> |
Definition at line 67 of file IndirectionUtils.h.
using llvm::orc::TrampolinePool::ResolveLandingFunction = unique_function<void( ExecutorAddr TrampolineAddr, NotifyLandingResolvedFunction OnLandingResolved) const> |
Definition at line 70 of file IndirectionUtils.h.
|
virtualdefault |
|
inline |
Get an available trampoline address.
Returns an error if no trampoline can be created.
Definition at line 78 of file IndirectionUtils.h.
References assert().
Referenced by llvm::orc::LazyCallThroughManager::getCallThroughTrampoline().
|
protectedpure virtual |
|
inline |
Returns the given trampoline to the pool for re-use.
Definition at line 91 of file IndirectionUtils.h.
|
protected |
Definition at line 100 of file IndirectionUtils.h.
|
protected |
Definition at line 99 of file IndirectionUtils.h.