class DenseMapBase

Declaration

template <typename DerivedT,
          typename KeyT,
          typename ValueT,
          typename KeyInfoT,
          typename BucketT>
class DenseMapBase : public DebugEpochBase { /* full declaration omitted */ };

Declared at: llvm/include/llvm/ADT/DenseMap.h:61

Inherits from: DebugEpochBase

Templates

DerivedT
KeyT
ValueT
KeyInfoT
BucketT

Method Overview

  • protected DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>()
  • public llvm::DenseMapBase::value_type & FindAndConstruct(KeyT && Key)
  • public llvm::DenseMapBase::value_type & FindAndConstruct(const KeyT & Key)
  • private template <typename KeyArg, typename... ValueArgs>BucketT * InsertIntoBucket(BucketT * TheBucket, KeyArg && Key, ValueArgs &&... Values)
  • private template <typename LookupKeyT>BucketT * InsertIntoBucketImpl(const KeyT & Key, const LookupKeyT & Lookup, BucketT * TheBucket)
  • private template <typename LookupKeyT>BucketT * InsertIntoBucketWithLookup(BucketT * TheBucket, KeyT && Key, ValueT && Value, LookupKeyT & Lookup)
  • private template <typename LookupKeyT>bool LookupBucketFor(const LookupKeyT & Val, const BucketT *& FoundBucket) const
  • private template <typename LookupKeyT>bool LookupBucketFor(const LookupKeyT & Val, BucketT *& FoundBucket)
  • public inline llvm::DenseMapBase::const_iterator begin() const
  • public inline llvm::DenseMapBase::iterator begin()
  • public void clear()
  • protected template <typename OtherBaseT>void copyFrom(const DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT> & other)
  • public llvm::DenseMapBase::size_type count(const_arg_type_t<KeyT> Val) const
  • private void decrementNumEntries()
  • private void decrementNumTombstones()
  • protected void destroyAll()
  • public bool empty() const
  • public inline llvm::DenseMapBase::iterator end()
  • public inline llvm::DenseMapBase::const_iterator end() const
  • public void erase(llvm::DenseMapBase::iterator I)
  • public bool erase(const KeyT & Val)
  • public llvm::DenseMapBase::iterator find(const_arg_type_t<KeyT> Val)
  • public llvm::DenseMapBase::const_iterator find(const_arg_type_t<KeyT> Val) const
  • public template <class LookupKeyT>llvm::DenseMapBase::const_iterator find_as(const LookupKeyT & Val) const
  • public template <class LookupKeyT>llvm::DenseMapBase::iterator find_as(const LookupKeyT & Val)
  • private const BucketT * getBuckets() const
  • private BucketT * getBuckets()
  • private const BucketT * getBucketsEnd() const
  • private BucketT * getBucketsEnd()
  • protected static const KeyT getEmptyKey()
  • protected template <typename LookupKeyT>static unsigned int getHashValue(const LookupKeyT & Val)
  • protected static unsigned int getHashValue(const KeyT & Val)
  • public size_t getMemorySize() const
  • protected unsigned int getMinBucketToReserveForEntries(unsigned int NumEntries)
  • private unsigned int getNumBuckets() const
  • private unsigned int getNumEntries() const
  • private unsigned int getNumTombstones() const
  • public const void * getPointerIntoBucketsArray() const
  • protected static const KeyT getTombstoneKey()
  • private void grow(unsigned int AtLeast)
  • private void incrementNumEntries()
  • private void incrementNumTombstones()
  • protected void initEmpty()
  • public std::pair<iterator, bool> insert(const std::pair<KeyT, ValueT> & KV)
  • public std::pair<iterator, bool> insert(std::pair<KeyT, ValueT> && KV)
  • public template <typename InputIt>void insert(InputIt I, InputIt E)
  • public template <typename LookupKeyT>std::pair<iterator, bool> insert_as(std::pair<KeyT, ValueT> && KV, const LookupKeyT & Val)
  • public bool isPointerIntoBucketsArray(const void * Ptr) const
  • public ValueT lookup(const_arg_type_t<KeyT> Val) const
  • private llvm::DenseMapBase::const_iterator makeConstIterator(const BucketT * P, const BucketT * E, const llvm::DebugEpochBase & Epoch, const bool NoAdvance = false) const
  • private llvm::DenseMapBase::iterator makeIterator(BucketT * P, BucketT * E, llvm::DebugEpochBase & Epoch, bool NoAdvance = false)
  • protected void moveFromOldBuckets(BucketT * OldBucketsBegin, BucketT * OldBucketsEnd)
  • public void reserve(llvm::DenseMapBase::size_type NumEntries)
  • private void setNumEntries(unsigned int Num)
  • private void setNumTombstones(unsigned int Num)
  • private void shrink_and_clear()
  • public unsigned int size() const
  • public template <typename... Ts>std::pair<iterator, bool> try_emplace(const KeyT & Key, Ts &&... Args)
  • public template <typename... Ts>std::pair<iterator, bool> try_emplace(KeyT && Key, Ts &&... Args)

