LLVM 20.0.0git
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"

Inherits llvm::SmallPtrSetImplBase.

Inherited by llvm::SmallPtrSet< BasicBlockT *, 8 >, llvm::SmallPtrSet< const BasicBlock *, 8 >, llvm::SmallPtrSet< const BasicBlockT *, 32 >, llvm::SmallPtrSet< const MachineBasicBlock *, 8 >, llvm::SmallPtrSet< typename GraphTraits< std::conditional_t< IsConst, const BlockT, BlockT > * >::NodeRef, 8 >, llvm::SmallPtrSet< PointeeType *, N >, llvm::SmallPtrSet< typename GraphTraits< GraphT >::NodeRef >, llvm::SmallPtrSet< typename GraphTraits< T >::NodeRef, 8 >, llvm::SmallPtrSet< typename GraphTraits< GraphT >::NodeRef, 8 >, llvm::SmallPtrSet< NodeRef, 8 >, llvm::SmallPtrSet< const MDNode *, 8 >, llvm::SmallPtrSet< Instruction *, 4 >, llvm::SmallPtrSet< llvm::MachineBasicBlock *, 16 >, llvm::SmallPtrSet< llvm::LiveRange *, 8 >, llvm::SmallPtrSet< const llvm::AllocaInst *, 8 >, llvm::SmallPtrSet< CallBase *, 2 >, llvm::SmallPtrSet< AssumeInst *, 4 >, llvm::SmallPtrSet< const MachineInstr *, 16 >, llvm::SmallPtrSet< const llvm::GlobalVariable *, 2 >, llvm::SmallPtrSet< const llvm::GlobalVariable *, 1 >, llvm::SmallPtrSet< llvm::BasicBlock *, 8 >, llvm::SmallPtrSet< const llvm::Value *, 16 >, llvm::SmallPtrSet< const llvm::MachineBasicBlock *, 2 >, llvm::SmallPtrSet< llvm::Function *, 16 >, llvm::SmallPtrSet< llvm::GlobalObject *, 2 >, llvm::SmallPtrSet< llvm::Value *, 4 >, llvm::SmallPtrSet< const llvm::MDNode *, 32 >, llvm::SmallPtrSet< llvm::Instruction *, 32 >, llvm::SmallPtrSet< llvm::Use *, 16 >, llvm::SmallPtrSet< const MDNode *, 4 >, llvm::SmallPtrSet< llvm::GlobalVariable *, 8 >, llvm::SmallPtrSet< llvm::Constant *, 8 >, llvm::SmallPtrSet< llvm::GlobalValue *, 4 >, llvm::SmallPtrSet< const llvm::DbgDeclareInst *, 8 >, llvm::SmallPtrSet< const llvm::DbgVariableRecord *, 8 >, llvm::SmallPtrSet< llvm::Function *, 32 >, llvm::SmallPtrSet< llvm::MachineInstr *, 4 >, llvm::SmallPtrSet< const BlockT *, 4 >, llvm::SmallPtrSet< const BlockT *, 32 >, llvm::SmallPtrSet< const CycleT *, 16 >, llvm::SmallPtrSet< const InstructionT *, 32 >, llvm::SmallPtrSet< llvm::GlobalValue *, 32 >, llvm::SmallPtrSet< const llvm::GlobalValue *, 8 >, llvm::SmallPtrSet< const Loop *, 2 >, llvm::SmallPtrSet< llvm::Instruction *, 16 >, llvm::SmallPtrSet< const llvm::Value *, 32 >, llvm::SmallPtrSet< const llvm::Function *, 8 >, llvm::SmallPtrSet< llvm::InterleaveGroup< llvm::Instruction > *, 4 >, llvm::SmallPtrSet< llvm::Module *, 4 >, llvm::SmallPtrSet< llvm::MachineInstr *, 32 >, llvm::SmallPtrSet< const llvm::VNInfo *, 4 >, llvm::SmallPtrSet< const BlockT *, 8 >, llvm::SmallPtrSet< llvm::PHINode *, 4 >, llvm::SmallPtrSet< llvm::Type *, 16 >, llvm::SmallPtrSet< llvm::Instruction *, 4 >, llvm::SmallPtrSet< const PHINode *, 8 >, llvm::SmallPtrSet< const llvm::Instruction *, 8 >, llvm::SmallPtrSet< const llvm::MCSymbol *, 32 >, llvm::SmallPtrSet< Module *, 4 >, llvm::SmallPtrSet< const llvm::LazyCallGraph::Node *, 1 >, llvm::SmallPtrSet< llvm::MachineRegisterInfo::Delegate *, 1 >, llvm::SmallPtrSet< const llvm::BasicBlock *, 16 >, llvm::SmallPtrSet< const Value *, 8 >, llvm::SmallPtrSet< llvm::Instruction *, 8 >, llvm::SmallPtrSet< void *, 2 >, llvm::SmallPtrSet< llvm::AnalysisKey *, 2 >, llvm::SmallPtrSet< llvm::Value *, 16 >, llvm::SmallPtrSet< const llvm::SCEV *, 8 >, llvm::SmallPtrSet< llvm::BasicBlock *, 2 >, llvm::SmallPtrSet< const llvm::Type *, 4 >, llvm::SmallPtrSet< const llvm::Value *, 6 >, llvm::SmallPtrSet< const llvm::PHINode *, 6 >, llvm::SmallPtrSet< const llvm::SCEVAddRecExpr *, 16 >, llvm::SmallPtrSet< const llvm::Instruction *, 4 >, llvm::SmallPtrSet< llvm::BasicBlock *, 16 >, llvm::SmallPtrSet< llvm::MachineBasicBlock *, 8 >, llvm::SmallPtrSet< llvm::cl::SubCommand *, 1 >, llvm::SmallPtrSet< llvm::Use *, 8 >, llvm::SmallPtrSet< llvm::Instruction *, 2 >, llvm::SmallPtrSet< llvm::orc::JITDylib const *, 8 >, llvm::SmallPtrSet< Value *, 16 >, and llvm::SmallPtrSet< PtrType, SmallSize >.

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.
 
