|
LLVM
4.0.0
|
StringMapImpl - This is the base class of StringMap that is shared among all of its instantiations. More...
#include <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 llvm::RegisterBank * >, llvm::StringMap< const llvm::TargetRegisterClass * >, llvm::StringMap< const PassInfo * >, llvm::StringMap< DataArray, BumpPtrAllocator & >, llvm::StringMap< GlobalResolution >, llvm::StringMap< GVSummaryMapTy >, llvm::StringMap< JITTargetAddress >, llvm::StringMap< LineData >, llvm::StringMap< llvm::cl::Option * >, llvm::StringMap< llvm::codeview::TypeIndex >, llvm::StringMap< llvm::ConstantDataSequential * >, llvm::StringMap< llvm::DwarfStringPoolEntry, llvm::BumpPtrAllocatorImpl & >, llvm::StringMap< llvm::GCStrategy * >, llvm::StringMap< llvm::GlobalValue::LinkageTypes >, llvm::StringMap< llvm::JITEvaluatedSymbol >, 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::StringMap< llvm::SpecialCaseList::Entry > >, llvm::StringMap< llvm::StringMap< std::string > >, llvm::StringMap< llvm::StructType * >, llvm::StringMap< llvm::Type * >, llvm::StringMap< MCSymbol *, BumpPtrAllocator & >, llvm::StringMap< NameAndAttributes >, llvm::StringMap< PooledString >, 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< HNode > >, llvm::StringMap< std::unique_ptr< llvm::AArch64Subtarget > >, llvm::StringMap< std::unique_ptr< llvm::ARMSubtarget > >, 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::SISubtarget > >, llvm::StringMap< std::unique_ptr< llvm::SparcSubtarget > >, llvm::StringMap< std::unique_ptr< llvm::TargetLibraryInfoImpl > >, llvm::StringMap< std::unique_ptr< llvm::WebAssemblySubtarget > >, llvm::StringMap< std::unique_ptr< llvm::X86Subtarget > >, llvm::StringMap< std::unique_ptr< ModuleInfo > >, llvm::StringMap< std::unique_ptr< yaml::llvm::MachineFunction > >, llvm::StringMap< SymbolTableEntry >, 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 |
| unsigned | NumBuckets |
| unsigned | NumItems |
| unsigned | NumTombstones |
| 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 66 of file StringMap.h.
Definition at line 33 of file StringMap.cpp.
References getMinBucketToReserveForEntries(), init(), ItemSize, NumBuckets, NumItems, NumTombstones, and TheTable.
|
inline |
Definition at line 113 of file StringMap.h.
References NumItems.
Referenced by llvm::StringMap< uint64_t >::clear(), llvm::StringPool::empty(), llvm::ValueSymbolTable::empty(), llvm::InternalizePass::internalizeModule(), llvm::StringMap< uint64_t >::StringMap(), 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 130 of file StringMap.cpp.
References llvm::StringMapEntryBase::getKeyLength(), getTombstoneVal(), llvm::HashString(), ItemSize, LLVM_LIKELY, NumBuckets, and TheTable.
Referenced by llvm::StringMap< uint64_t >::find(), and RemoveKey().
|
inline |
Definition at line 110 of file StringMap.h.
References NumBuckets.
|
inline |
Definition at line 111 of file StringMap.h.
References NumItems.
|
inlinestatic |
Definition at line 104 of file StringMap.h.
Referenced by llvm::StringMap< uint64_t >::clear(), FindKey(), llvm::StringMap< uint64_t >::insert(), LookupBucketFor(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), llvm::StringMap< uint64_t >::try_emplace(), and llvm::StringMap< uint64_t >::~StringMap().
|
protected |
Allocate the table with the specified number of buckets and otherwise setup the map as empty.
Definition at line 52 of file StringMap.cpp.
References assert(), NumBuckets, NumItems, NumTombstones, and TheTable.
Referenced by LookupBucketFor(), llvm::StringMap< uint64_t >::StringMap(), 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 73 of file StringMap.cpp.
References llvm::StringMapEntryBase::getKeyLength(), getTombstoneVal(), llvm::HashString(), init(), ItemSize, LLVM_LIKELY, NumBuckets, and TheTable.
Referenced by llvm::StringMap< uint64_t >::insert(), and llvm::StringMap< uint64_t >::try_emplace().
RehashTable - Grow the table, redistributing values into the buckets with the appropriate mod-of-hashtable-size.
Definition at line 196 of file StringMap.cpp.
References E, getTombstoneVal(), I, LLVM_UNLIKELY, NumBuckets, NumItems, NumTombstones, and TheTable.
Referenced by llvm::StringMap< uint64_t >::insert(), and llvm::StringMap< uint64_t >::try_emplace().
|
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 172 of file StringMap.cpp.
References assert(), llvm::StringMapEntryBase::getKeyLength(), ItemSize, and llvm::NVPTX::PTXLdStInstCode::V2.
Referenced by llvm::StringMap< uint64_t >::remove().
|
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 181 of file StringMap.cpp.
References assert(), FindKey(), getTombstoneVal(), NumBuckets, NumItems, NumTombstones, and TheTable.
|
inline |
Definition at line 114 of file StringMap.h.
References NumItems.
Referenced by llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::pdb::NameMapBuilder::calculateSerializedLength(), llvm::pdb::NameMapBuilder::commit(), llvm::ComputeCrossModuleImport(), llvm::ComputeCrossModuleImportForModule(), llvm::orc::LocalIndirectStubsManager< TargetT >::createStubs(), llvm::orc::remote::OrcRemoteTargetClient< ChannelT >::RCIndirectStubsManager::createStubs(), llvm::ThinLTOCodeGenerator::crossModuleImport(), llvm::ThinLTOCodeGenerator::emitImports(), llvm::DwarfAccelTable::FinalizeTable(), llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule(), llvm::LLVMContext::getMDKindID(), llvm::LLVMContext::getMDKindNames(), llvm::LLVMContextImpl::getOperandBundleTags(), llvm::LLVMContextImpl::getOrInsertBundleTag(), llvm::sampleprof::SampleRecord::hasCalls(), llvm::ThinLTOCodeGenerator::internalize(), llvm::ThinLTOCodeGenerator::promote(), llvm::ValueSymbolTable::size(), and llvm::sampleprof::SampleProfileWriterBinary::writeBody().
|
inline |
Definition at line 116 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 llvm::StringMap< uint64_t >::begin(), llvm::StringMap< uint64_t >::clear(), llvm::StringMap< uint64_t >::end(), FindKey(), getNumBuckets(), init(), llvm::StringMap< uint64_t >::insert(), LookupBucketFor(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), swap(), llvm::StringMap< uint64_t >::try_emplace(), and llvm::StringMap< uint64_t >::~StringMap().
|
protected |
Definition at line 57 of file StringMap.h.
Referenced by llvm::StringMap< uint64_t >::clear(), empty(), getNumItems(), init(), llvm::StringMap< uint64_t >::insert(), RehashTable(), RemoveKey(), size(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), swap(), and llvm::StringMap< uint64_t >::try_emplace().
|
protected |
Definition at line 58 of file StringMap.h.
Referenced by llvm::StringMap< uint64_t >::clear(), init(), llvm::StringMap< uint64_t >::insert(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), swap(), and llvm::StringMap< uint64_t >::try_emplace().
|
protected |
Definition at line 55 of file StringMap.h.
Referenced by llvm::StringMap< uint64_t >::begin(), llvm::StringMap< uint64_t >::clear(), llvm::StringMap< uint64_t >::end(), llvm::StringMap< uint64_t >::find(), FindKey(), init(), llvm::StringMap< uint64_t >::insert(), LookupBucketFor(), RehashTable(), RemoveKey(), llvm::StringMap< uint64_t >::StringMap(), StringMapImpl(), swap(), llvm::StringMap< uint64_t >::try_emplace(), and llvm::StringMap< uint64_t >::~StringMap().
1.8.6