LLVM  13.0.0git
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 "llvm/ADT/DenseSet.h"

Classes

class  ConstIterator
 
class  Iterator
 

Public Types

using key_type = ValueT
 
using value_type = ValueT
 
using size_type = unsigned
 
using iterator = Iterator
 
using const_iterator = ConstIterator
 

Public Member Functions

 DenseSetImpl (unsigned InitialReserve=0)
 
template<typename InputIt >
 DenseSetImpl (const InputIt &I, const InputIt &E)
 
 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_arg_type_t< 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_arg_type_t< ValueT > V)
 
const_iterator find (const_arg_type_t< ValueT > V) const
 
bool contains (const_arg_type_t< ValueT > V) const
 Check if the set contains the given element. More...
 
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, bool > insert (const ValueT &V)
 
std::pair< iterator, bool > insert (ValueT &&V)
 
template<typename LookupKeyT >
std::pair< iterator, bool > insert_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, bool > insert_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 54 of file DenseSet.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 171 of file DenseSet.h.

◆ iterator

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

Definition at line 170 of file DenseSet.h.

◆ key_type

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

Definition at line 63 of file DenseSet.h.

◆ size_type

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

Definition at line 65 of file DenseSet.h.

◆ value_type

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

Definition at line 64 of file DenseSet.h.

Constructor & Destructor Documentation

◆ DenseSetImpl() [1/3]

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

Definition at line 67 of file DenseSet.h.

◆ DenseSetImpl() [2/3]

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

Definition at line 70 of file DenseSet.h.

◆ DenseSetImpl() [3/3]

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

Definition at line 75 of file DenseSet.h.

Member Function Documentation

◆ begin() [1/2]

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

◆ begin() [2/2]

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

Definition at line 176 of file DenseSet.h.

◆ clear()

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

◆ contains()

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

◆ count()

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

◆ empty()

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

◆ end() [1/2]

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

◆ end() [2/2]

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

Definition at line 177 of file DenseSet.h.

◆ erase() [1/3]

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

◆ erase() [2/3]

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

Definition at line 204 of file DenseSet.h.

◆ erase() [3/3]

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

Definition at line 203 of file DenseSet.h.

◆ find() [1/2]

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

◆ find() [2/2]

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

Definition at line 180 of file DenseSet.h.

◆ find_as() [1/2]

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

◆ find_as() [2/2]

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

◆ getMemorySize()

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

Definition at line 82 of file DenseSet.h.

◆ insert() [1/3]

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

Definition at line 206 of file DenseSet.h.

Referenced by llvm::sampleprof::ProfileSymbolList::add(), llvm::jitlink::LinkGraph::addAbsoluteSymbol(), llvm::AA::PointerInfo::State::addAccess(), llvm::jitlink::LinkGraph::addExternalSymbol(), llvm::LiveVariables::addNewBlock(), llvm::DivergenceAnalysisImpl::addUniformOverride(), llvm::sampleprof::SampleProfileReaderItaniumRemapper::applyRemapping(), llvm::buildModuleSummaryIndex(), checkNumberingAndReplace(), checkNumberingAndReplaceCommutative(), checkVariableImport(), collectCallers(), collectFunctionUsers(), collectRegionsConstants(), llvm::IRSimilarity::IRSimilarityCandidate::compareCommutativeOperandMapping(), computeAliasSummary(), llvm::ComputeCrossModuleImport(), computeFunctionSummary(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), computeVariableSummary(), llvm::detail::DenseSetImpl< ConstantStruct *, DenseMap< ConstantStruct *, detail::DenseSetEmpty, MapInfo, detail::DenseSetPair< ConstantStruct * > >, MapInfo >::DenseSetImpl(), llvm::sampleprof::FunctionSamples::findAllNames(), llvm::orc::SpeculateQuery::findCalles(), findConstants(), findExtractedOutputToOverallOutputMapping(), llvm::DWARFDebugAranges::generate(), getBaseType(), llvm::DeclContextTree::getChildDeclContext(), getCHRConditionValuesForRegion(), getPostIncrementOperand(), llvm::detail::DenseSetImpl< ConstantStruct *, DenseMap< ConstantStruct *, detail::DenseSetEmpty, MapInfo, detail::DenseSetPair< ConstantStruct * > >, MapInfo >::insert(), insertRelocationStores(), insertRematerializationStores(), LLVMOrcMaterializationResponsibilityDelegate(), llvm::jitlink::LinkGraph::makeAbsolute(), llvm::jitlink::LinkGraph::makeExternal(), llvm::DivergenceAnalysisImpl::markDivergent(), llvm::jitlink::prune(), recomputeLiveInValues(), llvm::MCContext::recordELFMergeableSectionInfo(), llvm::ThinLTOCodeGenerator::run(), llvm::lto::LTO::run(), and llvm::UniqueStringSaver::save().

◆ insert() [2/3]

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

◆ insert() [3/3]

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

Definition at line 211 of file DenseSet.h.

◆ insert_as() [1/2]

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

Referenced by llvm::FunctionType::get(), and llvm::StructType::get().

◆ insert_as() [2/2]

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

◆ reserve()

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

◆ resize()

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

◆ size()

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

◆ swap()

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

Definition at line 105 of file DenseSet.h.


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