LLVM 20.0.0git
|
#include "llvm/ADT/ConcurrentHashtable.h"
Classes | |
struct | Bucket |
Public Member Functions | |
ConcurrentHashTableByPtr (AllocatorTy &Allocator, uint64_t EstimatedSize=100000, size_t ThreadsNum=parallel::strategy.compute_thread_count(), size_t InitialNumberOfBuckets=128) | |
virtual | ~ConcurrentHashTableByPtr () |
std::pair< KeyDataTy *, bool > | insert (const KeyTy &NewValue) |
Insert new value NewValue or return already existing entry. | |
void | printStatistic (raw_ostream &OS) |
Print information about current state of hash table structures. | |
Protected Types | |
using | ExtHashBitsTy = uint32_t |
using | EntryDataTy = KeyDataTy * |
using | HashesPtr = ExtHashBitsTy * |
using | DataPtr = EntryDataTy * |
Protected Member Functions | |
void | RehashBucket (Bucket &CurBucket) |
uint32_t | getBucketIdx (hash_code Hash) |
uint32_t | getExtHashBits (uint64_t Hash) |
uint32_t | getStartIdx (uint32_t ExtHashBits, uint32_t BucketSize) |
Protected Attributes | |
uint64_t | HashBitsNum = 0 |
uint64_t | HashMask = 0 |
uint64_t | ExtHashMask = 0 |
uint32_t | MaxBucketSize = 0 |
uint32_t | InitialBucketSize = 0 |
uint32_t | NumberOfBuckets = 0 |
std::unique_ptr< Bucket[]> | BucketsArray |
AllocatorTy & | MultiThreadAllocator |
Definition at line 102 of file ConcurrentHashtable.h.
|
protected |
Definition at line 274 of file ConcurrentHashtable.h.
|
protected |
Definition at line 271 of file ConcurrentHashtable.h.
|
protected |
Definition at line 270 of file ConcurrentHashtable.h.
|
protected |
Definition at line 273 of file ConcurrentHashtable.h.
|
inline |
Definition at line 104 of file ConcurrentHashtable.h.
References assert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, llvm::countl_zero(), llvm::countr_zero(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ExtHashMask, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashBitsNum, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashMask, Idx, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::InitialBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MaxBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::NumberOfBuckets, and llvm::PowerOf2Ceil().
|
inlinevirtual |
Definition at line 160 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, Idx, and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::NumberOfBuckets.
|
inlineprotected |
Definition at line 362 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashMask.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert().
|
inlineprotected |
Definition at line 364 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ExtHashMask, and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashBitsNum.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert().
|
inlineprotected |
Definition at line 368 of file ConcurrentHashtable.h.
References assert().
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::RehashBucket().
|
inline |
Insert new value NewValue
or return already existing entry.
Definition at line 172 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Entries, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getBucketIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getExtHashBits(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getStartIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Hashes, llvm_unreachable, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MultiThreadAllocator, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::RehashBucket(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneScalarAttr(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneStringAttr(), llvm::dwarf_linker::parallel::CompileUnit::getFileName(), llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::save(), and llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::saveObjC().
|
inline |
Print information about current state of hash table structures.
Definition at line 228 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, Idx, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::InitialBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::NumberOfBuckets, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, OS, and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
|
inlineprotected |
Definition at line 299 of file ConcurrentHashtable.h.
References assert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Entries, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getStartIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Hashes, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MaxBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, llvm::report_fatal_error(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert().
|
protected |
Definition at line 393 of file ConcurrentHashtable.h.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ConcurrentHashTableByPtr(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::printStatistic(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::~ConcurrentHashTableByPtr().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 396 of file ConcurrentHashtable.h.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert().
|
protected |
Definition at line 390 of file ConcurrentHashtable.h.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ConcurrentHashTableByPtr(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::printStatistic(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::~ConcurrentHashTableByPtr().