Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Public Member Functions |Friends |List of all members
llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT > Class Template Reference

#include "llvm/ADT/DenseMap.h"

Inheritsllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >.

Public Member Functions

 DenseMap (unsigned InitialReserve=0)
 Create aDenseMap with an optionalInitialReserve that guarantee that this number of elements can be inserted in the map withoutgrow()
 
 DenseMap (constDenseMap &other)
 
 DenseMap (DenseMap &&other)
 
template<typename InputIt >
 DenseMap (const InputIt &I,const InputIt &E)
 
 DenseMap (std::initializer_list< typenameBaseT::value_type > Vals)
 
 ~DenseMap ()
 
void swap (DenseMap &RHS)
 
DenseMapoperator= (constDenseMap &other)
 
DenseMapoperator= (DenseMap &&other)
 
void copyFrom (constDenseMap &other)
 
void init (unsigned InitNumEntries)
 
void grow (unsigned AtLeast)
 
void shrink_and_clear ()
 
- Public Member Functions inherited fromllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >
iterator begin ()
 
iterator end ()
 
const_iterator begin ()const
 
const_iterator end ()const
 
bool empty ()const
 
unsigned size ()const
 
void reserve (size_type NumEntries)
 Grow the densemap so that it can contain at leastNumEntries items before resizing again.
 
void clear ()
 
bool contains (const_arg_type_t<KeyT > Val)const
 Return true if the specified key is in the map, false otherwise.
 
size_type count (const_arg_type_t<KeyT > Val)const
 Return 1 if the specified key is in the map, 0 otherwise.
 
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 offind() which allows a different, and possibly less expensive, key type.
 
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.
 
constValueTat (const_arg_type_t<KeyT > Val)const
 at - Return the entry for the specified key, or abort if no such entry exists.
 
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 (constKeyT &Key, Ts &&...Args)
 
template<typename LookupKeyT >
std::pair<iterator,boolinsert_as (std::pair<KeyT,ValueT > &&KV,const LookupKeyT &Val)
 Alternate version ofinsert() which allows a different, and possibly less expensive, key type.
 
template<typename InputIt >
void insert (InputItI, InputItE)
 insert - Range insertion of pairs.
 
template<typename V >
std::pair<iterator,boolinsert_or_assign (constKeyT &Key, V &&Val)
 
template<typename V >
std::pair<iterator,boolinsert_or_assign (KeyT &&Key, V &&Val)
 
bool erase (constKeyT &Val)
 
void erase (iteratorI)
 
ValueToperator[] (constKeyT &Key)
 
ValueToperator[] (KeyT &&Key)
 
bool isPointerIntoBucketsArray (const void *Ptr)const
 isPointerIntoBucketsArray - Return true if the specified pointer points somewhere into theDenseMap's array of buckets (i.e.
 
const void * getPointerIntoBucketsArray ()const
 getPointerIntoBucketsArray() - Return an opaque pointer into the buckets array.
 
size_t getMemorySize ()const
 Return the approximate size (in bytes) of the actual map.
 
- Public Member Functions inherited fromllvm::DebugEpochBase
void incrementEpoch ()
 

Friends

class DenseMapBase< DenseMap, KeyT, ValueT, KeyInfoT, BucketT >
 

Additional Inherited Members

- Public Types inherited fromllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >
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 >
 
- Protected Member Functions inherited fromllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >
 DenseMapBase ()=default
 
void destroyAll ()
 
void initEmpty ()
 
unsigned getMinBucketToReserveForEntries (unsigned NumEntries)
 Returns the number of buckets to allocate to ensure that theDenseMap can accommodateNumEntries without need to grow().
 
void moveFromOldBuckets (BucketT *OldBucketsBegin, BucketT *OldBucketsEnd)
 
template<typename OtherBaseT >
void copyFrom (constDenseMapBase< OtherBaseT,KeyT,ValueT, KeyInfoT, BucketT > &other)
 
- Static Protected Member Functions inherited fromllvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >
staticunsigned getHashValue (constKeyT &Val)
 
