LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
llvm::SmallPtrSet< PtrType, SmallSize > Class Template Reference

#include <SmallPtrSet.h>

Inheritance diagram for llvm::SmallPtrSet< PtrType, SmallSize >:
Inheritance graph
[legend]
Collaboration diagram for llvm::SmallPtrSet< PtrType, SmallSize >:
Collaboration graph
[legend]

Public Types

typedef SmallPtrSetIterator
< PtrType > 
iterator
 
typedef SmallPtrSetIterator
< PtrType > 
const_iterator
 

Public Member Functions

 SmallPtrSet ()
 
 SmallPtrSet (const SmallPtrSet &that)
 
template<typename It >
 SmallPtrSet (It I, It E)
 
bool insert (PtrType Ptr)
 
bool erase (PtrType Ptr)
 
bool count (PtrType Ptr) const
 count - Return true if the specified pointer is in the set. More...
 
template<typename IterT >
void insert (IterT I, IterT E)
 
iterator begin () const
 
iterator end () const
 
const SmallPtrSet< PtrType,
SmallSize > & 
operator= (const SmallPtrSet< PtrType, SmallSize > &RHS)
 
void swap (SmallPtrSet< PtrType, SmallSize > &RHS)
 swap - Swaps the elements of two sets. More...
 
- Public Member Functions inherited from llvm::SmallPtrSetImpl
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty () const
 
unsigned size () const
 
void clear ()
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::SmallPtrSetImpl
 SmallPtrSetImpl (const void **SmallStorage, const SmallPtrSetImpl &that)
 
 SmallPtrSetImpl (const void **SmallStorage, unsigned SmallSize)
 
 ~SmallPtrSetImpl ()
 
bool insert_imp (const void *Ptr)
 
bool erase_imp (const void *Ptr)
 
bool count_imp (const void *Ptr) const
 
void swap (SmallPtrSetImpl &RHS)
 
void CopyFrom (const SmallPtrSetImpl &RHS)
 
- Static Protected Member Functions inherited from llvm::SmallPtrSetImpl
static void * getTombstoneMarker ()
 
static void * getEmptyMarker ()
 
- Protected Attributes inherited from llvm::SmallPtrSetImpl
const void ** SmallArray
 SmallArray - Points to a fixed size set of buckets, used in 'small mode'. More...
 
const void ** CurArray
 
unsigned CurArraySize
 CurArraySize - The allocated size of CurArray, always a power of two. More...
 
unsigned NumElements
 
unsigned NumTombstones
 

Detailed Description

template<class PtrType, unsigned SmallSize>
class llvm::SmallPtrSet< PtrType, SmallSize >

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements. This internally rounds up SmallSize to the next power of two if it is not already a power of two. See the comments above SmallPtrSetImpl for details of the algorithm.

Definition at line 236 of file SmallPtrSet.h.

Member Typedef Documentation

template<class PtrType, unsigned SmallSize>
typedef SmallPtrSetIterator<PtrType> llvm::SmallPtrSet< PtrType, SmallSize >::const_iterator

Definition at line 275 of file SmallPtrSet.h.

template<class PtrType, unsigned SmallSize>
typedef SmallPtrSetIterator<PtrType> llvm::SmallPtrSet< PtrType, SmallSize >::iterator

Definition at line 274 of file SmallPtrSet.h.

Constructor & Destructor Documentation

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( )
inline

Definition at line 243 of file SmallPtrSet.h.

template<class PtrType, unsigned SmallSize>
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( const SmallPtrSet< PtrType, SmallSize > &  that)
inline

Definition at line 244 of file SmallPtrSet.h.

template<class PtrType, unsigned SmallSize>
template<typename It >
llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet ( It  I,
It  E 
)
inline

Definition at line 247 of file SmallPtrSet.h.

Member Function Documentation

template<class PtrType, unsigned SmallSize>
iterator llvm::SmallPtrSet< PtrType, SmallSize >::begin ( ) const
inline
template<class PtrType, unsigned SmallSize>
bool llvm::SmallPtrSet< PtrType, SmallSize >::count ( PtrType  Ptr) const
inline
template<class PtrType, unsigned SmallSize>
iterator llvm::SmallPtrSet< PtrType, SmallSize >::end ( ) const
inline
template<class PtrType, unsigned SmallSize>
bool llvm::SmallPtrSet< PtrType, SmallSize >::erase ( PtrType  Ptr)
inline

erase - If the set contains the specified pointer, remove it and return true, otherwise return false.

Definition at line 259 of file SmallPtrSet.h.

