LLVM
8.0.1
|
StringMapImpl - This is the base class of StringMap that is shared among all of its instantiations. More...
#include "llvm/ADT/StringMap.h"
Inherited by llvm::StringMap< ValueTy, AllocatorTy >, llvm::StringMap< bool >, llvm::StringMap< bool, llvm::BumpPtrAllocatorImpl &>, llvm::StringMap< char, AllocatorTy >, llvm::StringMap< Comdat >, llvm::StringMap< const llvm::DIE *>, llvm::StringMap< const PassInfo * >, llvm::StringMap< const RegisterBank * >, llvm::StringMap< const TargetRegisterClass * >, llvm::StringMap< GlobalResolution >, llvm::StringMap< GlobalValue::LinkageTypes >, llvm::StringMap< HashData, BumpPtrAllocator & >, llvm::StringMap< JITTargetAddress >, llvm::StringMap< llvm::cl::Option *>, llvm::StringMap< llvm::ConstantDataSequential *>, llvm::StringMap< llvm::DenseMap >, llvm::StringMap< llvm::DwarfStringPoolEntry, llvm::BumpPtrAllocatorImpl &>, llvm::StringMap< llvm::FileInfo::LineData >, llvm::StringMap< llvm::GCStrategy *>, llvm::StringMap< llvm::JITEvaluatedSymbol >, llvm::StringMap< llvm::MCAsmMacro >, llvm::StringMap< llvm::MCSectionMachO *>, llvm::StringMap< llvm::MDString, llvm::BumpPtrAllocatorImpl >, llvm::StringMap< llvm::sampleprof::FunctionSamples >, llvm::StringMap< llvm::SDNode *>, llvm::StringMap< llvm::SmallDenseMap >, llvm::StringMap< llvm::SmallVector >, llvm::StringMap< llvm::StructType *>, llvm::StringMap< llvm::Type *>, llvm::StringMap< llvm::VRegInfo *>, llvm::StringMap< MCSymbol *, BumpPtrAllocator & >, llvm::StringMap< NameAndAttributes >, llvm::StringMap< NodePtr >, llvm::StringMap< PooledString >, llvm::StringMap< RefCountType >, llvm::StringMap< State >, llvm::StringMap< std::pair< llvm::Type *, llvm::SMLoc > >, llvm::StringMap< std::pair< StubKey, llvm::JITSymbolFlags > >, llvm::StringMap< std::pair< uint64_t, ModuleHash > >, llvm::StringMap< std::unique_ptr< const llvm::ExternalSymbolPseudoSourceValue > >, llvm::StringMap< std::unique_ptr< InlineGraphNode > >, llvm::StringMap< std::unique_ptr< llvm::AArch64Subtarget > >, llvm::StringMap< std::unique_ptr< llvm::ARMSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::GCNSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::HexagonSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::MipsSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::PPCSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::R600Subtarget > >, llvm::StringMap< std::unique_ptr< llvm::SetTheory::Expander > >, llvm::StringMap< std::unique_ptr< llvm::SetTheory::Operator > >, llvm::StringMap< std::unique_ptr< llvm::SparcSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::TargetLibraryInfoImpl > >, llvm::StringMap< std::unique_ptr< llvm::vfs::detail::InMemoryNode > >, llvm::StringMap< std::unique_ptr< llvm::WebAssemblySubtarget > >, llvm::StringMap< std::unique_ptr< llvm::X86Subtarget > >, llvm::StringMap< std::vector< llvm::support::detail::packed_endian_specific_integral > >, llvm::StringMap< std::vector< std::string > >, llvm::StringMap< std::weak_ptr< DWOFile > >, llvm::StringMap< StringMap< Matcher > >, llvm::StringMap< SymbolTableEntry >, llvm::StringMap< SyncScope::ID >, llvm::StringMap< uint32_t >, llvm::StringMap< uint64_t >, llvm::StringMap< unsigned >, and llvm::StringMap< Value * >.
Public Member Functions | |
unsigned | getNumBuckets () const |
unsigned | getNumItems () const |
bool | empty () const |
unsigned | size () const |
void | swap (StringMapImpl &Other) |
Static Public Member Functions | |
static StringMapEntryBase * | getTombstoneVal () |
Protected Member Functions | |
StringMapImpl (unsigned itemSize) | |
StringMapImpl (StringMapImpl &&RHS) | |
StringMapImpl (unsigned InitSize, unsigned ItemSize) | |
unsigned | RehashTable (unsigned BucketNo=0) |
RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size. More... | |
unsigned | LookupBucketFor (StringRef Key) |
LookupBucketFor - Look up the bucket that the specified string should end up in. More... | |
int | FindKey (StringRef Key) const |
FindKey - Look up the bucket that contains the specified key. More... | |
void | RemoveKey (StringMapEntryBase *V) |
RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it. More... | |
StringMapEntryBase * | RemoveKey (StringRef Key) |
RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it. More... | |
void | init (unsigned Size) |
Allocate the table with the specified number of buckets and otherwise setup the map as empty. More... | |
Protected Attributes | |
StringMapEntryBase ** | TheTable = nullptr |
unsigned | NumBuckets = 0 |
unsigned | NumItems = 0 |
unsigned | NumTombstones = 0 |
unsigned | ItemSize |
StringMapImpl - This is the base class of StringMap that is shared among all of its instantiations.
Definition at line 50 of file StringMap.h.
|
inlineexplicitprotected |
Definition at line 62 of file StringMap.h.
|
inlineprotected |
Definition at line 64 of file StringMap.h.
References llvm::cl::init(), and Size.
Definition at line 34 of file StringMap.cpp.
References getMinBucketToReserveForEntries(), init(), ItemSize, NumBuckets, NumItems, NumTombstones, and TheTable.
|
inline |
Definition at line 111 of file StringMap.h.
Referenced by llvm::LTOCodeGenerator::compile(), llvm::StringToOffsetTable::Empty(), llvm::DwarfStringPool::empty(), llvm::StringPool::empty(), llvm::ValueSymbolTable::empty(), llvm::MIRParserImpl::initializeJumpTableInfo(), llvm::InternalizePass::internalizeModule(), llvm::StringMap< uint64_t >::StringMap(), and llvm::StringPool::~StringPool().
|
protected |
FindKey - Look up the bucket that contains the specified key.
If it exists in the map, return the bucket number of the key. Otherwise return -1. This does not modify the map.
Definition at line 135 of file StringMap.cpp.
References llvm::djbHash(), llvm::StringMapEntryBase::getKeyLength(), getTombstoneVal(), ItemSize, LLVM_LIKELY, NumBuckets, and TheTable.
Referenced by RemoveKey().
|
inline |
Definition at line 108 of file StringMap.h.
|
inline |
Definition at line 109 of file StringMap.h.
|
inlinestatic |
Definition at line 102 of file StringMap.h.
Referenced by FindKey(), LookupBucketFor(), llvm::StringMapIterBase< StringMapConstIterator< ValueTy >, const StringMapEntry< ValueTy > >::operator++(), RehashTable(), and RemoveKey().
|
protected |
Allocate the table with the specified number of buckets and otherwise setup the map as empty.
Definition at line 53 of file StringMap.cpp.
References assert(), NumBuckets, NumItems, NumTombstones, llvm::safe_calloc(), and TheTable.
Referenced by LookupBucketFor(), and StringMapImpl().
LookupBucketFor - Look up the bucket that the specified string should end up in.
If it already exists as a key in the map, the Item pointer for the specified bucket will be non-null. Otherwise, it will be null. In either case, the FullHashValue field of the bucket will be set to the hash value of the string.
Definition at line 78 of file StringMap.cpp.
References llvm::djbHash(), llvm::StringMapEntryBase::getKeyLength(), getTombstoneVal(), init(), ItemSize, LLVM_LIKELY, NumBuckets, and TheTable.
RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size.
Definition at line 201 of file StringMap.cpp.
References E, getTombstoneVal(), I, LLVM_UNLIKELY, NumBuckets, NumItems, NumTombstones, llvm::safe_calloc(), and TheTable.
|
protected |
RemoveKey - Remove the specified StringMapEntry from the table, but do not delete it.
This aborts if the value isn't in the table.
Definition at line 177 of file StringMap.cpp.
References assert(), llvm::StringMapEntryBase::getKeyLength(), ItemSize, and llvm::NVPTX::PTXLdStInstCode::V2.
|
protected |
RemoveKey - Remove the StringMapEntry for the specified key from the table, returning it.
If the key is not in the table, this returns null.
Definition at line 186 of file StringMap.cpp.
References assert(), FindKey(), getTombstoneVal(), NumBuckets, NumItems, NumTombstones, and TheTable.
|
inline |
Definition at line 112 of file StringMap.h.
Referenced by llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::AccelTableBase::computeBucketCount(), llvm::ComputeCrossModuleImport(), llvm::ThinLTOCodeGenerator::crossModuleImport(), dumpImportListForModule(), llvm::ThinLTOCodeGenerator::emitImports(), llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule(), llvm::LLVMContext::getMDKindID(), llvm::LLVMContext::getMDKindNames(), llvm::LLVMContextImpl::getOperandBundleTags(), llvm::LLVMContextImpl::getOrInsertBundleTag(), llvm::LLVMContextImpl::getOrInsertSyncScopeID(), llvm::pdb::DbiStreamBuilder::getSourceFileNameIndex(), llvm::LLVMContextImpl::getSyncScopeNames(), llvm::AccelTableBase::getUniqueNameCount(), llvm::ThinLTOCodeGenerator::internalize(), llvm::ThinLTOCodeGenerator::promote(), llvm::DwarfStringPool::size(), llvm::codeview::DebugStringTableSubsection::size(), llvm::ValueSymbolTable::size(), llvm::TimerGroup::TimerGroup(), and llvm::sampleprof::SampleProfileWriterBinary::writeBody().
|
inline |
Definition at line 114 of file StringMap.h.
References NumBuckets, NumItems, NumTombstones, std::swap(), and TheTable.
Referenced by llvm::StringMap< uint64_t >::operator=().
|
protected |
Definition at line 59 of file StringMap.h.
Referenced by FindKey(), LookupBucketFor(), RemoveKey(), and StringMapImpl().
|
protected |
Definition at line 56 of file StringMap.h.
Referenced by FindKey(), init(), LookupBucketFor(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), and swap().
|
protected |
Definition at line 57 of file StringMap.h.
Referenced by init(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), and swap().
|
protected |
Definition at line 58 of file StringMap.h.
Referenced by init(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), and swap().
|
protected |
Definition at line 55 of file StringMap.h.
Referenced by FindKey(), init(), LookupBucketFor(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), and swap().