iterator insert (iterator, PtrType Ptr)
 Insert the given pointer with an iterator hint that is ignored.
 
bool erase (PtrType Ptr)
 Remove pointer from the set.
 
template<typename UnaryPredicate >
bool remove_if (UnaryPredicate P)
 Remove elements that match the given predicate.
 
size_type count (ConstPtrType Ptr) const
 count - Return 1 if the specified pointer is in the set, 0 otherwise.
 
iterator find (ConstPtrType Ptr) const
 
bool contains (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
 
bool empty () const
 
size_type size () const
 
size_type capacity () const
 
void clear ()
 
void reserve (size_type NumEntries)
 
- Public Member Functions inherited from llvm::DebugEpochBase
void incrementEpoch ()
 

Protected Member Functions

 SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that)
 
 SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&that)
 
 SmallPtrSetImplBase (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, const void **RHSSmallStorage, 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.
 
bool erase_imp (const void *Ptr)
 erase_imp - If the set contains the specified pointer, remove it and return true, otherwise return false.
 
const void *constfind_imp (const void *Ptr) const
 Returns the raw pointer needed to construct an iterator.
 
bool contains_imp (const void *Ptr) const
 
bool isSmall () const
 
void swap (const void **SmallStorage, const void **RHSSmallStorage, SmallPtrSetImplBase &RHS)
 swap - Swaps the elements of two sets.
 
void copyFrom (const void **SmallStorage, const SmallPtrSetImplBase &RHS)
 
void moveFrom (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, 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 ** CurArray
 The current set of buckets, in either small or big representation.
 
unsigned CurArraySize
 CurArraySize - The allocated size of CurArray, always a power of two.
 
unsigned NumNonEmpty
 Number of elements in CurArray that contain a value or are a tombstone.
 
unsigned NumTombstones
 Number of tombstones in CurArray.
 
bool IsSmall
 Whether the set is in small representation.
 

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 363 of file SmallPtrSet.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 374 of file SmallPtrSet.h.

◆ iterator

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

Definition at line 373 of file SmallPtrSet.h.

◆ key_type

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

Definition at line 375 of file SmallPtrSet.h.

◆ value_type

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

Definition at line 376 of file SmallPtrSet.h.

Constructor & Destructor Documentation

◆ SmallPtrSetImpl()

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

◆ contains()

template<typename PtrType >
bool llvm::SmallPtrSetImpl< PtrType >::contains ( ConstPtrType  Ptr) const
inline

Definition at line 458 of file SmallPtrSet.h.

References llvm::SmallPtrSetImplBase::contains_imp(), and Ptr.

Referenced by AddAliasScopeMetadata(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::SampleProfileInference< FT >::apply(), llvm::ScalarEvolution::canReuseInstruction(), llvm::CloneAndPruneIntoFromInst(), clusterSortPtrAccesses(), collectPromotionCandidates(), llvm::InstCombiner::computeBackEdges(), llvm::InnerLoopVectorizer::createInductionResumeVPValues(), llvm::ScalarEvolution::ExitLimit::ExitLimit(), llvm::filterDeadComdatFunctions(), llvm::findPHICopyInsertPoint(), llvm::memtag::forAllReachableExits(), gatherPossiblyVectorizableLoads(), llvm::LLVMContext::generateMachineFunctionNum(), generateNewInstTree(), llvm::SCEVExpander::getAllInsertedInstructions(), getAppleRuntimeUnrollPreferences(), llvm::MDNode::getMostGenericAliasScope(), llvm::GenericUniformityAnalysisImpl< ContextT >::hasDivergentTerminator(), llvm::hasPartialIVCondition(), llvm::PreservedAnalyses::intersect(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::isBBPendingDeletion(), isConstReg(), llvm::GenericUniformityAnalysisImpl< ContextT >::isDivergent(), llvm::slpvectorizer::BoUpSLP::isGathered(), AliasScopeTracker::isNoAliasScopeDeclDead(), llvm::slpvectorizer::BoUpSLP::isNotScheduled(), isReachableImpl(), llvm::ModifiedPostOrder< ContextT >::isReducibleCycleHeader(), mayLoopAccessLocation(), llvm::MergeBlockIntoPredecessor(), peelToTurnInvariantLoadsDerefencebale(), llvm::refineInstruction(), llvm::SCCPSolver::removeNonFeasibleEdges(), removeUnreachableFunctions(), llvm::slpvectorizer::BoUpSLP::VLOperands::reorder(), rewriteFunction(), llvm::LoopFullUnrollPass::run(), simplifyICmpUsingMonotonicValues(), StripSymbolNames(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), UpdatePHINodes(), ValidateMVEStore(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::ScalarEvolution::verify(), and visit().

◆ 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 452 of file SmallPtrSet.h.

References llvm::SmallPtrSetImplBase::contains_imp(), and Ptr.

Referenced by AddAliasScopeMetadata(), addArgumentAttrs(), llvm::MachineRegisterInfo::addDelegate(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), alwaysInlineImpl(), llvm::CodeMetrics::analyzeBasicBlock(), analyzeLoopUnrollCost(), llvm::SampleProfileInference< FT >::apply(), llvm::MemoryDepChecker::areDepsSafe(), bothUsedInPHI(), buildClonedLoops(), llvm::LoopVectorizationCostModel::calculateRegisterUsage(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), CanPropagatePredecessorsForPHIs(), canProveExitOnFirstIteration(), CanRedirectPredsOfEmptyBBToSucc(), checkForCyclesHelper(), checkOuterLoopInsts(), checkPHIs(), collectCastInstrs(), collectLeaves(), llvm::DomTreeNodeBase< NodeT >::compare(), completeEphemeralValues(), ComputeLiveInBlocks(), llvm::computeMinimumValueSizes(), ComputePostOrders(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::WebAssemblyException::contains(), llvm::containsIrreducibleCFG(), llvm::OpenMPIRBuilder::createParallel(), deleteIfDead(), determinePointerAccessAttrs(), llvm::LiveRangeEdit::didRematerialize(), dominatesMergePoint(), llvm::SMSchedule::earliestCycleInChain(), llvm::EliminateUnreachableBlocks(), llvm::LoopVectorizationCostModel::expectedCost(), llvm::findAllocaForValue(), findBestInsertionSet(), findBestNonTrivialUnswitchCandidate(), findDependencies(), llvm::FindFunctionBackedges(), foldTwoEntryPHINode(), llvm::ReachingDefAnalysis::getGlobalUses(), llvm::ReachingDefAnalysis::getLiveOuts(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatch(), llvm::AArch64InstrInfo::getOutliningTypeImpl(), getSingleLiveInSuccBB(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), getTrueOrFalseValue(), getUnwindDestToken(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::hasOutsideLoopUser(), llvm::SDNode::hasPredecessorHelper(), hasSameSuccessors(), InsertRootInitializers(), llvm::MDNode::intersect(), llvm::intersectAccessGroups(), isAllDILocation(), llvm::Loop::isAnnotatedParallel(), llvm::SCCPInstVisitor::isArgumentTrackedFunction(), llvm::SparseSolver< LatticeKey, LatticeVal, KeyInfo >::isBlockExecutable(), llvm::LoopVectorizationLegality::isCastedInductionVariable(), isDILocationReachable(), llvm::LoopVectorizationLegality::isFixedOrderRecurrence(), llvm::IVUsers::isIVUserOrOperand(), llvm::LiveVariables::isLiveOut(), isReachableAmongDominated(), isReachableImpl(), IsSafeAndProfitableToMove(), llvm::isSafeToUnrollAndJam(), isSuccOrder(), isUnmergeableGlobal(), llvm::SMSchedule::latestCycleInChain(), llvm::SelectionDAG::LegalizeOp(), LinearizeExprTree(), mayLoopAccessLocation(), moveHeaderPhiOperandsToForeBlocks(), llvm::SCCPInstVisitor::mustPreserveReturn(), llvm::mustTriggerUB(), llvm::nonStrictlyPostDominate(), optimizeLoopExitWithUnknownExitCount(), partitionLoopBlocks(), llvm::InstCombinerImpl::prepareWorklist(), llvm::PreservedAnalyses::PreservedAnalysisChecker::preserved(), llvm::PreservedAnalyses::PreservedAnalysisChecker::preservedSet(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processHeaderPhiOperands(), recomputeLoopBlockSet(), recordConditions(), llvm::objcopy::macho::Object::removeSections(), llvm::removeUnreachableBlocks(), llvm::SPIRVMergeRegionExitTargets::replaceBranchTargets(), llvm::replaceSignedInst(), llvm::MachineRegisterInfo::resetDelegate(), llvm::SCCPInstVisitor::resetLatticeValueFor(), rewriteDebugUsers(), llvm::MemDerefPrinterPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), runImpl(), llvm::JumpThreadingPass::runImpl(), runMoveAutoInit(), llvm::SPIRVMergeRegionExitTargets::runOnConvergenceRegionNoRecurse(), llvm::BreakFalseDeps::runOnMachineFunction(), safeToMergeTerminators(), separateNestedLoop(), simplifyLoopInst(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), sink(), llvm::LoopNest::skipEmptyBlockUntil(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), sortBlocks(), splitPredecessorsOfLoopExit(), stripLoopMDLoc(), llvm::UnrollAndJamLoop(), updateCGAndAnalysisManagerForPass(), llvm::MemorySSAUpdater::updateForClonedLoop(), UpdatePHINodes(), updatePostorderSequenceForEdgeInsertion(), updatePredecessorProfileMetadata(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::GenericCycle< ContextT >::verifyCycle(), llvm::MemorySSA::verifyDominationNumbers(), llvm::yaml::WebAssemblyFunctionInfo::WebAssemblyFunctionInfo(), and llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor().

◆ 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 455 of file SmallPtrSet.h.

References llvm::SmallPtrSetImplBase::find_imp(), and Ptr.

Referenced by peelToTurnInvariantLoadsDerefencebale().

◆ insert() [1/4]

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

Insert the given pointer with an iterator hint that is ignored.

This is identical to calling insert(Ptr), but allows SmallPtrSet to be used by std::insert_iterator and std::inserter().

Definition at line 392 of file SmallPtrSet.h.

References llvm::SmallPtrSetImpl< PtrType >::insert(), and Ptr.

◆ insert() [2/4]

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

Definition at line 463 of file SmallPtrSet.h.

References E, I, and llvm::SmallPtrSetImpl< PtrType >::insert().

◆ insert() [3/4]

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 384 of file SmallPtrSet.h.

References llvm::SmallPtrSetImplBase::insert_imp(), and Ptr.

Referenced by AddAliasScopeMetadata(), llvm::AAExecutionDomain::ExecutionDomainTy::addAlignedBarrier(), addArgumentAttrs(), llvm::SCCPInstVisitor::addArgumentTrackedFunction(), llvm::AAExecutionDomain::ExecutionDomainTy::addAssumeInst(), llvm::WebAssemblyException::addBlock(), llvm::LoopBase< BlockT, LoopT >::addBlockEntry(), llvm::MachineRegisterInfo::addDelegate(), addFullyUnrolledInstructionsToIgnore(), llvm::AArch64FunctionInfo::addLOHDirective(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::WebAssemblyException::addToBlocksSet(), llvm::SCCPInstVisitor::addToMustPreserveReturnsInFunctions(), llvm::SCCPInstVisitor::addTrackedFunction(), llvm::IVUsers::AddUsersIfInteresting(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::adjustExtracts(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::PreservedAnalyses::all(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), AllUsesOfValueWillTrapIfNull(), alwaysInlineImpl(), llvm::SPIRV::ConvergenceRegionAnalyzer::analyze(), analyzeGlobalAux(), llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::ModifiedPostOrder< ContextT >::appendBlock(), appendSpeculatableOperands(), llvm::MemoryDepChecker::areDepsSafe(), buildClonedLoopBlocks(), buildClonedLoops(), llvm::SampleProfileLoaderBaseImpl< FT >::buildEdges(), llvm::buildModuleSummaryIndex(), llvm::IDFCalculatorBase< NodeTy, IsPostDom >::calculate(), llvm::LoopVectorizationCostModel::calculateRegisterUsage(), llvm::DomTreeUpdater::callbackDeleteBB(), canFoldStoreIntoLibCallOutputPointers(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), canonicalizePHIOperands(), canProveExitOnFirstIteration(), canRenameUntilSecondLoad(), canRenameUpToDef(), canReturn(), llvm::ScalarEvolution::canReuseInstruction(), llvm::PatternMatch::undef_match::check(), llvm::Attributor::checkForAllUses(), checkForCyclesHelper(), checkIfSupported(), checkMixedPrecision(), checkPHIs(), CleanupConstantGlobalUsers(), clearAssumptionsOfUsers(), llvm::CloneAndPruneIntoFromInst(), llvm::CloneFunctionInto(), clusterSortPtrAccesses(), llvm::OpenMPIRBuilder::OutlineInfo::collectBlocks(), collectCastInstrs(), llvm::CodeMetrics::collectEphemeralValues(), collectEscapedLocals(), collectHomogenousInstGraphLoopInvariants(), llvm::LoopVectorizationCostModel::collectInLoopReductions(), collectInstructionsInBetween(), collectLeaves(), collectMDInDomain(), collectPHINodes(), collectPromotionCandidates(), collectSRATypes(), collectTransitivePredecessors(), llvm::FunctionComparator::compare(), llvm::DomTreeNodeBase< NodeT >::compare(), completeEphemeralValues(), llvm::InstCombiner::computeBackEdges(), computeFunctionSummary(), computeHeuristicUnrollFactor(), ComputeLiveInBlocks(), llvm::computeMinimumValueSizes(), computePath(), ComputePostOrders(), computeUnlikelySuccessors(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), ConstHasGlobalValuePredicate(), llvm::containsIrreducibleCFG(), llvm::SelectionDAG::copyExtraInfo(), llvm::AbstractDependenceGraphBuilder< GraphType >::createDefUseEdges(), llvm::EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(), llvm::DomTreeUpdater::deleteBB(), llvm::MachineDomTreeUpdater::deleteBB(), llvm::detachDeadBlocks(), determinePointerAccessAttrs(), llvm::AsmPrinter::doFinalization(), dominatesMergePoint(), DumpNodesr(), llvm::SMSchedule::earliestCycleInChain(), llvm::AsmPrinter::emitJumpTableInfo(), llvm::VETargetLowering::emitSjLjDispatchBlock(), llvm::Evaluator::EvaluateFunction(), llvm::ScalarEvolution::ExitLimit::ExitLimit(), llvm::filterDeadComdatFunctions(), llvm::DIBuilder::finalize(), finalizeLinkage(), llvm::SPIRVTargetLowering::finalizeLowering(), FindAllMemoryUses(), llvm::findAllocaForValue(), findArgParts(), findBBsToSinkInto(), findBestInsertionSet(), findBestNonTrivialUnswitchCandidate(), findDbgIntrinsics(), findDependencies(), findExtractedOutputToOverallOutputMapping(), llvm::MustBeExecutedContextExplorer::findForwardJoinPoint(), llvm::FindFunctionBackedges(), findLoopComponents(), llvm::HexagonInstrInfo::findLoopInstr(), findNonImmUse(), findPartitions(), llvm::findPHICopyInsertPoint(), findRefEdges(), FindUsedValues(), findUsedValues(), llvm::findValuesAffectedByCondition(), llvm::InstCombinerImpl::foldDeadPhiWeb(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), foldMemChr(), llvm::memtag::forAllReachableExits(), forEachUser(), llvm::ScalarEvolution::forgetBlockAndLoopDispositions(), llvm::ScalarEvolution::forgetValue(), llvm::formDedicatedExitBlocks(), llvm::FunctionPropertiesUpdater::FunctionPropertiesUpdater(), gatherPossiblyVectorizableLoads(), llvm::MCResourceInfo::gatherResourceInfo(), generateReproducer(), getAppleRuntimeUnrollPreferences(), llvm::Attributor::getAssumedSimplifiedValues(), getCallArgsTotalAllocaSize(), getEdgeKind(), llvm::BasicTTIImplBase< T >::getEstimatedNumberOfCaseClusters(), llvm::ReachingDefAnalysis::getGlobalReachingDefs(), llvm::ReachingDefAnalysis::getGlobalUses(), llvm::ReachingDefAnalysis::getLiveOuts(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatch(), llvm::LexicalScopes::getMachineBasicBlocks(), llvm::MDNode::getMostGenericAliasScope(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), llvm::BasicTTIImplBase< T >::getOperandsScalarizationOverhead(), getOutliningPenalty(), getPostIndexedLoadStoreOp(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), GetStringLengthH(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), getTypeSizeImpl(), llvm::getUnderlyingObjectAggressive(), llvm::getUnderlyingObjects(), llvm::getUnderlyingObjectsForCodeGen(), llvm::getUniqueExitBlocksHelper(), getUnsignedMonotonicValues(), getUnwindDestToken(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::guessSuccessors(), HandleInlinedLandingPad(), HandleMergeInputChains(), HasAddressTaken(), hasCFUser(), hasConcreteDef(), hasConcreteDefImpl(), hasHardUserWithinLoop(), llvm::hasPartialIVCondition(), llvm::SDNode::hasPredecessorHelper(), hoistPreviousBeforeFORUsers(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::df_iterator_default_set< NodeRef, SmallSize >::insert(), llvm::MemorySSAUpdater::insertDef(), llvm::LazyCallGraph::RefSCC::insertIncomingRefEdge(), InsertIntrinsicCalls(), InsertRootInitializers(), isAllDILocation(), llvm::LazyCallGraph::RefSCC::isAncestorOf(), llvm::LazyCallGraph::SCC::isAncestorOf(), llvm::Loop::isAnnotatedParallel(), llvm::IsBlockFollowedByDeoptOrUnreachable(), isBlockValidForExtraction(), isConstReg(), isDereferenceableAndAlignedPointer(), isDILocationReachable(), isEphemeralValueOf(), llvm::RecurrenceDescriptor::isFixedOrderRecurrence(), llvm::isGuardAsWidenableBranch(), isHighCostExpansion(), isInertARCValue(), isKnownNonNullFromDominatingCondition(), llvm::LiveVariables::isLiveOut(), isNonEqualPHIs(), isNonEscapingGlobalNoAliasWithLoad(), isObjectSizeLessThanOrEq(), isOnlyCopiedFromConstantMemory(), isPotentiallyReachable(), isReachableAmongDominated(), isReachableImpl(), llvm::isSafeToDestroyConstant(), isSafeToMove(), llvm::isSafeToMoveBefore(), IsScalarTBAANodeImpl(), isSignExtendedW(), isSimpleEnoughValueToCommit(), llvm::sandboxir::Type::isSized(), IsStoredObjCPointer(), isSuccOrder(), isUniformlyReached(), iterativelySimplifyCFG(), llvm::SMSchedule::latestCycleInChain(), llvm::LazyCallGraph::LazyCallGraph(), llvm::SelectionDAG::Legalize(), llvm::SelectionDAG::LegalizeOp(), LinearizeExprTree(), lookThroughAnd(), llvm::LoopBase< BlockT, LoopT >::LoopBase(), markAliveBlocks(), MarkBlocksLiveIn(), llvm::ARMFunctionInfo::markGlobalAsPromotedToConstantPool(), llvm::LiveRangeEdit::markRematerialized(), llvm::CombinerHelper::matchExtendThroughPhis(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), mergeConditionalStores(), llvm::SelectionDAG::MorphNodeTo(), llvm::nonStrictlyPostDominate(), llvm::SmallPtrSet< PtrType, SmallSize >::operator=(), optimizeGlobalsInModule(), optimizeLoopExitWithUnknownExitCount(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::Thumb2InstrInfo::optimizeSelect(), llvm::RISCVInstrInfo::optimizeSelect(), parseCondition(), partitionLoopBlocks(), partitionOuterLoopBlocks(), peelToTurnInvariantLoadsDerefencebale(), PeepholePPC64ZExtGather(), PerformMVEVLDCombine(), performNEONPostLDSTCombine(), performPostLD1Combine(), PHIsEqualValue(), llvm::InstCombinerImpl::prepareWorklist(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processBlockAddr(), processHeaderPhiOperands(), PushDefUseChildren(), PushLoopPHIs(), rebuildLoopAfterUnswitch(), recomputeLoopBlockSet(), recordConditions(), llvm::RecursivelyDeleteDeadPHINode(), recursivelyDeleteDeadRecipes(), recursivelyVisitUsers(), llvm::AssumptionCache::registerAssumption(), llvm::AMDGPU::removeFnAttrFromReachable(), llvm::SCCPSolver::removeNonFeasibleEdges(), llvm::objcopy::macho::Object::removeSections(), removeSwitchAfterSelectFold(), llvm::LiveRange::RenumberValues(), llvm::slpvectorizer::BoUpSLP::VLOperands::reorder(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), replaceLoopPHINodesWithPreheaderValues(), llvm::replaceSignedInst(), rewriteAccessChain(), llvm::SSAUpdaterBulk::RewriteAllUses(), rewriteDebugUsers(), rollbackRestoreSplit(), llvm::MemDerefPrinterPass::run(), llvm::LoopFullUnrollPass::run(), llvm::OpenMPOptPass::run(), llvm::HipStdParAcceleratorCodeSelectionPass::run(), runImpl(), llvm::JumpThreadingPass::runImpl(), runMoveAutoInit(), llvm::SPIRVMergeRegionExitTargets::runOnConvergenceRegionNoRecurse(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::MCAssembler::setIsThumbFunc(), llvm::DbgVariableRecord::setKillLocation(), llvm::DbgVariableIntrinsic::setKillLocation(), setLoopComponents(), llvm::AbstractDependenceGraphBuilder< GraphType >::simplify(), simplifyLoopInst(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), simplifyRecipe(), sink(), sinkCommonCodeFromPredecessors(), sinkInstruction(), sinkLifetimeStartMarkers(), sinkRecurrenceUsersAfterPrevious(), llvm::LoopNest::skipEmptyBlockUntil(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet(), SoleWriteToDeadLocal(), sortOpts(), llvm::SplitBlockAndInsertIfThenElse(), llvm::splitBlockBefore(), SplitBlockImpl(), SRAGlobal(), stripDebugLocFromLoopID(), StripPointerGEPsAndCasts(), switchToLookupTable(), llvm::IVStrideUse::transformToPostInc(), tryInterleave(), tryToElideArgumentCopy(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::InstCombinerImpl::tryToSinkInstructionDbgVariableRecords(), tryToSplitRestore(), llvm::UnrollAndJamLoop(), unswitchAllTrivialConditions(), unswitchTrivialSwitch(), UpdateAnalysisInformation(), updateCallerBFI(), updateCGAndAnalysisManagerForPass(), updateForAIXShLibTLSModelOpt(), updateLiveness(), updatePredecessorProfileMetadata(), UpdateSSA(), usersDominator(), llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), ValidateMVEStore(), valueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::ScalarEvolution::verify(), llvm::AssumptionCacheTracker::verifyAnalysis(), llvm::GenericCycle< ContextT >::verifyCycle(), visit(), visitDomSubTree(), llvm::InstCombinerImpl::visitLandingPadInst(), llvm::InstCombinerImpl::visitPHINode(), visitPointers(), llvm::LazyCallGraph::visitReferences(), llvm::TBAAVerifier::visitTBAAMetadata(), llvm::yaml::WebAssemblyFunctionInfo::WebAssemblyFunctionInfo(), llvm::VirtRegAuxInfo::weightCalcHelper(), llvm::PredicateInfo::~PredicateInfo(), and llvm::VPInterleavedAccessInfo::~VPInterleavedAccessInfo().

◆ insert() [4/4]

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

Definition at line 468 of file SmallPtrSet.h.

References llvm::SmallPtrSetImpl< PtrType >::insert().

◆ remove_if()

template<typename PtrType >
template<typename UnaryPredicate >
bool llvm::SmallPtrSetImpl< PtrType >::remove_if ( UnaryPredicate  P)
inline

Remove elements that match the given predicate.

This method is a safe replacement for the following pattern, which is not valid, because the erase() calls would invalidate the iterator:

for (PtrType *Ptr : Set)
  if (Pred(P))
    Set.erase(P);

Returns whether anything was removed. It is safe to read the set inside the predicate function. However, the predicate must not modify the set itself, only indicate a removal by returning true.

Definition at line 418 of file SmallPtrSet.h.

References llvm::SmallPtrSetImplBase::CurArray, E, llvm::SmallPtrSetImplBase::EndPointer(), llvm::SmallPtrSetImplBase::getEmptyMarker(), llvm::SmallPtrSetImplBase::getTombstoneMarker(), llvm::DebugEpochBase::incrementEpoch(), llvm::SmallPtrSetImplBase::isSmall(), llvm::SmallPtrSetImplBase::NumNonEmpty, llvm::SmallPtrSetImplBase::NumTombstones, P, and Ptr.

◆ SmallPtrSetImplBase() [1/3]

template<typename PtrType >
SmallPtrSetImplBase::SmallPtrSetImplBase ( const void **  SmallStorage,
const SmallPtrSetImplBase that 
)
protected

Definition at line 71 of file SmallPtrSet.cpp.

◆ SmallPtrSetImplBase() [2/3]

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

Definition at line 76 of file SmallPtrSet.h.

◆ SmallPtrSetImplBase() [3/3]

template<typename PtrType >
SmallPtrSetImplBase::SmallPtrSetImplBase ( const void **  SmallStorage,
unsigned  SmallSize,
const void **  RHSSmallStorage,
SmallPtrSetImplBase &&  that 
)
protected

Definition at line 73 of file SmallPtrSet.cpp.


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