LLVM  6.0.0svn
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT > Class Template Reference

#include "llvm/ADT/DenseMap.h"

Inherits llvm::DebugEpochBase.

Collaboration diagram for llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >:
Collaboration graph
[legend]

Public Types

using size_type = unsigned
 
using key_type = KeyT
 
using mapped_type = ValueT
 
using value_type = BucketT
 
using iterator = DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT >
 
using const_iterator = DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true >
 

Public Member Functions

iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
LLVM_NODISCARD bool empty () const
 
unsigned size () const
 
void reserve (size_type NumEntries)
 Grow the densemap so that it can contain at least NumEntries items before resizing again. More...
 
void clear ()
 
size_type count (const_arg_type_t< KeyT > Val) const
 Return 1 if the specified key is in the map, 0 otherwise. More...
 
iterator find (const_arg_type_t< KeyT > Val)
 
const_iterator find (const_arg_type_t< KeyT > Val) const
 
template<class LookupKeyT >
iterator find_as (const LookupKeyT &Val)
 Alternate version of find() which allows a different, and possibly less expensive, key type. More...
 
template<class LookupKeyT >
const_iterator find_as (const LookupKeyT &Val) const
 
ValueT lookup (const_arg_type_t< KeyT > Val) const
 lookup - Return the entry for the specified key, or a default constructed value if no such entry exists. More...
 
std::pair< iterator, boolinsert (const std::pair< KeyT, ValueT > &KV)
 
std::pair< iterator, boolinsert (std::pair< KeyT, ValueT > &&KV)
 
template<typename... Ts>
std::pair< iterator, booltry_emplace (KeyT &&Key, Ts &&... Args)
 
template<typename... Ts>
std::pair< iterator, booltry_emplace (const KeyT &Key, Ts &&... Args)
 
template<typename LookupKeyT >
std::pair< iterator, boolinsert_as (std::pair< KeyT, ValueT > &&KV, const LookupKeyT &Val)
 Alternate version of insert() which allows a different, and possibly less expensive, key type. More...
 
template<typename InputIt >
void insert (InputIt I, InputIt E)
 insert - Range insertion of pairs. More...
 
bool erase (const KeyT &Val)
 
void erase (iterator I)
 
value_typeFindAndConstruct (const KeyT &Key)
 
ValueToperator[] (const KeyT &Key)
 
value_typeFindAndConstruct (KeyT &&Key)
 
ValueToperator[] (KeyT &&Key)
 
bool isPointerIntoBucketsArray (const void *Ptr) const
 isPointerIntoBucketsArray - Return true if the specified pointer points somewhere into the DenseMap's array of buckets (i.e. More...
 
const void * getPointerIntoBucketsArray () const
 getPointerIntoBucketsArray() - Return an opaque pointer into the buckets array. More...
 
size_t getMemorySize () const
 Return the approximate size (in bytes) of the actual map. More...
 
- Public Member Functions inherited from llvm::DebugEpochBase
 DebugEpochBase ()
 
void incrementEpoch ()
 Calling incrementEpoch invalidates all handles pointing into the calling instance. More...
 
 ~DebugEpochBase ()
 The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically. More...
 

Protected Member Functions

 DenseMapBase ()=default
 
void destroyAll ()
 
void initEmpty ()
 
unsigned getMinBucketToReserveForEntries (unsigned NumEntries)
 Returns the number of buckets to allocate to ensure that the DenseMap can accommodate NumEntries without need to grow(). More...
 
void moveFromOldBuckets (BucketT *OldBucketsBegin, BucketT *OldBucketsEnd)
 
template<typename OtherBaseT >
void copyFrom (const DenseMapBase< OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT > &other)
 

Static Protected Member Functions

static unsigned getHashValue (const KeyT &Val)
 
template<typename LookupKeyT >
static unsigned getHashValue (const LookupKeyT &Val)
 
static const KeyT getEmptyKey ()
 
static const KeyT getTombstoneKey ()
 

Detailed Description

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
class llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >

Definition at line 56 of file DenseMap.h.

Member Typedef Documentation

◆ const_iterator

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
using llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::const_iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT, true>

Definition at line 68 of file DenseMap.h.

◆ iterator

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
using llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::iterator = DenseMapIterator<KeyT, ValueT, KeyInfoT, BucketT>

Definition at line 66 of file DenseMap.h.

◆ key_type

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
using llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::key_type = KeyT

Definition at line 62 of file DenseMap.h.

◆ mapped_type

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
using llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::mapped_type = ValueT