Referenced by ComputePostOrders(), llvm::FindFunctionBackedges(), llvm::FoldBranchToCommonDest(), llvm::LoopBase< BasicBlock, Loop >::removeBlockFromLoop(), and llvm::LeakDetectorImpl< llvm::Value >::removeGarbage().

template<class PtrType, unsigned SmallSize>
bool llvm::SmallPtrSet< PtrType, SmallSize >::insert ( PtrType  Ptr)
inline

insert - This returns true if the pointer was new to the set, false if it was already in the set.

Definition at line 253 of file SmallPtrSet.h.

Referenced by llvm::LoopBase< BasicBlock, Loop >::addBlockEntry(), llvm::LeakDetectorImpl< llvm::Value >::addGarbage(), AddReachableCodeToWorklist(), llvm::IVUsers::AddUsersImpl(), AllUsesOfValueWillTrapIfNull(), analyzeGlobalAux(), AreAnyUnderlyingObjectsAnAlloca(), llvm::DominanceFrontier::calculate(), llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), canTrapImpl(), llvm::collectUsedGlobalVariables(), llvm::DomTreeNodeBase< llvm::MachineBasicBlock >::compare(), ComputePostOrders(), ConstantFoldConstantExpressionImpl(), llvm::MachineBasicBlock::CorrectExtraCFGEdges(), cxxDtorIsEmpty(), DeadPHICycle(), DominatesMergePoint(), DumpNodesr(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::DwarfDebug::endFunction(), enqueueUsersInWorklist(), llvm::Eval(), llvm::CodeExtractor::extractCodeRegion(), llvm::DIBuilder::finalize(), llvm::objcarc::FindDependencies(), llvm::FindFunctionBackedges(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::findNearestCommonDominator(), findNonImmUse(), llvm::findPHICopyInsertPoint(), FindUsedValues(), findUsedValues(), llvm::FoldBranchToCommonDest(), llvm::ScalarEvolution::forgetLoop(), llvm::ScalarEvolution::forgetValue(), getAdjustedPtr(), llvm::LexicalScopes::getMachineBasicBlocks(), llvm::MemoryDependenceAnalysis::getNonLocalCallDependency(), GetStringLengthH(), getUnderlyingObjects(), llvm::GetUnderlyingObjects(), HandleInlinedInvoke(), hasConcreteDef(), hasConcreteDefImpl(), llvm::SDNode::hasPredecessorHelper(), llvm::PMTopLevelManager::initializeAllAnalysisInfo(), InlineCallIfPossible(), llvm::SmallPtrSet< const T *, 8 >::insert(), isDereferenceablePointer(), isHighCostExpansion(), isSafeToMove(), isSimpleEnoughValueToCommit(), isSimplifiedLoopNest(), IsStoredObjCPointer(), llvm::Constant::isThreadDependent(), iterateChainSucc(), LinearizeExprTree(), LoadUsesSimpleEnoughForHeapSRA(), llvm::LoopBase< BasicBlock, Loop >::LoopBase(), markAliveBlocks(), MarkBlocksLiveIn(), llvm::SelectionDAG::MorphNodeTo(), PHIsEqualValue(), pushIVUsers(), llvm::RecursivelyDeleteDeadPHINode(), RemoveDeadConstant(), llvm::LiveRange::RenumberValues(), llvm::GlobalAlias::resolveAliasedGlobal(), llvm::LiveIntervals::shrinkToUses(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SmallPtrSet< const T *, 8 >::SmallPtrSet(), sortOpts(), llvm::Value::stripAndAccumulateInBoundsConstantOffsets(), stripAndComputeConstantOffsets(), llvm::IVStrideUse::transformToPostInc(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::LoopBase< N, M >::verifyLoop(), llvm::InstCombiner::visitLandingPadInst(), and llvm::InstCombiner::visitPHINode().

template<class PtrType, unsigned SmallSize>
template<typename IterT >
void llvm::SmallPtrSet< PtrType, SmallSize >::insert ( IterT  I,
IterT  E 
)
inline

Definition at line 269 of file SmallPtrSet.h.

template<class PtrType, unsigned SmallSize>
const SmallPtrSet<PtrType, SmallSize>& llvm::SmallPtrSet< PtrType, SmallSize >::operator= ( const SmallPtrSet< PtrType, SmallSize > &  RHS)
inline

Definition at line 286 of file SmallPtrSet.h.

template<class PtrType, unsigned SmallSize>
void llvm::SmallPtrSet< PtrType, SmallSize >::swap ( SmallPtrSet< PtrType, SmallSize > &  RHS)
inline

swap - Swaps the elements of two sets.

Definition at line 292 of file SmallPtrSet.h.

Referenced by std::swap().


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