LLVM 22.0.0git
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 34 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 69 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 66 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 37 of file ExecutorAddress.h.

Constructor & Destructor Documentation

◆ ExecutorAddr() [1/2]

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

◆ ExecutorAddr() [2/2]

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

Create an ExecutorAddr from the given value.

Definition at line 106 of file ExecutorAddress.h.

Member Function Documentation

◆ fromPtr()

template<typename T, typename UnwrapFn = defaultUnwrap<T>>
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 111 of file ExecutorAddress.h.

References ExecutorAddr(), Ptr, and T.

Referenced by llvm::orc::rt_bootstrap::ExecutorSharedMemoryMapperService::addBootstrapSymbols(), llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::addBootstrapSymbols(), llvm::orc::rt_bootstrap::SimpleExecutorMemoryManager::addBootstrapSymbols(), llvm::orc::UnwindInfoManager::addBootstrapSymbols(), llvm::orc::addDefaultBootstrapValuesForHostProcess(), 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::ExecutorSymbolDef::fromPtr(), llvm::orc::ExecutorAddrRange::fromPtrRange(), llvm::orc::ExecutorAddrRange::fromPtrRange(), llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::lookup(), llvm::orc::rt_bootstrap::SimpleExecutorDylibManager::open(), llvm::orc::InProcessMemoryAccess::readPointersAsync(), llvm::orc::rt_bootstrap::readPointersWrapper(), 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()

◆ isNull()

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

Definition at line 138 of file ExecutorAddress.h.

◆ operator bool()

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

Definition at line 140 of file ExecutorAddress.h.

◆ operator++() [1/2]

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

Definition at line 166 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator++() [2/2]

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

Definition at line 174 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator+=()

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

Definition at line 177 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator--() [1/2]

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

Definition at line 170 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator--() [2/2]

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

Definition at line 175 of file ExecutorAddress.h.

References ExecutorAddr().

◆ operator-=()

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

Definition at line 182 of file ExecutorAddress.h.

References ExecutorAddr().

◆ setValue()

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

◆ toPtr() [1/2]

◆ 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 130 of file ExecutorAddress.h.

References assert(), and T.

◆ operator!=

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

Definition at line 146 of file ExecutorAddress.h.

References ExecutorAddr(), LHS, and RHS.

◆ operator<

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

Definition at line 150 of file ExecutorAddress.h.

References ExecutorAddr(), LHS, and RHS.

◆ operator<=

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

Definition at line 154 of file ExecutorAddress.h.

References ExecutorAddr(), LHS, and RHS.

◆ operator==

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

Definition at line 142 of file ExecutorAddress.h.

References ExecutorAddr(), LHS, and RHS.

◆ operator>

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

Definition at line 158 of file ExecutorAddress.h.

References ExecutorAddr(), LHS, and RHS.

◆ operator>=

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

Definition at line 162 of file ExecutorAddress.h.

References ExecutorAddr(), LHS, and RHS.


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