LLVM  6.0.0svn
Public Types | Public Member Functions | Protected Member Functions | List of all members
llvm::SmallPtrSetImpl< PtrType > Class Template Reference

A templated base class for SmallPtrSet which provides the typesafe interface that is common across all small sizes. More...

#include "llvm/ADT/SmallPtrSet.h"

Inheritance diagram for llvm::SmallPtrSetImpl< PtrType >:
Inheritance graph
[legend]
Collaboration diagram for llvm::SmallPtrSetImpl< PtrType >:
Collaboration graph
[legend]

Public Types

using iterator = SmallPtrSetIterator< PtrType >
 
using const_iterator = SmallPtrSetIterator< PtrType >
 
using key_type = ConstPtrType
 
using value_type = PtrType
 
- Public Types inherited from llvm::SmallPtrSetImplBase
using size_type = unsigned
 

Public Member Functions

 SmallPtrSetImpl (const SmallPtrSetImpl &)=delete
 
std::pair< iterator, boolinsert (PtrType Ptr)
 Inserts Ptr if and only if there is no element in the container equal to Ptr. More...
 
bool erase (PtrType Ptr)
 erase - If the set contains the specified pointer, remove it and return true, otherwise return false. More...
 
size_type count (ConstPtrType Ptr) const
 count - Return 1 if the specified pointer is in the set, 0 otherwise. More...
 
iterator find (ConstPtrType Ptr) const
 
template<typename IterT >
void insert (IterT I, IterT E)
 
void insert (std::initializer_list< PtrType > IL)
 
iterator begin () const
 
iterator end () const
 
- Public Member Functions inherited from llvm::SmallPtrSetImplBase
SmallPtrSetImplBaseoperator= (const SmallPtrSetImplBase &)=delete
 
LLVM_NODISCARD bool empty () const
 
size_type size () const
 
void clear ()
 
- Public Member Functions inherited from llvm::DebugEpochBase
 DebugEpochBase ()
 
void incrementEpoch ()
 Calling incrementEpoch invalidates all handles pointing into the calling instance. More...
 
 ~DebugEpochBase ()
 The destructor calls incrementEpoch to make use-after-free bugs more likely to crash deterministically. More...
 

Protected Member Functions

 SmallPtrSetImpl (const void **SmallStorage, const SmallPtrSetImpl &that)
 
 SmallPtrSetImpl (const void **SmallStorage, unsigned SmallSize, SmallPtrSetImpl &&that)
 
 SmallPtrSetImpl (const void **SmallStorage, unsigned SmallSize)
 
- Protected Member Functions inherited from llvm::SmallPtrSetImplBase
 SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that)
 
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, SmallPtrSetImplBase &&that)
 
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize)
 
 ~SmallPtrSetImplBase ()
 
const void ** EndPointer () const
 
std::pair< const void *const *, boolinsert_imp (const void *Ptr)
 insert_imp - This returns true if the pointer was new to the set, false if it was already in the set. More...
 
bool erase_imp (const void *Ptr)
 erase_imp - If the set contains the specified pointer, remove it and return true, otherwise return false. More...
 
const void *constfind_imp (const void *Ptr) const
 Returns the raw pointer needed to construct an iterator. More...
 
void swap (SmallPtrSetImplBase &RHS)
 swap - Swaps the elements of two sets. More...
 
void CopyFrom (const SmallPtrSetImplBase &RHS)
 
void MoveFrom (unsigned SmallSize, SmallPtrSetImplBase &&RHS)
 

Additional Inherited Members

- Static Protected Member Functions inherited from llvm::SmallPtrSetImplBase
static void * getTombstoneMarker ()
 
static void * getEmptyMarker ()
 
- Protected Attributes inherited from llvm::SmallPtrSetImplBase
const void ** SmallArray
 SmallArray - Points to a fixed size set of buckets, used in 'small mode'. More...
 
const void ** CurArray
 CurArray - This is the current set of buckets. More...
 
unsigned CurArraySize
 CurArraySize - The allocated size of CurArray, always a power of two. More...
 
unsigned NumNonEmpty
 Number of elements in CurArray that contain a value or are a tombstone. More...
 
unsigned NumTombstones
 Number of tombstones in CurArray. More...
 

Detailed Description

template<typename PtrType>
class llvm::SmallPtrSetImpl< PtrType >

A templated base class for SmallPtrSet which provides the typesafe interface that is common across all small sizes.

This is particularly useful for passing around between interface boundaries to avoid encoding a particular small size in the interface boundary.

Definition at line 344 of file SmallPtrSet.h.

Member Typedef Documentation

◆ const_iterator