template<typename LookupKeyT >
staticunsigned getHashValue (const LookupKeyT &Val)
 
staticconstKeyT getEmptyKey ()
 
staticconstKeyT getTombstoneKey ()
 

Detailed Description

template<typenameKeyT, typenameValueT, typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
class llvm::DenseMap< KeyT, ValueT, KeyInfoT, BucketT >

Definition at line726 of fileDenseMap.h.

Constructor & Destructor Documentation

◆ DenseMap()[1/5]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::DenseMap(unsigned InitialReserve =0)
inlineexplicit

Create aDenseMap with an optionalInitialReserve that guarantee that this number of elements can be inserted in the map withoutgrow()

Definition at line742 of fileDenseMap.h.

◆ DenseMap()[2/5]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::DenseMap(constDenseMap<KeyT,ValueT, KeyInfoT, BucketT > & other)
inline

Definition at line744 of fileDenseMap.h.

◆ DenseMap()[3/5]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::DenseMap(DenseMap<KeyT,ValueT, KeyInfoT, BucketT > && other)
inline

Definition at line749 of fileDenseMap.h.

◆ DenseMap()[4/5]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
template<typename InputIt >
llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::DenseMap(const InputIt & I,
const InputIt & E 
)
inline

Definition at line754 of fileDenseMap.h.

ReferencesE, andI.

◆ DenseMap()[5/5]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::DenseMap(std::initializer_list< typenameBaseT::value_typeVals)
inline

Definition at line759 of fileDenseMap.h.

◆ ~DenseMap()

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::~DenseMap()
inline

Definition at line764 of fileDenseMap.h.

Referencesllvm::deallocate_buffer().

Member Function Documentation

◆ copyFrom()

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
voidllvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::copyFrom(constDenseMap<KeyT,ValueT, KeyInfoT, BucketT > & other)
inline

Definition at line792 of fileDenseMap.h.

Referencesllvm::deallocate_buffer().

◆ grow()

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
voidllvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::grow(unsigned AtLeast)
inline

Definition at line813 of fileDenseMap.h.

Referencesassert(),llvm::deallocate_buffer(), andllvm::NextPowerOf2().

◆ init()

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
voidllvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::init(unsigned InitNumEntries)
inline

Definition at line803 of fileDenseMap.h.

◆ operator=()[1/2]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
DenseMap &llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::operator=(constDenseMap<KeyT,ValueT, KeyInfoT, BucketT > & other)
inline

Definition at line778 of fileDenseMap.h.

◆ operator=()[2/2]

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
DenseMap &llvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::operator=(DenseMap<KeyT,ValueT, KeyInfoT, BucketT > && other)
inline

Definition at line784 of fileDenseMap.h.

Referencesllvm::deallocate_buffer().

◆ shrink_and_clear()

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
voidllvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::shrink_and_clear()
inline

Definition at line832 of fileDenseMap.h.

Referencesllvm::deallocate_buffer(), andllvm::Log2_32_Ceil().

Referenced byllvm::dwarf_linker::parallel::CompileUnit::cleanupDataAfterClonning(), andllvm::AssumptionCacheTracker::releaseMemory().

◆ swap()

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
voidllvm::DenseMap<KeyT,ValueT, KeyInfoT, BucketT >::swap(DenseMap<KeyT,ValueT, KeyInfoT, BucketT > & RHS)
inline

Definition at line769 of fileDenseMap.h.

ReferencesRHS, andstd::swap().

Referenced bycheckNumberingAndReplaceCommutative().

Friends And Related Function Documentation

◆ DenseMapBase< DenseMap, KeyT, ValueT, KeyInfoT, BucketT >

template<typenameKeyT , typenameValueT , typename KeyInfoT = DenseMapInfo<KeyT>, typename BucketT = llvm::detail::DenseMapPair<KeyT, ValueT>>
friend classDenseMapBase<DenseMap,KeyT,ValueT, KeyInfoT, BucketT >
friend

Definition at line686 of fileDenseMap.h.


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

Generated on Sun Jul 20 2025 15:56:10 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp