LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::orc::ExecutorAddr Class Reference

Represents an address in the executor process. More...

#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"

Classes

class  Tag
 Merges a tag into the raw address value: P' = P | (TagValue << TagOffset). More...
 
class  Untag
 Strips a tag of the given length from the given offset within the pointer: P' = P & ~(((1 << TagLen) -1) << TagOffset) More...
 

Public Types

template<typename T >
using rawPtr = llvm::identity< T * >
 A wrap/unwrap function that leaves pointers unmodified.
 
template<typename T >
using defaultWrap = rawPtr< T >
 Default wrap function to use on this host.
 
template<typename T >
using defaultUnwrap = rawPtr< T >
 Default unwrap function to use on this host.
 

Public Member Functions

 ExecutorAddr ()=default
 
constexpr ExecutorAddr (uint64_t Addr)
 Create an ExecutorAddr from the given value.
 
template<typename T , typename WrapFn = defaultWrap<std::remove_pointer_t<T>>>
std::enable_if_t< std::is_pointer< T >::value, TtoPtr (WrapFn &&Wrap=WrapFn()) const
 Cast this ExecutorAddr to a pointer of the given type.
 
template<typename T , typename WrapFn = defaultWrap<T>>
std::enable_if_t< std::is_function< T >::value, T * > toPtr (WrapFn &&Wrap=WrapFn()) const
 Cast this ExecutorAddr to a pointer of the given function type.
 
uint64_t getValue () const
 
void setValue (uint64_t Addr)
 
bool isNull () const
 
 operator bool () const
 
ExecutorAddroperator++ ()
 
ExecutorAddroperator-- ()
 
ExecutorAddr operator++ (int)
 
ExecutorAddr operator-- (int)
 
ExecutorAddroperator+= (const ExecutorAddrDiff &Delta)
 
ExecutorAddroperator-= (const ExecutorAddrDiff &Delta)
 

Static Public Member Functions

template<typename T , typename UnwrapFn = defaultUnwrap<T>>
static ExecutorAddr fromPtr (T *Ptr, UnwrapFn &&Unwrap=UnwrapFn())
 Create an ExecutorAddr from the given pointer.
 

Friends

bool operator== (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator!= (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator< (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator<= (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator> (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 
bool operator>= (const ExecutorAddr &LHS, const ExecutorAddr &RHS)
 

Detailed Description

Represents an address in the executor process.

Definition at line 31 of file ExecutorAddress.h.

Member Typedef Documentation

◆ defaultUnwrap

template<typename T >
using llvm::orc::ExecutorAddr::defaultUnwrap = rawPtr<T>

Default unwrap function to use on this host.

Definition at line 40 of file ExecutorAddress.h.

◆ defaultWrap

template<typename T >
using llvm::orc::ExecutorAddr::defaultWrap = rawPtr<T>

Default wrap function to use on this host.

Definition at line 37 of file ExecutorAddress.h.

◆ rawPtr

template<typename T >
using llvm::orc::ExecutorAddr::rawPtr = llvm::identity<T *>

A wrap/unwrap function that leaves pointers unmodified.

Definition at line 34 of file ExecutorAddress.h.

Constructor & Destructor Documentation

◆ ExecutorAddr() [1/2]

llvm::orc::ExecutorAddr::ExecutorAddr ( )
default

Referenced by fromPtr(), operator++(), and operator--().

◆ ExecutorAddr() [2/2]

constexpr llvm::orc::ExecutorAddr::ExecutorAddr ( uint64_t  Addr)
inlineexplicitconstexpr

Create an ExecutorAddr from the given value.

Definition at line 75 of file ExecutorAddress.h.

References Addr.

Member Function Documentation

◆ fromPtr()

template<typename T , typename UnwrapFn = defaultUnwrap<T>>
static ExecutorAddr llvm::orc::ExecutorAddr::fromPtr ( T Ptr,
UnwrapFn &&  Unwrap = UnwrapFn() 
)
inlinestatic

Create an ExecutorAddr from the given pointer.

Warning: This should only be used when JITing in-process.

Definition at line 80 of file ExecutorAddress.h.

References ExecutorAddr(), and Ptr.

Referenced by llvm::orc::rt_bootstrap::ExecutorSharedMemoryMapperService::addBootstrapSymbols(), llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::addBootstrapSymbols(), llvm::orc::rt_bootstrap::SimpleExecutorMemoryManager::addBootstrapSymbols(), llvm::orc::Speculator::addSpeculationRuntime(), llvm::orc::rt_bootstrap::addTo(), llvm::jitlink::InProcessMemoryManager::allocate(), llvm::orc::rt_bootstrap::SimpleExecutorMemoryManager::allocate(), llvm::orc::LocalIndirectStubsInfo< ORCABI >::create(), llvm::orc::LocalCXXRuntimeOverrides::enable(), llvm::orc::LocalIndirectStubsManager< TargetT >::findPointer(), llvm::orc::LocalIndirectStubsManager< TargetT >::findStub(), llvm::orc::SelfExecutorProcessControl::loadDylib(), llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::lookup(), llvm::orc::SelfExecutorProcessControl::lookupSymbolsAsync(), llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::open(), llvm::orc::InProcessMemoryMapper::reserve(), llvm::orc::rt_bootstrap::ExecutorSharedMemoryMapperService::reserve(), llvm::orc::SelfExecutorProcessControl::SelfExecutorProcessControl(), llvm::orc::setUpInProcessLCTMReentryViaEPCIU(), llvm::orc::rt_bootstrap::ExecutorSharedMemoryMapperService::shutdown(), llvm::orc::DynamicLibrarySearchGenerator::tryToGenerate(), and llvm::orc::InProcessMemoryMapper::~InProcessMemoryMapper().

◆ getValue()

uint64_t llvm::orc::ExecutorAddr::getValue ( ) const
inline

◆ isNull()

bool llvm::orc::ExecutorAddr::isNull ( ) const
inline

Definition at line 107 of file ExecutorAddress.h.

◆ operator bool()

llvm::orc::ExecutorAddr::operator bool ( ) const
inlineexplicit

Definition at line 109 of file ExecutorAddress.h.

◆ operator++() [1/2]

ExecutorAddr & llvm::orc::ExecutorAddr::operator++ ( )
inline

Definition at line 135 of file ExecutorAddress.h.

◆ operator++() [2/2]

ExecutorAddr llvm::orc::ExecutorAddr::operator++ ( int  )
inline

Definition at line 143 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator+=()

ExecutorAddr & llvm::orc::ExecutorAddr::operator+= ( const ExecutorAddrDiff Delta)
inline

Definition at line 146 of file ExecutorAddress.h.

◆ operator--() [1/2]

ExecutorAddr & llvm::orc::ExecutorAddr::operator-- ( )
inline

Definition at line 139 of file ExecutorAddress.h.

◆ operator--() [2/2]

ExecutorAddr llvm::orc::ExecutorAddr::operator-- ( int  )
inline

Definition at line 144 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator-=()

ExecutorAddr & llvm::orc::ExecutorAddr::operator-= ( const ExecutorAddrDiff Delta)
inline

Definition at line 151 of file ExecutorAddress.h.

◆ setValue()

void llvm::orc::ExecutorAddr::setValue ( uint64_t  Addr)
inline

Definition at line 106 of file ExecutorAddress.h.

References Addr.

◆ toPtr() [1/2]

template<typename T , typename WrapFn = defaultWrap<std::remove_pointer_t<T>>>
std::enable_if_t< std::is_pointer< T >::value, T > llvm::orc::ExecutorAddr::toPtr ( WrapFn &&  Wrap = WrapFn()) const
inline

◆ toPtr() [2/2]

template<typename T , typename WrapFn = defaultWrap<T>>
std::enable_if_t< std::is_function< T >::value, T * > llvm::orc::ExecutorAddr::toPtr ( WrapFn &&  Wrap = WrapFn()) const
inline

Cast this ExecutorAddr to a pointer of the given function type.

Warning: This should only be used when JITing in-process.

Definition at line 99 of file ExecutorAddress.h.

References assert().

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 115 of file ExecutorAddress.h.

◆ operator<

bool operator< ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 119 of file ExecutorAddress.h.

◆ operator<=

bool operator<= ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 123 of file ExecutorAddress.h.

◆ operator==

bool operator== ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 111 of file ExecutorAddress.h.

◆ operator>

bool operator> ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 127 of file ExecutorAddress.h.

◆ operator>=

bool operator>= ( const ExecutorAddr LHS,
const ExecutorAddr RHS 
)
friend

Definition at line 131 of file ExecutorAddress.h.


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