template<typename PtrType>
using llvm::SmallPtrSetImpl< PtrType >::const_iterator = SmallPtrSetIterator<PtrType>

Definition at line 361 of file SmallPtrSet.h.

◆ iterator

template<typename PtrType>
using llvm::SmallPtrSetImpl< PtrType >::iterator = SmallPtrSetIterator<PtrType>

Definition at line 360 of file SmallPtrSet.h.

◆ key_type

template<typename PtrType>
using llvm::SmallPtrSetImpl< PtrType >::key_type = ConstPtrType

Definition at line 362 of file SmallPtrSet.h.

◆ value_type

template<typename PtrType>
using llvm::SmallPtrSetImpl< PtrType >::value_type = PtrType

Definition at line 363 of file SmallPtrSet.h.

Constructor & Destructor Documentation

◆ SmallPtrSetImpl() [1/4]

template<typename PtrType>
llvm::SmallPtrSetImpl< PtrType >::SmallPtrSetImpl ( const void **  SmallStorage,
const SmallPtrSetImpl< PtrType > &  that 
)
inlineprotected

Definition at line 351 of file SmallPtrSet.h.

◆ SmallPtrSetImpl() [2/4]

template<typename PtrType>
llvm::SmallPtrSetImpl< PtrType >::SmallPtrSetImpl ( const void **  SmallStorage,
unsigned  SmallSize,
SmallPtrSetImpl< PtrType > &&  that 
)
inlineprotected

Definition at line 353 of file SmallPtrSet.h.

◆ SmallPtrSetImpl() [3/4]

template<typename PtrType>
llvm::SmallPtrSetImpl< PtrType >::SmallPtrSetImpl ( const void **  SmallStorage,
unsigned  SmallSize 
)
inlineexplicitprotected

Definition at line 356 of file SmallPtrSet.h.

◆ SmallPtrSetImpl() [4/4]

template<typename PtrType>
llvm::SmallPtrSetImpl< PtrType >::SmallPtrSetImpl ( const SmallPtrSetImpl< PtrType > &  )
delete

Member Function Documentation

◆ begin()

template<typename PtrType>
iterator llvm::SmallPtrSetImpl< PtrType >::begin ( ) const
inline

◆ count()

template<typename PtrType>
size_type llvm::SmallPtrSetImpl< PtrType >::count ( ConstPtrType  Ptr) const
inline

count - Return 1 if the specified pointer is in the set, 0 otherwise.

Definition at line 382 of file SmallPtrSet.h.