Inherited from DebugEpochBase:

Methods

DenseMapBase<DerivedT,
             KeyT,
             ValueT,
             KeyInfoT,
             BucketT>()

Declared at: llvm/include/llvm/ADT/DenseMap.h:360

llvm::DenseMapBase::value_type& FindAndConstruct(
    KeyT&& Key)

Declared at: llvm/include/llvm/ADT/DenseMap.h:335

Parameters

KeyT&& Key

llvm::DenseMapBase::value_type& FindAndConstruct(
    const KeyT& Key)

Declared at: llvm/include/llvm/ADT/DenseMap.h:323

Parameters

const KeyT& Key

template <typename KeyArg, typename... ValueArgs>
BucketT* InsertIntoBucket(BucketT* TheBucket,
                          KeyArg&& Key,
                          ValueArgs&&... Values)

Declared at: llvm/include/llvm/ADT/DenseMap.h:547

Templates

KeyArg
ValueArgs

Parameters

BucketT* TheBucket
KeyArg&& Key
ValueArgs&&... Values

template <typename LookupKeyT>
BucketT* InsertIntoBucketImpl(
    const KeyT& Key,
    const LookupKeyT& Lookup,
    BucketT* TheBucket)

Declared at: llvm/include/llvm/ADT/DenseMap.h:567

Templates

LookupKeyT

Parameters

const KeyT& Key
const LookupKeyT& Lookup
BucketT* TheBucket

template <typename LookupKeyT>
BucketT* InsertIntoBucketWithLookup(
    BucketT* TheBucket,
    KeyT&& Key,
    ValueT&& Value,
    LookupKeyT& Lookup)

Declared at: llvm/include/llvm/ADT/DenseMap.h:557

Templates

LookupKeyT

Parameters

BucketT* TheBucket
KeyT&& Key
ValueT&& Value
LookupKeyT& Lookup

template <typename LookupKeyT>
bool LookupBucketFor(
    const LookupKeyT& Val,
    const BucketT*& FoundBucket) const

Description

LookupBucketFor - Lookup the appropriate bucket for Val, returning it in FoundBucket. If the bucket contains the key and a value, this returns true, otherwise it returns a bucket with an empty marker or tombstone and returns false.

Declared at: llvm/include/llvm/ADT/DenseMap.h:610

Templates

LookupKeyT

Parameters

const LookupKeyT& Val
const BucketT*& FoundBucket

template <typename LookupKeyT>
bool LookupBucketFor(const LookupKeyT& Val,
                     BucketT*& FoundBucket)

Declared at: llvm/include/llvm/ADT/DenseMap.h:661

Templates

LookupKeyT

Parameters

const LookupKeyT& Val
BucketT*& FoundBucket

inline llvm::DenseMapBase::const_iterator begin()
    const

Declared at: llvm/include/llvm/ADT/DenseMap.h:87

inline llvm::DenseMapBase::iterator begin()

Declared at: llvm/include/llvm/ADT/DenseMap.h:75

void clear()

Declared at: llvm/include/llvm/ADT/DenseMap.h:112

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

Declared at: llvm/include/llvm/ADT/DenseMap.h:423

Templates

OtherBaseT

