LLVM 20.0.0git
|
Simple page-based allocator. More...
#include "llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.h"
Public Member Functions | |
virtual | ~SimpleExecutorMemoryManager () |
Expected< ExecutorAddr > | allocate (uint64_t Size) |
Error | finalize (tpctypes::FinalizeRequest &FR) |
Error | deallocate (const std::vector< ExecutorAddr > &Bases) |
Error | shutdown () override |
void | addBootstrapSymbols (StringMap< ExecutorAddr > &M) override |
Public Member Functions inherited from llvm::orc::ExecutorBootstrapService | |
virtual | ~ExecutorBootstrapService () |
virtual void | addBootstrapSymbols (StringMap< ExecutorAddr > &BootstrapSymbols)=0 |
virtual Error | shutdown ()=0 |
Simple page-based allocator.
Definition at line 32 of file SimpleExecutorMemoryManager.h.
|
virtual |
Definition at line 20 of file SimpleExecutorMemoryManager.cpp.
References assert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty().
|
overridevirtual |
Implements llvm::orc::ExecutorBootstrapService.
Definition at line 200 of file SimpleExecutorMemoryManager.cpp.
References llvm::orc::ExecutorAddr::fromPtr(), llvm::orc::rt::SimpleExecutorMemoryManagerDeallocateWrapperName, llvm::orc::rt::SimpleExecutorMemoryManagerFinalizeWrapperName, llvm::orc::rt::SimpleExecutorMemoryManagerInstanceName, and llvm::orc::rt::SimpleExecutorMemoryManagerReserveWrapperName.
Expected< ExecutorAddr > llvm::orc::rt_bootstrap::SimpleExecutorMemoryManager::allocate | ( | uint64_t | Size | ) |
Definition at line 24 of file SimpleExecutorMemoryManager.cpp.
References llvm::sys::Memory::allocateMappedMemory(), assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::errorCodeToError(), llvm::orc::ExecutorAddr::fromPtr(), llvm::sys::Memory::MF_READ, llvm::sys::Memory::MF_WRITE, and Size.
Error llvm::orc::rt_bootstrap::SimpleExecutorMemoryManager::deallocate | ( | const std::vector< ExecutorAddr > & | Bases | ) |
Definition at line 151 of file SimpleExecutorMemoryManager.cpp.
References llvm::sampleprof::Base, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::formatv(), I, llvm::inconvertibleErrorCode(), llvm::joinErrors(), P, and llvm::Error::success().
Error llvm::orc::rt_bootstrap::SimpleExecutorMemoryManager::finalize | ( | tpctypes::FinalizeRequest & | FR | ) |
Definition at line 36 of file SimpleExecutorMemoryManager.cpp.
References llvm::orc::tpctypes::FinalizeRequest::Actions, assert(), llvm::sampleprof::Base, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), llvm::errorCodeToError(), llvm::orc::Exec, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::formatv(), llvm::orc::ExecutorAddr::getValue(), I, llvm::inconvertibleErrorCode(), llvm::sys::Memory::InvalidateInstructionCache(), llvm::joinErrors(), LLVM_UNLIKELY, llvm::sys::Memory::protectMappedMemory(), llvm::sys::Memory::releaseMappedMemory(), llvm::orc::tpctypes::FinalizeRequest::Segments, llvm::Error::success(), and llvm::orc::toSysMemoryProtectionFlags().
|
overridevirtual |
Implements llvm::orc::ExecutorBootstrapService.
Definition at line 186 of file SimpleExecutorMemoryManager.cpp.
References llvm::joinErrors(), and llvm::Error::success().