Referenced by addArgumentAttrs(), addData(), addEdge(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::CodeMetrics::analyzeBasicBlock(), appendDomFrontier(), llvm::RecurrenceDescriptor::areAllUsesIn(), llvm::MemoryDepChecker::areDepsSafe(), bothUsedInPHI(), buildClonedLoopBlocks(), buildClonedLoops(), llvm::LoopVectorizationPlanner::buildVPlans(), llvm::ForwardDominanceFrontierBase< BasicBlock >::calculate(), CanPropagatePredecessorsForPHIs(), checkForCyclesHelper(), clearAssumptionsOfUsers(), collectMDInDomain(), llvm::LoopVectorizationPlanner::collectTriviallyDeadInstructions(), collectValuesToDemote(), llvm::DomTreeNodeBase< BasicBlock >::compare(), completeEphemeralValues(), llvm::computeMinimumValueSizes(), ComputePostOrders(), llvm::LoopBase< BasicBlock, Loop >::contains(), llvm::createCodeGenPreparePass(), llvm::createMemDerefPrinter(), DeleteTriviallyDeadInstructions(), llvm::denormalizeForPostIncUse(), determinePointerReadAttrs(), llvm::LiveRangeEdit::didRematerialize(), DominatesMergePoint(), doPromotion(), llvm::GVNExpression::Expression::dump(), findBestInsertionSet(), llvm::FindFunctionBackedges(), llvm::findPHICopyInsertPoint(), findProfitablePHIs(), FoldTwoEntryPHINode(), generateEquivalentSub(), getCoroBeginPredBlocks(), getDepthOfOptCmov(), getInputChainForNode(), getLayoutSuccessorProbThreshold(), getMemSetPatternValue(), llvm::DILocation::getMergedLocation(), getNotRelocatableInstructions(), llvm::AArch64InstrInfo::getOutliningType(), GetPointerOperand(), getSignature(), llvm::RecurrenceDescriptor::getSourceExtensionKind(), getStartOrEndSlot(), getStoreTarget(), getSubprogram(), getSuccPad(), getTrueOrFalseValue(), getTypePartition(), getUnwindDestToken(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), hasOutsideLoopUser(), llvm::SDNode::hasPredecessorHelper(), hasSameSuccessors(), INITIALIZE_PASS(), inlineCallsImpl(), InsertRootInitializers(), llvm::PreservedAnalyses::intersect(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isBlockExecutable(), isDbgValueDescribedByReg(), isEphemeralValueOf(), isFullUndefDef(), llvm::IVUsers::isIVUserOrOperand(), llvm::LiveVariables::isLiveOut(), isLocalCopy(), isProfitableToFoldUnconditional(), IsSafeAndProfitableToMove(), isSafeToSpeculatePHIUsers(), isSimplifiedLoopNest(), isSuccOrder(), llvm::SelectionDAG::LegalizeOp(), LinearizeExprTree(), LowerInterruptReturn(), mapBinOpcode(), MarkBlocksLiveIn(), matchBinaryPredicate(), matchPair(), mayLoopAccessLocation(), mbbHasBackEdge(), mergeConstants(), llvm::normalizeForPostIncUse(), okayForPHIOfOps(), operator<<(), llvm::MemorySSA::OptimizeUses::optimizeUses(), peekThroughBitcast(), llvm::PreservedAnalyses::PreservedAnalysisChecker::preserved(), llvm::PreservedAnalyses::PreservedAnalysisChecker::preservedSet(), llvm::AlignmentFromAssumptionsPass::processAssumption(), promoteSingleBlockAlloca(), propagateMetadata(), recomputeLoopBlockSet(), recordConditions(), regOverlapsSet(), removePhis(), llvm::removeUnreachableBlocks(), llvm::LoopFullUnrollPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor< CGSCCPassT >::run(), runImpl(), llvm::Localizer::runOnMachineFunction(), SafeToMergeTerminators(), setUsedInitializer(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), sink(), SinkThenElseCodeToEnd(), AllocaSlices::SliceBuilder::SliceBuilder(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), speculatePHIs(), StripSymbolNames(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), tryToElideArgumentCopy(), llvm::updateCGAndAnalysisManagerForFunctionPass(), updateDTAfterUnswitch(), updatePostorderSequenceForEdgeInsertion(), llvm::AssumptionCacheTracker::verifyAnalysis(), and llvm::LoopBase< BasicBlock, Loop >::verifyLoop().

◆ end()

template<typename PtrType>
iterator llvm::SmallPtrSetImpl< PtrType >::end ( ) const
inline

◆ erase()

template<typename PtrType>
bool llvm::SmallPtrSetImpl< PtrType >::erase ( PtrType  Ptr)
inline

◆ find()

template<typename PtrType>
iterator llvm::SmallPtrSetImpl< PtrType >::find ( ConstPtrType  Ptr) const
inline

Definition at line 383 of file SmallPtrSet.h.

◆ insert() [1/3]

template<typename PtrType>
std::pair<iterator, bool> llvm::SmallPtrSetImpl< PtrType >::insert ( PtrType  Ptr)
inline

Inserts Ptr if and only if there is no element in the container equal to Ptr.

The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element equal to Ptr.

Definition at line 371 of file SmallPtrSet.h.

Referenced by AddAliasScopeMetadata(), addArgumentAttrs(), llvm::LoopBase< BasicBlock, Loop >::addBlockEntry(), addData(), addEdge(), AddReachableCodeToWorklist(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::cl::Option::addSubCommand(), llvm::IVUsers::AddUsersImpl(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::PreservedAnalyses::all(), AllUsesOfValueWillTrapIfNull(), analyzeGlobalAux(), llvm::cl::basic_parser_impl::anchor(), appendDomFrontier(), appendSpeculatableOperands(), appendToUsedList(), llvm::MemoryDepChecker::areDepsSafe(), buildClonedLoops(), llvm::buildModuleSummaryIndex(), buildMultiplyTree(), llvm::LoopVectorizationPlanner::buildVPlans(), llvm::IDFCalculator< NodeTy, IsPostDom >::calculate(), llvm::ForwardDominanceFrontierBase< BasicBlock >::calculate(), callsiteIsHot(), canIfConvertPHINodes(), canPaddingBeAccessed(), canTrapImpl(), canTRE(), castRequiresQueuePtr(), checkForCyclesHelper(), clearAssumptionsOfUsers(), llvm::collectCmpOps(), llvm::CodeMetrics::collectEphemeralValues(), collectMDInDomain(), llvm::LoopVectorizationPlanner::collectTriviallyDeadInstructions(), llvm::collectUsedGlobalVariables(), llvm::DomTreeNodeBase< BasicBlock >::compare(), llvm::FunctionComparator::compare(), completeEphemeralValues(), llvm::ObjectSizeOffsetEvaluator::compute(), llvm::computeMinimumValueSizes(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), computePath(), ComputePostOrders(), ConstHasGlobalValuePredicate(), contains(), containsNewBackedge(), llvm::ScalarEvolution::convertSCEVToAddRecWithPredicates(), llvm::MachineBasicBlock::CorrectExtraCFGEdges(), llvm::createAMDGPUFunctionInliningPass(), llvm::createCodeGenPreparePass(), llvm::createMemDerefPrinter(), createPHIsForCMOVsInSinkBB(), llvm::createWebAssemblyFixIrreducibleControlFlow(), cxxDtorIsEmpty(), DeadPHICycle(), definesFullReg(), llvm::deleteDeadLoop(), DeleteTriviallyDeadInstructions(), despeculateCountZeros(), llvm::AsmPrinter::doFinalization(), DominatesMergePoint(), llvm::GVNExpression::Expression::dump(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::eval(), llvm::Evaluator::EvaluateFunction(), extendSegmentsToUses(), llvm::CodeExtractor::extractCodeRegion(), llvm::FastISel::fastEmitZExtFromI1(), llvm::DIBuilder::finalize(), FindAllMemoryUses(), findBaseOffset(), findBBsToSinkInto(), findBestInsertionSet(), llvm::objcarc::FindDependencies(), llvm::FindFunctionBackedges(), findLoopInstr(), findNonImmUse(), findPartitions(), llvm::findPHICopyInsertPoint(), findProfitablePHIs(), findRefEdges(), llvm::DomTreeBuilder::SemiNCAInfo< DomTreeT >::FindRoots(), FindUsedValues(), findUsedValues(), FindUses(), fixPhis(), fixupRegionExits(), foldBlockIntoPredecessor(), forEachUser(), llvm::ScalarEvolution::forgetLoop(), llvm::ScalarEvolution::forgetValue(), llvm::formDedicatedExitBlocks(), FunctionNumber(), generateEquivalentSub(), getAdjustedPtr(), GetConstantInt(), getCopyRewriter(), getCoroBeginPredBlocks(), getDepthOfOptCmov(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getEstimatedNumberOfCaseClusters(), getFirstNonAllocaInTheEntryBlock(), getInputChainForNode(), getLayoutSuccessorProbThreshold(), llvm::LexicalScopes::getMachineBasicBlocks(), getMemSetPatternValue(), llvm::DILocation::getMergedLocation(), llvm::GlobalsAAResult::getModRefBehavior(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), getNotRelocatableInstructions(), getNumBytes(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getOperandsScalarizationOverhead(), llvm::GetPointerBaseWithConstantOffset(), GetPointerOperand(), getRangeForAffineARHelper(), llvm::SCEVExpander::getRelatedExistingExpansion(), getSignature(), llvm::RecurrenceDescriptor::getSourceExtensionKind(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), getStartOrEndSlot(), getStoreTarget(), GetStringLengthH(), getSubprogram(), getSuccPad(), getTypePartition(), llvm::GetUnderlyingObjects(), llvm::getUnderlyingObjectsForCodeGen(), getUnwindDestToken(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::ScalarEvolution::getWrapPredicate(), greaterWithBias(), llvm::guessSuccessors(), HandleInlinedLandingPad(), hasConcreteDef(), hasConcreteDefImpl(), llvm::ScalarEvolution::hasOperand(), hasOutsideLoopUser(), llvm::SDNode::hasPredecessorHelper(), hasSameExtUse(), INITIALIZE_PASS(), llvm::PMTopLevelManager::initializeAllAnalysisInfo(), inlineCallsImpl(), llvm::MemorySSAUpdater::insertDef(), llvm::LazyCallGraph::RefSCC::insertIncomingRefEdge(), InsertRootInitializers(), isAlwaysFoldable(), llvm::LazyCallGraph::SCC::isAncestorOf(), llvm::LazyCallGraph::RefSCC::isAncestorOf(), llvm::CodeExtractor::isBlockValidForExtraction(), llvm::CoalescerPair::isCoalescable(), isDefInSubRange(), isDereferenceableAndAlignedPointer(), isEmptyFunction(), isEphemeralValueOf(), isFullUndefDef(), isHighCostExpansion(), IsIncrementNUW(), llvm::LiveVariables::isLiveOut(), isNonEscapingGlobalNoAliasWithLoad(), IsNonLocalValue(), isObjectSizeLessThanOrEq(), llvm::isPotentiallyReachableFromMany(), isProfitableChain(), IsSafeAndProfitableToMove(), isSafeAndProfitableToSpeculateAroundPHI(), isSafeToMove(), isSafeToSpeculatePHIUsers(), IsScalarTBAANodeImpl(), isSimpleEnoughValueToCommit(), isSimplifiedLoopNest(), llvm::StructType::isSized(), isSourceDefinedByImplicitDef(), IsStoredObjCPointer(), isStrideMul(), isSuccOrder(), isUnconditionalBranch(), isUniformlyReached(), isVectorReductionOp(), isVirtualRegisterOperand(), isZero(), iterativelySimplifyCFG(), llvm::LazyCallGraph::LazyCallGraph(), llvm::SelectionDAG::Legalize(), llvm::SelectionDAG::LegalizeOp(), LinearizeExprTree(), LoadUsesSimpleEnoughForHeapSRA(), llvm::RecurrenceDescriptor::lookThroughAnd(), llvm::LoopBase< BasicBlock, Loop >::LoopBase(), LowerInterruptReturn(), mapBinOpcode(), markAliveBlocks(), MarkBlocksLiveIn(), llvm::LiveRangeEdit::markDeadRemat(), llvm::ARMFunctionInfo::markGlobalAsPromotedToConstantPool(), llvm::LiveRangeEdit::markRematerialized(), matchBinaryPredicate(), matchPair(), mayLoopAccessLocation(), memoryIsNotModifiedBetween(), MergeAliasResults(), mergeConditionalStores(), mergeInlinedArrayAllocas(), mergeOperations(), llvm::SelectionDAG::MorphNodeTo(), multipleIterations(), okayForPHIOfOps(), NewGVN::ValueDFS::operator<(), operator<<(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::MemorySSA::OptimizeUses::optimizeUses(), patchAndReplaceAllUsesWith(), peekThroughBitcast(), PeepholePPC64ZExtGather(), PHIsEqualValue(), llvm::LazyValueInfo::printLVI(), llvm::AlignmentFromAssumptionsPass::processAssumption(), promoteArguments(), promoteSingleBlockAlloca(), propagateMetadata(), PushDefUseChildren(), pushIVUsers(), PushLoopPHIs(), llvm::GVNHoist::rank(), rebuildLoopAfterUnswitch(), recomputeLoopBlockSet(), llvm::RecursivelyDeleteDeadPHINode(), ReduceSwitchRange(), regOverlapsSet(), RemoveDeadConstant(), removePhis(), RemoveUnusedGlue(), llvm::LiveRange::RenumberValues(), llvm::ARMTargetLowering::ReplaceNodeResults(), reportFastISelFailure(), llvm::LoopFullUnrollPass::run(), runImpl(), llvm::Localizer::runOnMachineFunction(), setBranchWeights(), llvm::MCAssembler::setIsThumbFunc(), setUsedInitializer(), SimplifyLoopInst(), simplifyOneLoop(), llvm::JumpThreadingPass::SimplifyPartiallyRedundantLoad(), sink(), sinkInstruction(), SinkThenElseCodeToEnd(), AllocaSlices::SliceBuilder::SliceBuilder(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), sortOpts(), speculatePHIs(), llvm::Value::stripAndAccumulateInBoundsConstantOffsets(), stripAndComputeConstantOffsets(), truncateIVUse(), llvm::InnerLoopVectorizer::truncateToMinimalBitwidths(), tryToElideArgumentCopy(), unswitchAllTrivialConditions(), unswitchInvariantBranch(), unswitchLoop(), llvm::LiveIntervals::HMEditor::updateAllRanges(), updateCallerBFI(), llvm::updateCGAndAnalysisManagerForFunctionPass(), updateDTAfterUnswitch(), updateLiveness(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::MemorySSA::CachingWalker::verify(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::LoopBase< BasicBlock, Loop >::verifyLoop(), llvm::sroa::AllocaSliceRewriter::visit(), visitDomSubTree(), llvm::InstCombiner::visitLandingPadInst(), llvm::InstCombiner::visitPHINode(), llvm::LazyCallGraph::visitReferences(), llvm::TBAAVerifier::visitTBAAMetadata(), llvm::VirtRegAuxInfo::weightCalcHelper(), and llvm::LLVMContext::~LLVMContext().

◆ insert() [2/3]

template<typename PtrType>
template<typename IterT >
void llvm::SmallPtrSetImpl< PtrType >::insert ( IterT  I,
IterT  E 
)
inline

Definition at line 388 of file SmallPtrSet.h.

◆ insert() [3/3]

template<typename PtrType>
void llvm::SmallPtrSetImpl< PtrType >::insert ( std::initializer_list< PtrType >  IL)
inline

Definition at line 393 of file SmallPtrSet.h.


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