LLVM 20.0.0git
|
Provides lookup and iteration over an on disk hash table. More...
#include "llvm/Support/OnDiskHashTable.h"
Classes | |
class | data_iterator |
Iterates over all the entries in the table, returning the data. More... | |
class | key_iterator |
Iterates over all of the keys in the table. More... | |
Public Types | |
typedef OnDiskChainedHashTable< Info > | base_type |
typedef base_type::internal_key_type | internal_key_type |
typedef base_type::external_key_type | external_key_type |
typedef base_type::data_type | data_type |
typedef base_type::hash_value_type | hash_value_type |
typedef base_type::offset_type | offset_type |
Public Types inherited from llvm::OnDiskChainedHashTable< Info > | |
typedef Info | InfoType |
typedef Info::internal_key_type | internal_key_type |
typedef Info::external_key_type | external_key_type |
typedef Info::data_type | data_type |
typedef Info::hash_value_type | hash_value_type |
typedef Info::offset_type | offset_type |
Static Public Member Functions | |
static OnDiskIterableChainedHashTable * | Create (const unsigned char *Buckets, const unsigned char *const Payload, const unsigned char *const Base, const Info &InfoObj=Info()) |
Create the hash table. | |
Static Public Member Functions inherited from llvm::OnDiskChainedHashTable< Info > | |
static std::pair< offset_type, offset_type > | readNumBucketsAndEntries (const unsigned char *&Buckets) |
Read the number of buckets and the number of entries from a hash table produced by OnDiskHashTableGenerator::Emit, and advance the Buckets pointer past them. | |
static OnDiskChainedHashTable * | Create (const unsigned char *Buckets, const unsigned char *const Base, const Info &InfoObj=Info()) |
Create the hash table. | |
Provides lookup and iteration over an on disk hash table.
This needs an Info
that handles reading values from the hash table's payload and computes the hash for a given key. This should provide the following interface:
Definition at line 434 of file OnDiskHashTable.h.
typedef OnDiskChainedHashTable<Info> llvm::OnDiskIterableChainedHashTable< Info >::base_type |
Definition at line 438 of file OnDiskHashTable.h.
typedef base_type::data_type llvm::OnDiskIterableChainedHashTable< Info >::data_type |
Definition at line 441 of file OnDiskHashTable.h.
typedef base_type::external_key_type llvm::OnDiskIterableChainedHashTable< Info >::external_key_type |
Definition at line 440 of file OnDiskHashTable.h.
typedef base_type::hash_value_type llvm::OnDiskIterableChainedHashTable< Info >::hash_value_type |
Definition at line 442 of file OnDiskHashTable.h.
typedef base_type::internal_key_type llvm::OnDiskIterableChainedHashTable< Info >::internal_key_type |
Definition at line 439 of file OnDiskHashTable.h.
typedef base_type::offset_type llvm::OnDiskIterableChainedHashTable< Info >::offset_type |
Definition at line 443 of file OnDiskHashTable.h.
|
inline |
Definition at line 495 of file OnDiskHashTable.h.
References llvm::sampleprof::Base.
|
inlinestatic |
Create the hash table.
Buckets | is the beginning of the hash table itself, which follows the payload of entire structure. This is the value returned by OnDiskHashTableGenerator::Emit. |
Payload | is the beginning of the data contained in the table. This is Base plus any padding or header data that was stored, ie, the offset that the stream was at when calling Emit. |
Base | is the point from which all offsets into the structure are based. This is offset 0 in the stream that was used when Emitting the table. |
Definition at line 606 of file OnDiskHashTable.h.
References assert(), llvm::sampleprof::Base, and llvm::OnDiskChainedHashTable< Info >::readNumBucketsAndEntries().
|
inline |
Definition at line 588 of file OnDiskHashTable.h.
References llvm::OnDiskIterableChainedHashTable< Info >::data_begin(), llvm::OnDiskIterableChainedHashTable< Info >::data_end(), and llvm::make_range().
|
inline |
Definition at line 583 of file OnDiskHashTable.h.
References llvm::OnDiskChainedHashTable< Info >::getInfoObj(), and llvm::OnDiskChainedHashTable< Info >::getNumEntries().
Referenced by llvm::OnDiskIterableChainedHashTable< Info >::data().
|
inline |
Definition at line 586 of file OnDiskHashTable.h.
Referenced by llvm::OnDiskIterableChainedHashTable< Info >::data().
|
inline |
Definition at line 540 of file OnDiskHashTable.h.
References llvm::OnDiskChainedHashTable< Info >::getInfoObj(), and llvm::OnDiskChainedHashTable< Info >::getNumEntries().
Referenced by llvm::OnDiskIterableChainedHashTable< Info >::keys().
|
inline |
Definition at line 543 of file OnDiskHashTable.h.
Referenced by llvm::OnDiskIterableChainedHashTable< Info >::keys().
|
inline |
Definition at line 545 of file OnDiskHashTable.h.
References llvm::OnDiskIterableChainedHashTable< Info >::key_begin(), llvm::OnDiskIterableChainedHashTable< Info >::key_end(), and llvm::make_range().