Parameters

const DenseMapBase<OtherBaseT, KeyT, ValueT, KeyInfoT, BucketT>& other

llvm::DenseMapBase::size_type count(
    const_arg_type_t<KeyT> Val) const

Description

Return 1 if the specified key is in the map, 0 otherwise.

Declared at: llvm/include/llvm/ADT/DenseMap.h:147

Parameters

const_arg_type_t<KeyT> Val

void decrementNumEntries()

Declared at: llvm/include/llvm/ADT/DenseMap.h:498

void decrementNumTombstones()

Declared at: llvm/include/llvm/ADT/DenseMap.h:514

void destroyAll()

Declared at: llvm/include/llvm/ADT/DenseMap.h:362

bool empty() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:98

inline llvm::DenseMapBase::iterator end()

Declared at: llvm/include/llvm/ADT/DenseMap.h:84

inline llvm::DenseMapBase::const_iterator end()
    const

Declared at: llvm/include/llvm/ADT/DenseMap.h:94

void erase(llvm::DenseMapBase::iterator I)

Declared at: llvm/include/llvm/ADT/DenseMap.h:315

Parameters

llvm::DenseMapBase::iterator I

bool erase(const KeyT& Val)

Declared at: llvm/include/llvm/ADT/DenseMap.h:304

Parameters

const KeyT& Val

llvm::DenseMapBase::iterator find(
    const_arg_type_t<KeyT> Val)

Declared at: llvm/include/llvm/ADT/DenseMap.h:152

Parameters

const_arg_type_t<KeyT> Val

llvm::DenseMapBase::const_iterator find(
    const_arg_type_t<KeyT> Val) const

Declared at: llvm/include/llvm/ADT/DenseMap.h:161

Parameters

const_arg_type_t<KeyT> Val

template <class LookupKeyT>
llvm::DenseMapBase::const_iterator find_as(
    const LookupKeyT& Val) const

Declared at: llvm/include/llvm/ADT/DenseMap.h:187

Templates

LookupKeyT

Parameters

const LookupKeyT& Val

template <class LookupKeyT>
llvm::DenseMapBase::iterator find_as(
    const LookupKeyT& Val)

Description

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.

Declared at: llvm/include/llvm/ADT/DenseMap.h:177

Templates

LookupKeyT

Parameters

const LookupKeyT& Val

const BucketT* getBuckets() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:518

BucketT* getBuckets()

Declared at: llvm/include/llvm/ADT/DenseMap.h:522

const BucketT* getBucketsEnd() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:534

BucketT* getBucketsEnd()

Declared at: llvm/include/llvm/ADT/DenseMap.h:530

static const KeyT getEmptyKey()

Declared at: llvm/include/llvm/ADT/DenseMap.h:455

template <typename LookupKeyT>
static unsigned int getHashValue(
    const LookupKeyT& Val)

Declared at: llvm/include/llvm/ADT/DenseMap.h:451

Templates

LookupKeyT

Parameters

const LookupKeyT& Val

static unsigned int getHashValue(const KeyT& Val)

Declared at: llvm/include/llvm/ADT/DenseMap.h:446

Parameters

const KeyT& Val

size_t getMemorySize() const

Description

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.

Declared at: llvm/include/llvm/ADT/DenseMap.h:674

unsigned int getMinBucketToReserveForEntries(
    unsigned int NumEntries)

Description

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

Declared at: llvm/include/llvm/ADT/DenseMap.h:388

Parameters

unsigned int NumEntries

unsigned int getNumBuckets() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:526

unsigned int getNumEntries() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:486

unsigned int getNumTombstones() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:502

const void* getPointerIntoBucketsArray() const

Description

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.

Declared at: llvm/include/llvm/ADT/DenseMap.h:357

static const KeyT getTombstoneKey()

Declared at: llvm/include/llvm/ADT/DenseMap.h:461

void grow(unsigned int AtLeast)

Declared at: llvm/include/llvm/ADT/DenseMap.h:538

Parameters

unsigned int AtLeast

void incrementNumEntries()

Declared at: llvm/include/llvm/ADT/DenseMap.h:494

void incrementNumTombstones()

Declared at: llvm/include/llvm/ADT/DenseMap.h:510

void initEmpty()

Declared at: llvm/include/llvm/ADT/DenseMap.h:375

std::pair<iterator, bool> insert(
    const std::pair<KeyT, ValueT>& KV)

Declared at: llvm/include/llvm/ADT/DenseMap.h:209

Parameters

const std::pair<KeyT, ValueT>& KV

std::pair<iterator, bool> insert(
    std::pair<KeyT, ValueT>&& KV)

Declared at: llvm/include/llvm/ADT/DenseMap.h:216

Parameters

std::pair<KeyT, ValueT>&& KV

template <typename InputIt>
void insert(InputIt I, InputIt E)

Description

insert - Range insertion of pairs.

Declared at: llvm/include/llvm/ADT/DenseMap.h:299

Templates

InputIt

Parameters

InputIt I
InputIt E

template <typename LookupKeyT>
std::pair<iterator, bool> insert_as(
    std::pair<KeyT, ValueT>&& KV,
    const LookupKeyT& Val)

Description

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.

Declared at: llvm/include/llvm/ADT/DenseMap.h:275

Templates

LookupKeyT

Parameters

std::pair<KeyT, ValueT>&& KV
const LookupKeyT& Val

bool isPointerIntoBucketsArray(
    const void* Ptr) const

Description

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).

Declared at: llvm/include/llvm/ADT/DenseMap.h:350

Parameters

const void* Ptr

ValueT lookup(const_arg_type_t<KeyT> Val) const

Description

lookup - Return the entry for the specified key, or a default constructed value if no such entry exists.

Declared at: llvm/include/llvm/ADT/DenseMap.h:199

Parameters

const_arg_type_t<KeyT> Val

llvm::DenseMapBase::const_iterator
makeConstIterator(
    const BucketT* P,
    const BucketT* E,
    const llvm::DebugEpochBase& Epoch,
    const bool NoAdvance = false) const

Declared at: llvm/include/llvm/ADT/DenseMap.h:476

Parameters

const BucketT* P
const BucketT* E
const llvm::DebugEpochBase& Epoch
const bool NoAdvance = false

llvm::DenseMapBase::iterator makeIterator(
    BucketT* P,
    BucketT* E,
    llvm::DebugEpochBase& Epoch,
    bool NoAdvance = false)

Declared at: llvm/include/llvm/ADT/DenseMap.h:466

Parameters

BucketT* P
BucketT* E
llvm::DebugEpochBase& Epoch
bool NoAdvance = false

void moveFromOldBuckets(BucketT* OldBucketsBegin,
                        BucketT* OldBucketsEnd)

Declared at: llvm/include/llvm/ADT/DenseMap.h:397

Parameters

BucketT* OldBucketsBegin
BucketT* OldBucketsEnd

void reserve(
    llvm::DenseMapBase::size_type NumEntries)

Description

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

Declared at: llvm/include/llvm/ADT/DenseMap.h:105

Parameters

llvm::DenseMapBase::size_type NumEntries

void setNumEntries(unsigned int Num)

Declared at: llvm/include/llvm/ADT/DenseMap.h:490

Parameters

unsigned int Num

void setNumTombstones(unsigned int Num)

Declared at: llvm/include/llvm/ADT/DenseMap.h:506

Parameters

unsigned int Num

void shrink_and_clear()

Declared at: llvm/include/llvm/ADT/DenseMap.h:542

unsigned int size() const

Declared at: llvm/include/llvm/ADT/DenseMap.h:101

template <typename... Ts>
std::pair<iterator, bool> try_emplace(
    const KeyT& Key,
    Ts&&... Args)

Declared at: llvm/include/llvm/ADT/DenseMap.h:249

Templates

Ts

Parameters

const KeyT& Key
Ts&&... Args

template <typename... Ts>
std::pair<iterator, bool> try_emplace(
    KeyT&& Key,
    Ts&&... Args)

Declared at: llvm/include/llvm/ADT/DenseMap.h:224

Templates

Ts

Parameters

KeyT&& Key
Ts&&... Args