LLVM 22.0.0git
|
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< DIScope *, 8 >, llvm::SmallPtrSet< llvm::MachineBasicBlock *, 16 >, llvm::SmallPtrSet< llvm::LiveRange *, 8 >, llvm::SmallPtrSet< const llvm::AllocaInst *, 8 >, llvm::SmallPtrSet< const Instruction *, 16 >, 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< const llvm::Value *, 32 >, llvm::SmallPtrSet< llvm::GlobalVariable *, 8 >, llvm::SmallPtrSet< llvm::Constant *, 8 >, llvm::SmallPtrSet< llvm::GlobalValue *, 4 >, 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::Function *, 8 >, llvm::SmallPtrSet< llvm::InterleaveGroup< llvm::Instruction > *, 4 >, llvm::SmallPtrSet< llvm::BasicBlock *, 16 >, llvm::SmallPtrSet< llvm::Module *, 4 >, llvm::SmallPtrSet< llvm::MachineInstr *, 32 >, llvm::SmallPtrSet< const llvm::VNInfo *, 4 >, llvm::SmallPtrSet< llvm::MachineInstr *, 16 >, 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::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 >, llvm::SmallPtrSet< const llvm::Value *, 4 >, and llvm::SmallPtrSet< PtrType, SmallSize >.
Public Types | |
using | iterator = SmallPtrSetIterator< PtrType > |
using | const_iterator = SmallPtrSetIterator< PtrType > |
using | key_type = ConstPtrType |
using | value_type = PtrType |
![]() | |
using | size_type = unsigned |
Public Member Functions | |
SmallPtrSetImpl (const SmallPtrSetImpl &)=delete | |
std::pair< iterator, bool > | insert (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) |
template<typename Range > | |
void | insert_range (Range &&R) |
iterator | begin () const |
iterator | end () const |
![]() | |
SmallPtrSetImplBase & | operator= (const SmallPtrSetImplBase &)=delete |
bool | empty () const |
size_type | size () const |
size_type | capacity () const |
void | clear () |
void | reserve (size_type NewNumEntries) |
![]() | |
void | incrementEpoch () |
Protected Member Functions | |
LLVM_ABI | SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that) |
LLVM_ABI | SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&that) |
SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize) | |
![]() | |
LLVM_ABI | SmallPtrSetImplBase (const void **SmallStorage, const SmallPtrSetImplBase &that) |
LLVM_ABI | SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&that) |
SmallPtrSetImplBase (const void **SmallStorage, unsigned SmallSize) | |
~SmallPtrSetImplBase () | |
const void ** | EndPointer () const |
iterator_range< const void ** > | small_buckets () |
iterator_range< const void *const * > | small_buckets () const |
iterator_range< const void ** > | buckets () |
iterator_range< const void *const * > | buckets () const |
std::pair< const void *const *, bool > | insert_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 *const * | find_imp (const void *Ptr) const |
Returns the raw pointer needed to construct an iterator. | |
bool | contains_imp (const void *Ptr) const |
bool | isSmall () const |
LLVM_ABI void | swap (const void **SmallStorage, const void **RHSSmallStorage, SmallPtrSetImplBase &RHS) |
swap - Swaps the elements of two sets. | |
LLVM_ABI void | copyFrom (const void **SmallStorage, const SmallPtrSetImplBase &RHS) |
LLVM_ABI void | moveFrom (const void **SmallStorage, unsigned SmallSize, const void **RHSSmallStorage, SmallPtrSetImplBase &&RHS) |
Additional Inherited Members | |
![]() | |
static void * | getTombstoneMarker () |
static void * | getEmptyMarker () |
![]() | |
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 | NumEntries |
Number of elements in CurArray that contain a value. | |
unsigned | NumTombstones |
Number of tombstones in CurArray. | |
bool | IsSmall |
Whether the set is in small representation. | |
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 380 of file SmallPtrSet.h.
using llvm::SmallPtrSetImpl< PtrType >::const_iterator = SmallPtrSetIterator<PtrType> |
Definition at line 391 of file SmallPtrSet.h.
using llvm::SmallPtrSetImpl< PtrType >::iterator = SmallPtrSetIterator<PtrType> |
Definition at line 390 of file SmallPtrSet.h.
using llvm::SmallPtrSetImpl< PtrType >::key_type = ConstPtrType |
Definition at line 392 of file SmallPtrSet.h.
using llvm::SmallPtrSetImpl< PtrType >::value_type = PtrType |
Definition at line 393 of file SmallPtrSet.h.
|
delete |
|
inline |
Definition at line 494 of file SmallPtrSet.h.
References llvm::SmallPtrSetImplBase::CurArray, llvm::SmallPtrSetImplBase::EndPointer(), and llvm::shouldReverseIterate().
Referenced by llvm::AArch64TargetMachine::clearLinkerOptimizationHints(), collectInstructionsInBetween(), ComputeLiveInBlocks(), convertFSqrtDivIntoFMul(), llvm::objcarc::findSingleDependency(), isFSqrtDivToFMulLegal(), iterativelySimplifyCFG(), llvm::MergeBlockSuccessorsIntoGivenBlocks(), llvm::ARMConstantPoolConstant::promotedGlobals(), llvm::SCCPSolver::removeNonFeasibleEdges(), removeUnusedBlocksFromParent(), llvm::AbstractDependenceGraphBuilder< GraphType >::simplify(), simplifyBlends(), and llvm::LLVMContextImpl::~LLVMContextImpl().
|
inline |
Definition at line 476 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::MemoryDepChecker::areDepsSafe(), llvm::calculateRegisterUsageForPlan(), llvm::ScalarEvolution::canReuseInstruction(), llvm::AArch64FunctionInfo::clearLinkerOptimizationHints(), llvm::CloneAndPruneIntoFromInst(), clusterSortPtrAccesses(), collectPromotionCandidates(), llvm::CommonPointerBase::compute(), llvm::InstCombiner::computeBackEdges(), dominatesMergePoint(), llvm::ScalarEvolution::ExitLimit::ExitLimit(), llvm::filterDeadComdatFunctions(), llvm::findPHICopyInsertPoint(), foldCondBranchOnValueKnownInPredecessorImpl(), llvm::memtag::forAllReachableExits(), gatherPossiblyVectorizableLoads(), llvm::LLVMContext::generateMachineFunctionNum(), generateNewInstTree(), llvm::SCEVExpander::getAllInsertedInstructions(), getAppleRuntimeUnrollPreferences(), llvm::MDNode::getMostGenericAliasScope(), llvm::getRange(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::GenericUniformityAnalysisImpl< ContextT >::hasDivergentTerminator(), llvm::hasPartialIVCondition(), llvm::PreservedAnalyses::intersect(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::isBBPendingDeletion(), isConstReg(), llvm::FunctionSpecializer::isDeadFunction(), llvm::GenericUniformityAnalysisImpl< ContextT >::isDivergent(), llvm::slpvectorizer::BoUpSLP::isGathered(), AliasScopeTracker::isNoAliasScopeDeclDead(), llvm::slpvectorizer::BoUpSLP::isNotScheduled(), isReachableImpl(), llvm::ModifiedPostOrder< ContextT >::isReducibleCycleHeader(), mayLoopAccessLocation(), llvm::MergeBlockIntoPredecessor(), mergeReplicateRegionsIntoSuccessors(), llvm::SMSchedule::normalizeNonPipelinedInstructions(), peelToTurnInvariantLoadsDerefencebale(), preparePlanForMainVectorLoop(), llvm::SCCPSolver::removeNonFeasibleEdges(), removeUnreachableFunctions(), llvm::slpvectorizer::BoUpSLP::VLOperands::reorder(), rewriteFunction(), llvm::LoopFullUnrollPass::run(), simplifyICmpUsingMonotonicValues(), StripSymbolNames(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), UpdatePHINodes(), useFuncSeen(), ValidateMVEStore(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::ScalarEvolution::verify(), and visit().
|
inline |
count - Return 1 if the specified pointer is in the set, 0 otherwise.
Definition at line 470 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(), bothUsedInPHI(), buildClonedLoops(), llvm::calculateRegisterUsageForPlan(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), CanPropagatePredecessorsForPHIs(), canProveExitOnFirstIteration(), CanRedirectPredsOfEmptyBBToSucc(), checkForCyclesHelper(), checkOuterLoopInsts(), checkPHIs(), collectCastInstrs(), collectLeaves(), llvm::DomTreeNodeBase< NodeT >::compare(), completeEphemeralValues(), ComputeLiveInBlocks(), llvm::computeMinimumValueSizes(), ComputePostOrders(), llvm::SMSchedule::computeUnpipelineableNodes(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::containsIrreducibleCFG(), llvm::OpenMPIRBuilder::createParallel(), deleteIfDead(), determinePointerAccessAttrs(), llvm::LiveRangeEdit::didRematerialize(), dominatesMergePoint(), llvm::SMSchedule::earliestCycleInChain(), llvm::EliminateUnreachableBlocks(), llvm::LoopVectorizationCostModel::expectedCost(), llvm::findAllocaForValue(), findBestInsertionSet(), findBestNonTrivialUnswitchCandidate(), findConsecutiveLoad(), findDependencies(), llvm::FindFunctionBackedges(), foldTwoEntryPHINode(), llvm::ReachingDefAnalysis::getGlobalUses(), llvm::ReachingDefAnalysis::getLiveOuts(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatch(), getSingleLiveInSuccBB(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), getTrueOrFalseValue(), getUnwindDestToken(), llvm::RecurrenceDescriptor::hasMultipleUsesOf(), llvm::hasOutsideLoopUser(), llvm::SDNode::hasPredecessorHelper(), hasSameSuccessors(), hoistAndMergeSGPRInits(), 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(), programUndefinedIfUndefOrPoison(), recomputeLoopBlockSet(), recordConditions(), llvm::objcopy::macho::Object::removeSections(), llvm::removeUnreachableBlocks(), removeUnusedBlocksFromParent(), llvm::MachineRegisterInfo::resetDelegate(), llvm::SCCPInstVisitor::resetLatticeValueFor(), rewriteDebugUsers(), llvm::MemDerefPrinterPass::run(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), runImpl(), runMoveAutoInit(), 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::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::AssumptionCacheTracker::verifyAnalysis(), verifyCTRBranch(), llvm::GenericCycle< ContextT >::verifyCycle(), llvm::MemorySSA::verifyDominationNumbers(), llvm::yaml::WebAssemblyFunctionInfo::WebAssemblyFunctionInfo(), and llvm::MemorySSAUpdater::wireOldPredecessorsToNewImmediatePredecessor().
|
inline |
Definition at line 499 of file SmallPtrSet.h.
References llvm::SmallPtrSetImplBase::EndPointer().
Referenced by ComputeLiveInBlocks(), iterativelySimplifyCFG(), llvm::ARMConstantPoolConstant::promotedGlobals(), removeUnusedBlocksFromParent(), and llvm::AbstractDependenceGraphBuilder< GraphType >::simplify().
|
inline |
Remove pointer from the set.
Returns whether the pointer was in the set. Invalidates iterators if true is returned. To remove elements while iterating over the set, use remove_if() instead.
Definition at line 418 of file SmallPtrSet.h.
References llvm::SmallPtrSetImplBase::erase_imp(), and Ptr.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), buildClonedLoops(), llvm::calculateRegisterUsageForPlan(), checkForCyclesHelper(), collectInstructionsInBetween(), ComputePostOrders(), llvm::FindFunctionBackedges(), getGatherLanePattern(), IsValueFullyAvailableInBlock(), llvm::SelectionDAG::Legalize(), llvm::MergeBlockSuccessorsIntoGivenBlocks(), optimizeLoopExitWithUnknownExitCount(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::RISCVInstrInfo::optimizeSelect(), rebuildLoopAfterUnswitch(), llvm::LoopBase< BlockT, LoopT >::removeBlockFromLoop(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), llvm::MachineRegisterInfo::resetDelegate(), llvm::AbstractDependenceGraphBuilder< GraphType >::simplify(), sinkCommonCodeFromPredecessors(), and llvm::MemorySSA::verifyDominationNumbers().
|
inline |
Definition at line 473 of file SmallPtrSet.h.
References llvm::SmallPtrSetImplBase::find_imp(), and 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 409 of file SmallPtrSet.h.
References llvm::SmallPtrSetImpl< PtrType >::insert(), and Ptr.
|
inline |
Definition at line 481 of file SmallPtrSet.h.
References E, I, and llvm::SmallPtrSetImpl< PtrType >::insert().
|
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 401 of file SmallPtrSet.h.
References llvm::SmallPtrSetImplBase::insert_imp(), and Ptr.
Referenced by llvm::AAExecutionDomain::ExecutionDomainTy::addAlignedBarrier(), addArgumentAttrs(), addArgumentReturnedAttrs(), llvm::SCCPInstVisitor::addArgumentTrackedFunction(), llvm::AAExecutionDomain::ExecutionDomainTy::addAssumeInst(), llvm::LoopBase< BlockT, LoopT >::addBlockEntry(), addColdAttrs(), llvm::MachineRegisterInfo::addDelegate(), addFullyUnrolledInstructionsToIgnore(), addMemoryAttrs(), addNoAliasAttrs(), addNonNullAttrs(), addNoRecurseAttrs(), addNoReturnAttrs(), addNoUndefAttrs(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::cl::Option::addSubCommand(), llvm::SCCPInstVisitor::addToMustPreserveReturnsInFunctions(), llvm::SCCPInstVisitor::addTrackedFunction(), llvm::IVUsers::AddUsersIfInteresting(), addWillReturn(), llvm::slpvectorizer::BoUpSLP::ShuffleInstructionBuilder::adjustExtracts(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::PreservedAnalyses::all(), llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(), AllUsesOfValueWillTrapIfNull(), alwaysInlineImpl(), analyzeGlobalAux(), llvm::InterleavedAccessInfo::analyzeInterleaving(), llvm::ModifiedPostOrder< ContextT >::appendBlock(), appendSpeculatableOperands(), llvm::OpenMPIRBuilder::applySimd(), llvm::MemoryDepChecker::areDepsSafe(), blockIsSimpleEnoughToThreadThrough(), buildClonedLoopBlocks(), buildClonedLoops(), llvm::SampleProfileLoaderBaseImpl< FT >::buildEdges(), llvm::slpvectorizer::BoUpSLP::buildExternalUses(), llvm::buildModuleSummaryIndex(), llvm::IDFCalculatorBase< NodeTy, IsPostDom >::calculate(), llvm::calculateRegisterUsageForPlan(), llvm::DomTreeUpdater::callbackDeleteBB(), llvm::CallGraphDOTInfo::CallGraphDOTInfo(), canFoldStoreIntoLibCallOutputPointers(), llvm::LoopVectorizationLegality::canFoldTailByMasking(), canonicalizePHIOperands(), canProveExitOnFirstIteration(), canRenameUntilSecondLoad(), canRenameUpToDef(), llvm::canReturn(), llvm::ScalarEvolution::canReuseInstruction(), llvm::changeToUnreachable(), llvm::PatternMatch::undef_match::check(), llvm::Attributor::checkForAllUses(), checkForCyclesHelper(), checkIfSupported(), checkMixedPrecision(), checkPHIs(), CleanupConstantGlobalUsers(), clearAssumptionsOfUsers(), llvm::CloneAndPruneIntoFromInst(), llvm::CloneFunctionInto(), clusterSortPtrAccesses(), collectBlockUseDef(), collectCastInstrs(), llvm::CodeMetrics::collectEphemeralValues(), collectEscapedLocals(), collectHomogenousInstGraphLoopInvariants(), llvm::LoopVectorizationCostModel::collectInLoopReductions(), collectInstructionsInBetween(), collectLeaves(), collectMDInDomain(), collectPHINodes(), collectPromotionCandidates(), llvm::VPRecipeBuilder::collectScaledReductions(), llvm::ScopedNoAliasAAResult::collectScopedDomains(), collectSRATypes(), collectTransitivePredecessors(), llvm::FunctionComparator::compare(), llvm::DomTreeNodeBase< NodeT >::compare(), completeEphemeralValues(), llvm::CommonPointerBase::compute(), llvm::InstCombiner::computeBackEdges(), llvm::VPReplicateRecipe::computeCost(), computeFunctionSummary(), computeHeuristicUnrollFactor(), ComputeLiveInBlocks(), llvm::computeMinimumValueSizes(), computePath(), ComputePostOrders(), computeUnlikelySuccessors(), llvm::SMSchedule::computeUnpipelineableNodes(), llvm::JumpThreadingPass::computeValueKnownInPredecessorsImpl(), llvm::ConstantFoldTerminator(), ConstHasGlobalValuePredicate(), llvm::containsIrreducibleCFG(), llvm::SelectionDAG::copyExtraInfo(), llvm::AbstractDependenceGraphBuilder< GraphType >::createDefUseEdges(), llvm::DomTreeUpdater::deleteBB(), llvm::MachineDomTreeUpdater::deleteBB(), deriveAttrsInPostOrder(), despeculateCountZeros(), llvm::detachDeadBlocks(), determinePointerAccessAttrs(), llvm::AsmPrinter::doFinalization(), dominatesMergePoint(), DumpNodesr(), llvm::SMSchedule::earliestCycleInChain(), llvm::VETargetLowering::emitSjLjDispatchBlock(), llvm::Evaluator::EvaluateFunction(), llvm::ScalarEvolution::ExitLimit::ExitLimit(), feedsIntoVectorReduction(), llvm::filterDeadComdatFunctions(), llvm::DIBuilder::finalize(), llvm::SPIRVTargetLowering::finalizeLowering(), FindAllMemoryUses(), llvm::findAllocaForValue(), findArgParts(), findBBsToSinkInto(), findBestNonTrivialUnswitchCandidate(), findConsecutiveLoad(), findDbgIntrinsics(), findDependencies(), findExtractedOutputToOverallOutputMapping(), llvm::MustBeExecutedContextExplorer::findForwardJoinPoint(), llvm::FindFunctionBackedges(), findLoopComponents(), llvm::HexagonInstrInfo::findLoopInstr(), findNonImmUse(), findPartitions(), llvm::findPHICopyInsertPoint(), findReaching(), findRefEdges(), FindUsedValues(), findUsedValues(), llvm::findValuesAffectedByCondition(), llvm::InstCombinerImpl::foldDeadPhiWeb(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), foldMemChr(), foldURemOfLoopIncrement(), llvm::memtag::forAllReachableExits(), forEachUser(), llvm::ScalarEvolution::forgetBlockAndLoopDispositions(), llvm::ScalarEvolution::forgetValue(), llvm::formDedicatedExitBlocks(), llvm::FunctionPropertiesUpdater::FunctionPropertiesUpdater(), gatherPossiblyVectorizableLoads(), generateReproducer(), getAppleRuntimeUnrollPreferences(), llvm::Attributor::getAssumedSimplifiedValues(), getCallArgsTotalAllocaSize(), getContinueBlocks(), getEdgeKind(), llvm::BasicTTIImplBase< T >::getEstimatedNumberOfCaseClusters(), getFSqrtDivOptPattern(), getGatherLanePattern(), llvm::ReachingDefAnalysis::getGlobalReachingDefs(), llvm::ReachingDefAnalysis::getGlobalUses(), getHeaderBlocks(), llvm::ReachingDefAnalysis::getLiveOuts(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatch(), llvm::LexicalScopes::getMachineBasicBlocks(), getMergeBlocks(), llvm::MDNode::getMergedCalleeTypeMetadata(), llvm::MDNode::getMostGenericAliasScope(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), getOutliningPenalty(), getPostIndexedLoadStoreOp(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), GetStringLengthH(), llvm::AMDGPU::getTransitiveUsesOfLDS(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), getTypeSizeImpl(), llvm::getUnderlyingObjectAggressive(), llvm::getUnderlyingObjects(), llvm::getUnderlyingObjectsForCodeGen(), llvm::getUniqueExitBlocksHelper(), getUnsignedMonotonicValues(), getUnwindDestToken(), llvm::slpvectorizer::BoUpSLP::getVectorElementSize(), llvm::guessSuccessors(), HandleInlinedLandingPad(), HandleMergeInputChains(), hasCFUser(), hasConcreteDef(), hasConcreteDefImpl(), hasHardUserWithinLoop(), llvm::hasPartialIVCondition(), llvm::SDNode::hasPredecessorHelper(), hoistAndMergeSGPRInits(), hoistPreviousBeforeFORUsers(), llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::df_iterator_default_set< NodeRef, SmallSize >::insert(), llvm::SmallPtrSetImpl< PtrType >::insert_range(), llvm::MemorySSAUpdater::insertDef(), llvm::LazyCallGraph::RefSCC::insertIncomingRefEdge(), InsertIntrinsicCalls(), InsertRootInitializers(), isAllDILocation(), llvm::LazyCallGraph::RefSCC::isAncestorOf(), llvm::LazyCallGraph::SCC::isAncestorOf(), llvm::Loop::isAnnotatedParallel(), llvm::IsBlockFollowedByDeoptOrUnreachable(), isBlockValidForExtraction(), llvm::AMDGPU::isClobberedInFunction(), isConstReg(), isDereferenceableAndAlignedPointer(), isDILocationReachable(), isEphemeralValueOf(), llvm::RecurrenceDescriptor::isFixedOrderRecurrence(), llvm::isGuardAsWidenableBranch(), isHighCostExpansion(), isInertARCValue(), isKnownNonNullFromDominatingCondition(), llvm::LiveVariables::isLiveOut(), isLoadCombineCandidate(), isNonEqualPHIs(), isNonEscapingGlobalNoAliasWithLoad(), isObjectSizeLessThanOrEq(), isOnlyCopiedFromConstantMemory(), isPotentiallyReachable(), isReachableAmongDominated(), isReachableImpl(), llvm::isSafeToDestroyConstant(), isSafeToMove(), llvm::isSafeToMoveBefore(), IsScalarTBAANodeImpl(), isSignExtendedW(), isSimpleEnoughValueToCommit(), llvm::sandboxir::Type::isSized(), IsStoredObjCPointer(), isSuccOrder(), isUniformlyReached(), IsValueFullyAvailableInBlock(), iterativelySimplifyCFG(), llvm::SMSchedule::latestCycleInChain(), llvm::LazyCallGraph::LazyCallGraph(), llvm::SelectionDAG::Legalize(), llvm::SelectionDAG::LegalizeOp(), liesBetween(), LinearizeExprTree(), lookThroughAnd(), llvm::LoopBase< BlockT, LoopT >::LoopBase(), markAliveBlocks(), MarkBlocksLiveIn(), llvm::ARMFunctionInfo::markGlobalAsPromotedToConstantPool(), llvm::LiveRangeEdit::markRematerialized(), llvm::CombinerHelper::matchExtendThroughPhis(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), mergeConditionalStores(), mergeReplicateRegionsIntoSuccessors(), llvm::SelectionDAG::MorphNodeTo(), llvm::mustExecuteUBIfPoisonOnPathTo(), llvm::nonStrictlyPostDominate(), llvm::SmallPtrSet< PtrType, SmallSize >::operator=(), optimizeGlobalsInModule(), optimizeLoopExitWithUnknownExitCount(), llvm::LanaiInstrInfo::optimizeSelect(), llvm::ARMBaseInstrInfo::optimizeSelect(), llvm::Thumb2InstrInfo::optimizeSelect(), llvm::RISCVInstrInfo::optimizeSelect(), parseCondition(), partitionLoopBlocks(), PeepholePPC64ZExtGather(), PerformMVEVLDCombine(), performNEONPostLDSTCombine(), performPostLD1Combine(), PHIsEqualValue(), llvm::PointerMayBeCaptured(), preparePlanForMainVectorLoop(), llvm::InstCombinerImpl::prepareWorklist(), llvm::AlignmentFromAssumptionsPass::processAssumption(), processBlockAddr(), processHeaderPhiOperands(), programUndefinedIfUndefOrPoison(), llvm::SwiftErrorValueTracking::propagateVRegs(), PushDefUseChildren(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), 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(), replaceAllUsesWith(), replaceLoopPHINodesWithPreheaderValues(), llvm::replaceSignedInst(), rewriteAccessChain(), llvm::SSAUpdaterBulk::RewriteAllUses(), rewriteDebugUsers(), rollbackRestoreSplit(), llvm::MemDerefPrinterPass::run(), llvm::OpenMPOptPass::run(), llvm::HipStdParAcceleratorCodeSelectionPass::run(), runImpl(), runMoveAutoInit(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::MCAssembler::setIsThumbFunc(), llvm::DbgVariableRecord::setKillLocation(), llvm::DbgVariableIntrinsic::setKillLocation(), setLoopComponents(), llvm::AbstractDependenceGraphBuilder< GraphType >::simplify(), simplifyBlends(), llvm::simplifyInstruction(), simplifyLoopInst(), simplifyOneLoop(), llvm::JumpThreadingPass::simplifyPartiallyRedundantLoad(), sink(), sinkInstruction(), sinkLifetimeStartMarkers(), sinkRecurrenceUsersAfterPrevious(), llvm::LoopNest::skipEmptyBlockUntil(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), llvm::SmallPtrSet< PtrType, SmallSize >::SmallPtrSet(), SoleWriteToDeadLocal(), sortOpts(), llvm::splitBlockBefore(), SplitBlockImpl(), SRAGlobal(), stripDebugLocFromLoopID(), StripPointerGEPsAndCasts(), switchToLookupTable(), llvm::IVStrideUse::transformToPostInc(), tryInterleave(), tryToElideArgumentCopy(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), llvm::InstCombinerImpl::tryToSinkInstructionDbgVariableRecords(), tryToSplitRestore(), unswitchAllTrivialConditions(), unswitchTrivialSwitch(), UpdateAnalysisInformation(), updateCallerBFI(), updateCGAndAnalysisManagerForPass(), updateForAIXShLibTLSModelOpt(), updateLiveness(), updatePredecessorProfileMetadata(), UpdateSSA(), llvm::UpgradeNVVMAnnotations(), usersDominator(), llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), ValidateMVEStore(), valueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::ScalarEvolution::verify(), llvm::AssumptionCacheTracker::verifyAnalysis(), verifyCTRBranch(), llvm::GenericCycle< ContextT >::verifyCycle(), visit(), visitDomSubTree(), llvm::InstCombinerImpl::visitLandingPadInst(), llvm::InstCombinerImpl::visitPHINode(), visitPointers(), llvm::LazyCallGraph::visitReferences(), llvm::TBAAVerifier::visitTBAAMetadata(), llvm::yaml::WebAssemblyFunctionInfo::WebAssemblyFunctionInfo(), and llvm::VirtRegAuxInfo::weightCalcHelper().
|
inline |
Definition at line 486 of file SmallPtrSet.h.
References llvm::SmallPtrSetImpl< PtrType >::insert().
|
inline |
Definition at line 490 of file SmallPtrSet.h.
References llvm::adl_begin(), llvm::adl_end(), and llvm::SmallPtrSetImpl< PtrType >::insert().
Referenced by AddAliasScopeMetadata(), llvm::AArch64FunctionInfo::addLOHDirective(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::VETargetLowering::emitSjLjDispatchBlock(), findBBsToSinkInto(), findBestInsertionSet(), llvm::FunctionPropertiesUpdater::FunctionPropertiesUpdater(), llvm::LexicalScopes::getMachineBasicBlocks(), MarkBlocksLiveIn(), partitionOuterLoopBlocks(), peelToTurnInvariantLoadsDerefencebale(), PeepholePPC64ZExtGather(), llvm::HashRecognize::recognizeCRC(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), llvm::LoopFullUnrollPass::run(), runImpl(), sinkCommonCodeFromPredecessors(), llvm::SplitBlockAndInsertIfThenElse(), and llvm::UnrollAndJamLoop().
|
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 435 of file SmallPtrSet.h.
References llvm::SmallPtrSetImplBase::buckets(), E, llvm::SmallPtrSetImplBase::getEmptyMarker(), llvm::SmallPtrSetImplBase::getTombstoneMarker(), llvm::DebugEpochBase::incrementEpoch(), llvm::SmallPtrSetImplBase::isSmall(), llvm::SmallPtrSetImplBase::NumEntries, llvm::SmallPtrSetImplBase::NumTombstones, P, Ptr, and llvm::SmallPtrSetImplBase::small_buckets().
Referenced by llvm::AArch64FunctionInfo::clearLinkerOptimizationHints(), and removeUnusedBlocksFromParent().
|
protected |
Definition at line 75 of file SmallPtrSet.cpp.
|
inlineexplicitprotected |
Definition at line 81 of file SmallPtrSet.h.
|
protected |
Definition at line 77 of file SmallPtrSet.cpp.