Definition at line 63 of file DenseMap.h.

◆ size_type

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
using llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size_type = unsigned

Definition at line 61 of file DenseMap.h.

◆ value_type

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
using llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::value_type = BucketT

Definition at line 64 of file DenseMap.h.

Constructor & Destructor Documentation

◆ DenseMapBase()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::DenseMapBase ( )
protecteddefault

Member Function Documentation

◆ begin() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin ( )
inline

◆ begin() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
const_iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::begin ( ) const
inline

Definition at line 82 of file DenseMap.h.

◆ clear()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear ( )
inline

◆ copyFrom()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<typename OtherBaseT >
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::copyFrom ( const DenseMapBase< OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT > &  other)
inlineprotected

Definition at line 387 of file DenseMap.h.

◆ count()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
size_type llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count ( const_arg_type_t< KeyT >  Val) const
inline

◆ destroyAll()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::destroyAll ( )
inlineprotected

Definition at line 326 of file DenseMap.h.

◆ empty()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
LLVM_NODISCARD bool llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty ( ) const
inline

◆ end() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end ( )
inline

Definition at line 79 of file DenseMap.h.

Referenced by llvm::BasicAAResult::alias(), llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::allUsesReplacedWith(), llvm::AssumptionCache::assumptionsFor(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::at(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::begin(), llvm::BlotMapVector< KeyT, ValueT >::blot(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::cbegin(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::cend(), llvm::ObjectSizeOffsetEvaluator::compute(), computeCacheKey(), llvm::EHStreamer::computeCallSiteTable(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::count(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::end(), llvm::FunctionLoweringInfo::StatepointSpillMap::end(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::end(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::erase(), llvm::opt::ArgList::eraseArg(), llvm::BlotMapVector< KeyT, ValueT >::find(), FindStartOfTree(), llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding(), llvm::ValueEnumerator::getAttributeGroupID(), llvm::ValueEnumerator::getAttributeListID(), llvm::MCRegisterInfo::getCodeViewRegNum(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::getExistingValueState(), llvm::GCModuleInfo::getFunctionInfo(), llvm::SlotIndexes::getIndexAfter(), llvm::SlotIndexes::getIndexBefore(), llvm::ValueEnumerator::getInstructionID(), llvm::SlotIndexes::getInstructionIndex(), getMappedReg(), llvm::cflaa::CFLGraph::getNode(), llvm::cflaa::CFLGraph::ValueInfo::getNumLevels(), llvm::ARMFunctionInfo::getOriginalCPIdx(), llvm::PassRegistry::getPassInfo(), llvm::LoopBlocksDFS::getPostorder(), llvm::SCEVUnionPredicate::getPredicatesForExpr(), getRegsUsedByPHIs(), getSCCNum(), llvm::SDDbgInfo::getSDDbgValues(), llvm::MCRegisterInfo::getSEHRegNum(), llvm::R600InstrInfo::getSrcs(), llvm::MachineRegisterInfo::getType(), llvm::ValueEnumerator::getTypeID(), getUnwindDestToken(), getUnwindDestTokenHelper(), llvm::NVPTXAsmPrinter::getVirtualRegisterName(), llvm::LoopBlocksDFS::hasPostorder(), llvm::SCEVUnionPredicate::implies(), llvm::SlotIndexes::insertMachineInstrInMaps(), llvm::FunctionLoweringInfo::InvalidatePHILiveOutRegInfo(), llvm::isAllocaPromotable(), isEqual(), isImplicitOperandIn(), isOperandKill(), llvm::Value::isSwiftError(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::lookup(), llvm::FastISel::lookUpRegForValue(), llvm::FastISel::lowerArguments(), llvm::codeview::DebugChecksumsSubsection::mapChecksumOffset(), packCmovGroup(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), llvm::ValueEnumerator::print(), llvm::GCNRPTracker::printLiveRegs(), pushDepHeight(), llvm::GVNHoist::rank(), llvm::safestack::StackColoring::removeAllMarkers(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SlotIndexes::removeMachineInstrFromMaps(), llvm::SlotIndexes::removeSingleMachineInstrFromMaps(), llvm::SlotIndexes::repairIndexesInRange(), llvm::SlotIndexes::replaceMachineInstrInMaps(), llvm::replaceSymbolicStrideSCEV(), replaceUndefValuesInPhi(), reportMismatch(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ExecutionDepsFix::runOnMachineFunction(), llvm::FastISel::selectExtractValue(), selectIncomingValueForBlock(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::size(), AllocaSlices::SliceBuilder::SliceBuilder(), SortNonLocalDepInfoCache(), llvm::thinLTOInternalizeModule(), llvm::thinLTOResolveWeakForLinkerModule(), tryToElideArgumentCopy(), and llvm::cflaa::CFLGraph::value_mappings().

◆ end() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
const_iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end ( ) const
inline

Definition at line 89 of file DenseMap.h.

◆ erase() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
bool llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase ( const KeyT &  Val)
inline

◆ erase() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase ( iterator  I)
inline

Definition at line 279 of file DenseMap.h.

◆ find() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find ( const_arg_type_t< KeyT >  Val)
inline

Definition at line 146 of file DenseMap.h.

Referenced by llvm::BasicAAResult::alias(), llvm::ValueMapCallbackVH< KeyT, ValueT, Config >::allUsesReplacedWith(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::at(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::begin(), llvm::BlotMapVector< KeyT, ValueT >::blot(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::cbegin(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::cend(), CheckForLiveRegDef(), llvm::PMTopLevelManager::collectLastUses(), llvm::ObjectSizeOffsetEvaluator::compute(), computeCacheKey(), llvm::EHStreamer::computeCallSiteTable(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::end(), llvm::opt::ArgList::eraseArg(), llvm::BlotMapVector< KeyT, ValueT >::find(), llvm::FunctionLoweringInfo::StatepointSpillMap::find(), FindStartOfTree(), llvm::ARMAsmBackendDarwin::generateCompactUnwindEncoding(), llvm::ValueEnumerator::getAttributeGroupID(), llvm::ValueEnumerator::getAttributeListID(), llvm::MCRegisterInfo::getCodeViewRegNum(), llvm::SelectionDAGBuilder::getCopyFromRegs(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::getExistingValueState(), llvm::GCModuleInfo::getFunctionInfo(), llvm::SlotIndexes::getIndexAfter(), llvm::SlotIndexes::getIndexBefore(), llvm::ValueEnumerator::getInstructionID(), llvm::SlotIndexes::getInstructionIndex(), getMappedReg(), llvm::TargetLibraryInfo::getName(), llvm::cflaa::CFLGraph::getNode(), llvm::cflaa::CFLGraph::ValueInfo::getNumLevels(), llvm::ARMFunctionInfo::getOriginalCPIdx(), llvm::PassRegistry::getPassInfo(), llvm::LoopBlocksDFS::getPostorder(), llvm::SCEVUnionPredicate::getPredicatesForExpr(), getRegsUsedByPHIs(), getSCCNum(), llvm::SDDbgInfo::getSDDbgValues(), llvm::MCRegisterInfo::getSEHRegNum(), llvm::R600InstrInfo::getSrcs(), llvm::MachineRegisterInfo::getType(), llvm::ValueEnumerator::getTypeID(), getUnderlyingArgReg(), getUnwindDestToken(), getUnwindDestTokenHelper(), llvm::NVPTXAsmPrinter::getVirtualRegisterName(), llvm::LoopBlocksDFS::hasPostorder(), hasSameExtUse(), llvm::SCEVUnionPredicate::implies(), INITIALIZE_PASS(), llvm::SlotIndexes::insertMachineInstrInMaps(), llvm::FunctionLoweringInfo::InvalidatePHILiveOutRegInfo(), llvm::isAllocaPromotable(), isEqual(), isImplicitOperandIn(), isOperandKill(), llvm::FastISel::lookUpRegForValue(), llvm::FastISel::lowerArguments(), llvm::codeview::DebugChecksumsSubsection::mapChecksumOffset(), packCmovGroup(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), llvm::ValueEnumerator::print(), llvm::GCNRPTracker::printLiveRegs(), promoteSingleBlockAlloca(), pushDepHeight(), llvm::GVNHoist::rank(), readWideAPInt(), llvm::safestack::StackColoring::removeAllMarkers(), RemoveFromReverseMap(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SlotIndexes::removeMachineInstrFromMaps(), llvm::SlotIndexes::removeSingleMachineInstrFromMaps(), llvm::SlotIndexes::repairIndexesInRange(), llvm::SlotIndexes::replaceMachineInstrInMaps(), llvm::scc_iterator< GraphT, GT >::ReplaceNode(), llvm::replaceSymbolicStrideSCEV(), replaceUndefValuesInPhi(), reportMismatch(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ExecutionDepsFix::runOnMachineFunction(), llvm::FastISel::selectExtractValue(), selectIncomingValueForBlock(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::InOutEdgeView< isConst, isOut >::size(), AllocaSlices::SliceBuilder::SliceBuilder(), SortNonLocalDepInfoCache(), llvm::TailDuplicator::tailDuplicateAndUpdate(), llvm::thinLTOInternalizeModule(), llvm::thinLTOResolveWeakForLinkerModule(), tryToElideArgumentCopy(), and UpdateCPSRUse().

◆ find() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
const_iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find ( const_arg_type_t< KeyT >  Val) const
inline

Definition at line 152 of file DenseMap.h.

◆ find_as() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<class LookupKeyT >
iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find_as ( const LookupKeyT &  Val)
inline

Alternate version of find() which allows a different, and possibly less expensive, key type.

The DenseMapInfo is responsible for supplying methods getHashValue(LookupKeyT) and isEqual(LookupKeyT, KeyT) for each key type used.

Definition at line 165 of file DenseMap.h.

Referenced by llvm::AssumptionCache::assumptionsFor(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::count(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::erase(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::find(), and llvm::ValueMap< GlobalValue *, uint64_t, Config >::lookup().

◆ find_as() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<class LookupKeyT >
const_iterator llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find_as ( const LookupKeyT &  Val) const
inline

Definition at line 172 of file DenseMap.h.

◆ FindAndConstruct() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
value_type& llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::FindAndConstruct ( const KeyT &  Key)
inline

◆ FindAndConstruct() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
value_type& llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::FindAndConstruct ( KeyT &&  Key)
inline

Definition at line 299 of file DenseMap.h.

◆ getEmptyKey()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
static const KeyT llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getEmptyKey ( )
inlinestaticprotected

Definition at line 418 of file DenseMap.h.

◆ getHashValue() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
static unsigned llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getHashValue ( const KeyT &  Val)
inlinestaticprotected

Definition at line 409 of file DenseMap.h.

◆ getHashValue() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<typename LookupKeyT >
static unsigned llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getHashValue ( const LookupKeyT &  Val)
inlinestaticprotected

Definition at line 414 of file DenseMap.h.

◆ getMemorySize()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
size_t llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getMemorySize ( ) const
inline

Return the approximate size (in bytes) of the actual map.

This is just the raw memory used by DenseMap. If entries are pointers to objects, the size of the referenced objects are not included.

Definition at line 637 of file DenseMap.h.

◆ getMinBucketToReserveForEntries()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
unsigned llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getMinBucketToReserveForEntries ( unsigned  NumEntries)
inlineprotected

Returns the number of buckets to allocate to ensure that the DenseMap can accommodate NumEntries without need to grow().

Definition at line 352 of file DenseMap.h.

◆ getPointerIntoBucketsArray()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
const void* llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getPointerIntoBucketsArray ( ) const
inline

getPointerIntoBucketsArray() - Return an opaque pointer into the buckets array.

In conjunction with the previous method, this can be used to determine whether an insertion caused the DenseMap to reallocate.

Definition at line 321 of file DenseMap.h.

Referenced by llvm::ValueMap< GlobalValue *, uint64_t, Config >::getPointerIntoBucketsArray(), and llvm::Value::isSwiftError().

◆ getTombstoneKey()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
static const KeyT llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::getTombstoneKey ( )
inlinestaticprotected

Definition at line 424 of file DenseMap.h.

◆ initEmpty()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::initEmpty ( )
inlineprotected

Definition at line 339 of file DenseMap.h.

◆ insert() [1/3]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
std::pair<iterator, bool> llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert ( const std::pair< KeyT, ValueT > &  KV)
inline

Definition at line 191 of file DenseMap.h.

Referenced by llvm::opt::ArgList::append(), llvm::ARMBaseInstrInfo::ARMBaseInstrInfo(), llvm::LiveRangeCalc::calculateValues(), llvm::createStoreClusterDAGMutation(), llvm::DWARFContext::defaultErrorHandler(), llvm::SplitEditor::dump(), findArgumentCopyElisionCandidates(), gatherIncomingValuesToPhi(), llvm::AArch64InstrInfo::genAlternativeCodeSequence(), llvm::FunctionLoweringInfo::getCatchPadExceptionPointerVReg(), getLocalId(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), getOpenCLAlignment(), getRegsUsedByPHIs(), hasTiedDef(), llvm::HexagonEvaluator::HexagonEvaluator(), INITIALIZE_PASS(), llvm::MIRParserImpl::initializeConstantPool(), llvm::MIRParserImpl::initializeFrameInfo(), llvm::MIRParserImpl::initializeJumpTableInfo(), llvm::BlotMapVector< KeyT, ValueT >::insert(), llvm::ValueMap< GlobalValue *, uint64_t, Config >::insert(), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::insert(), llvm::SlotIndexes::insertMachineInstrInMaps(), isLoadConditional(), MergeAliasResults(), llvm::BlotMapVector< KeyT, ValueT >::operator[](), llvm::xray::Graph< VertexAttribute, EdgeAttribute, VI >::operator[](), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), llvm::ValueEnumerator::print(), pushDepHeight(), llvm::TargetInstrInfo::reassociateOps(), llvm::ARMFunctionInfo::recordCPEClone(), llvm::PassRegistry::registerPass(), regOverlapsSet(), llvm::objcarc::ProvenanceAnalysis::related(), llvm::MemoryDependenceResults::removeInstruction(), llvm::SlotIndexes::removeSingleMachineInstrFromMaps(), llvm::SlotIndexes::replaceMachineInstrInMaps(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::ExecutionDepsFix::runOnMachineFunction(), llvm::SlotIndexes::runOnMachineFunction(), selectIncomingValueForBlock(), shouldConvert(), AllocaSlices::SliceBuilder::SliceBuilder(), SortNonLocalDepInfoCache(), unswitchTrivialSwitch(), llvm::LoopBlocksTraversal::visitPreorder(), llvm::MemorySSA::~MemorySSA(), and llvm::lto::ThinBackendProc::~ThinBackendProc().

◆ insert() [2/3]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
std::pair<iterator, bool> llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert ( std::pair< KeyT, ValueT > &&  KV)
inline

Definition at line 198 of file DenseMap.h.

◆ insert() [3/3]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<typename InputIt >
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert ( InputIt  I,
InputIt  E 
)
inline

insert - Range insertion of pairs.

Definition at line 263 of file DenseMap.h.

◆ insert_as()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<typename LookupKeyT >
std::pair<iterator, bool> llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert_as ( std::pair< KeyT, ValueT > &&  KV,
const LookupKeyT &  Val 
)
inline

Alternate version of insert() which allows a different, and possibly less expensive, key type.

The DenseMapInfo is responsible for supplying methods getHashValue(LookupKeyT) and isEqual(LookupKeyT, KeyT) for each key type used.

Definition at line 245 of file DenseMap.h.

◆ isPointerIntoBucketsArray()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
bool llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::isPointerIntoBucketsArray ( const void *  Ptr) const
inline

isPointerIntoBucketsArray - Return true if the specified pointer points somewhere into the DenseMap's array of buckets (i.e.

either to a key or value in the DenseMap).

Definition at line 314 of file DenseMap.h.

Referenced by llvm::ValueMap< GlobalValue *, uint64_t, Config >::isPointerIntoBucketsArray(), llvm::Value::isSwiftError(), and llvm::ValueHandleBase::RemoveFromUseList().

◆ lookup()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
ValueT llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup ( const_arg_type_t< KeyT >  Val) const
inline

◆ moveFromOldBuckets()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::moveFromOldBuckets ( BucketT *  OldBucketsBegin,
BucketT *  OldBucketsEnd 
)
inlineprotected

Definition at line 361 of file DenseMap.h.

◆ operator[]() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
ValueT& llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::operator[] ( const KeyT &  Key)
inline

Definition at line 295 of file DenseMap.h.

◆ operator[]() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
ValueT& llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::operator[] ( KeyT &&  Key)
inline

Definition at line 307 of file DenseMap.h.

◆ reserve()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
void llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::reserve ( size_type  NumEntries)
inline

Grow the densemap so that it can contain at least NumEntries items before resizing again.

Definition at line 100 of file DenseMap.h.

Referenced by llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::LegalizeUpdates(), llvm::LoopBlocksDFS::LoopBlocksDFS(), and llvm::WholeProgramDevirtPass::run().

◆ size()

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
unsigned llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size ( ) const
inline

◆ try_emplace() [1/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<typename... Ts>
std::pair<iterator, bool> llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace ( KeyT &&  Key,
Ts &&...  Args 
)
inline

Definition at line 206 of file DenseMap.h.

◆ try_emplace() [2/2]

template<typename DerivedT, typename KeyT, typename ValueT, typename KeyInfoT, typename BucketT>
template<typename... Ts>
std::pair<iterator, bool> llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace ( const KeyT &  Key,
Ts &&...  Args 
)
inline

Definition at line 225 of file DenseMap.h.


The documentation for this class was generated from the following file: