LLVM  4.0.0
Classes | Public Types | Public Member Functions | List of all members
llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT > Class Template Reference

Base class for DenseSet and DenseSmallSet. More...

#include <DenseSet.h>

Inheritance diagram for llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >:
[legend]

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

typedef ValueT key_type
 
typedef ValueT value_type
 
typedef unsigned size_type
 
typedef Iterator iterator
 
typedef ConstIterator const_iterator
 

Public Member Functions

 DenseSetImpl (unsigned InitialReserve=0)
 
 DenseSetImpl (std::initializer_list< ValueT > Elems)
 
bool empty () const
 
size_type size () const
 
size_t getMemorySize () const
 
void resize (size_t Size)
 Grow the DenseSet so that it has at least Size buckets. More...
 
void reserve (size_t Size)
 Grow the DenseSet so that it can contain at least NumEntries items before resizing again. More...
 
void clear ()
 
size_type count (const ValueT &V) const
 Return 1 if the specified key is in the set, 0 otherwise. More...
 
bool erase (const ValueT &V)
 
void swap (DenseSetImpl &RHS)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
iterator find (const ValueT &V)
 
const_iterator find (const ValueT &V) const
 
template<class LookupKeyT >
iterator find_as (const LookupKeyT &Val)
 Alternative 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
 
void erase (Iterator I)
 
void erase (ConstIterator CI)
 
std::pair< iterator, boolinsert (const ValueT &V)
 
std::pair< iterator, boolinsert (ValueT &&V)
 
template<typename LookupKeyT >
std::pair< iterator, boolinsert_as (const ValueT &V, const LookupKeyT &LookupKey)
 Alternative version of insert that uses a different (and possibly less expensive) key type. More...
 
template<typename LookupKeyT >
std::pair< iterator, boolinsert_as (ValueT &&V, const LookupKeyT &LookupKey)
 
template<typename InputIt >
void insert (InputIt I, InputIt E)
 

Detailed Description

template<typename ValueT, typename MapTy, typename ValueInfoT>
class llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >

Base class for DenseSet and DenseSmallSet.

MapTy should be either

DenseMap<ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair<ValueT>>

or the equivalent SmallDenseMap type. ValueInfoT must implement the DenseMapInfo "concept".

Definition at line 47 of file DenseSet.h.

Member Typedef Documentation

template<typename ValueT, typename MapTy, typename ValueInfoT>
typedef ConstIterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::const_iterator

Definition at line 138 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
typedef Iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::iterator

Definition at line 137 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
typedef ValueT llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::key_type

Definition at line 53 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
typedef unsigned llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::size_type

Definition at line 55 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
typedef ValueT llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::value_type

Definition at line 54 of file DenseSet.h.

Constructor & Destructor Documentation

template<typename ValueT, typename MapTy, typename ValueInfoT>
llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::DenseSetImpl ( unsigned  InitialReserve = 0)
inlineexplicit

Definition at line 57 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::DenseSetImpl ( std::initializer_list< ValueT Elems)
inline

Definition at line 59 of file DenseSet.h.

Member Function Documentation

template<typename ValueT, typename MapTy, typename ValueInfoT>
iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::begin ( )
inline

Definition at line 140 of file DenseSet.h.

Referenced by llvm::ConstantUniqueMap< llvm::ConstantExpr >::begin().

template<typename ValueT, typename MapTy, typename ValueInfoT>
const_iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::begin ( ) const
inline

Definition at line 143 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::clear ( )
inline

Definition at line 76 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
size_type llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::count ( const ValueT V) const
inline

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

Definition at line 81 of file DenseSet.h.

Referenced by relocationViaAlloca().

template<typename ValueT, typename MapTy, typename ValueInfoT>
bool llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::empty ( ) const
inline

Definition at line 64 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::end ( )
inline
template<typename ValueT, typename MapTy, typename ValueInfoT>
const_iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::end ( ) const
inline

Definition at line 144 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
bool llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::erase ( const ValueT V)
inline

Definition at line 85 of file DenseSet.h.

Referenced by llvm::ConstantUniqueMap< llvm::ConstantExpr >::remove().

template<typename ValueT, typename MapTy, typename ValueInfoT>
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::erase ( Iterator  I)
inline

Definition at line 165 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::erase ( ConstIterator  CI)
inline

Definition at line 166 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find ( const ValueT V)
inline

Definition at line 146 of file DenseSet.h.

Referenced by llvm::ConstantUniqueMap< llvm::ConstantExpr >::remove().

template<typename ValueT, typename MapTy, typename ValueInfoT>
const_iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find ( const ValueT V) const
inline

Definition at line 147 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
template<class LookupKeyT >
iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find_as ( const LookupKeyT &  Val)
inline

Alternative 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 157 of file DenseSet.h.

Referenced by llvm::FunctionType::get(), llvm::StructType::get(), llvm::ConstantUniqueMap< llvm::ConstantExpr >::getOrCreate(), llvm::PBQP::ValuePool< AllowedRegVector >::getValue(), and llvm::ConstantUniqueMap< llvm::ConstantExpr >::replaceOperandsInPlace().

template<typename ValueT, typename MapTy, typename ValueInfoT>
template<class LookupKeyT >
const_iterator llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find_as ( const LookupKeyT &  Val) const
inline

Definition at line 161 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
size_t llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::getMemorySize ( ) const
inline

Definition at line 66 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
std::pair<iterator, bool> llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert ( const ValueT V)
inline
template<typename ValueT, typename MapTy, typename ValueInfoT>
std::pair<iterator, bool> llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert ( ValueT &&  V)
inline

Definition at line 173 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
template<typename InputIt >
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert ( InputIt  I,
InputIt  E 
)
inline

Definition at line 192 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
template<typename LookupKeyT >
std::pair<iterator, bool> llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert_as ( const ValueT V,
const LookupKeyT &  LookupKey 
)
inline

Alternative version of insert that uses a different (and possibly less expensive) key type.

Definition at line 181 of file DenseSet.h.

Referenced by llvm::ConstantUniqueMap< llvm::ConstantExpr >::replaceOperandsInPlace().

template<typename ValueT, typename MapTy, typename ValueInfoT>
template<typename LookupKeyT >
std::pair<iterator, bool> llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert_as ( ValueT &&  V,
const LookupKeyT &  LookupKey 
)
inline

Definition at line 186 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::reserve ( size_t  Size)
inline

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

Definition at line 74 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::resize ( size_t  Size)
inline

Grow the DenseSet so that it has at least Size buckets.

Will not shrink the Size of the set.

Definition at line 70 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
size_type llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::size ( ) const
inline

Definition at line 65 of file DenseSet.h.

template<typename ValueT, typename MapTy, typename ValueInfoT>
void llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::swap ( DenseSetImpl< ValueT, MapTy, ValueInfoT > &  RHS)
inline

Definition at line 89 of file DenseSet.h.


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