Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Classes |Public Types |Public Member Functions |List of all members
llvm::SetVector< T, Vector, Set, N > Class Template Reference

A vector that has set insertion semantics.More...

#include "llvm/ADT/SetVector.h"

Inherited byllvm::SmallSetVector< const llvm::MachineInstr *, 32 >,llvm::SmallSetVector< llvm::MachineInstr *, 32 >,llvm::SmallSetVector< llvm::Register, 32 >,llvm::SmallSetVector< MachineInstr *, 2 >,llvm::SmallSetVector< unsigned, 32 >,llvm::SmallSetVector< DepTy, 2 >,llvm::SmallSetVector< llvm::Function *, 8 >,llvm::SmallSetVector< llvm::WeakVH, 16 >,llvm::SmallSetVector< llvm::BasicBlock *, 8 >,llvm::SmallSetVector< llvm::WeakVH, 8 >,llvm::SmallSetVector< llvm::AbstractAttribute *, 16 >,llvm::SmallSetVector< const llvm::DISubprogram *, 4 >,llvm::SmallSetVector< const llvm::DISubprogram *, 16 >,llvm::SmallSetVector< llvm::Instruction *, 8 >,llvm::SmallSetVector< llvm::Instruction *, 16 >,llvm::SmallSetVector< llvm::Function *, 4 >,llvm::SmallSetVector< MemberTy, 8 >,llvm::SmallSetVector< const llvm::LiveInterval *, 8 >,llvm::SmallSetVector< Register, 8 >,llvm::SmallSetVector< llvm::ElementCount, 2 >, andllvm::SmallSetVector< unsigned, 2 >.

Public Types

using value_type = typename Vector::value_type
 
using key_type = typename Set::key_type
 
using reference =value_type &
 
using const_reference =constvalue_type &
 
using set_type = Set
 
using vector_type =Vector
 
using iterator = typename vector_type::const_iterator
 
using const_iterator = typename vector_type::const_iterator
 
using reverse_iterator = typename vector_type::const_reverse_iterator
 
using const_reverse_iterator = typename vector_type::const_reverse_iterator
 
using size_type = typename vector_type::size_type
 

Public Member Functions

 SetVector ()=default
 Construct an emptySetVector.
 
template<typename It >
 SetVector (It Start, ItEnd)
 Initialize aSetVector with a range of elements.
 
ArrayRef<value_typegetArrayRef ()const
 
Vector takeVector ()
 Clear theSetVector and return the underlying vector.
 
bool empty ()const
 Determine if theSetVector is empty or not.
 
size_type size ()const
 Determine the number of elements in theSetVector.
 
iterator begin ()
 Get an iterator to the beginning of theSetVector.
 
const_iterator begin ()const
 Get a const_iterator to the beginning of theSetVector.
 
iterator end ()
 Get an iterator to the end of theSetVector.
 
const_iterator end ()const
 Get a const_iterator to the end of theSetVector.
 
reverse_iterator rbegin ()
 Get an reverse_iterator to the end of theSetVector.
 
const_reverse_iterator rbegin ()const
 Get a const_reverse_iterator to the end of theSetVector.
 
reverse_iterator rend ()
 Get a reverse_iterator to the beginning of theSetVector.
 
const_reverse_iterator rend ()const
 Get a const_reverse_iterator to the beginning of theSetVector.
 
constvalue_typefront ()const
 Return the first element of theSetVector.
 
constvalue_typeback ()const
 Return the last element of theSetVector.
 
const_reference operator[] (size_type n)const
 Index into theSetVector.
 
bool insert (constvalue_type &X)
 Insert a new element into theSetVector.
 
template<typename It >
void insert (It Start, ItEnd)
 Insert a range of elements into theSetVector.
 
bool remove (constvalue_type &X)
 Remove an item from the set vector.
 
iterator erase (const_iteratorI)
 Erase a single element from the set vector.
 
template<typename UnaryPredicate >
bool remove_if (UnaryPredicateP)
 Remove items from the set vector based on a predicate function.
 
bool contains (constkey_type &key)const
 Check if theSetVector contains the given key.
 
size_type count (constkey_type &key)const
 Count the number of elements of a given key in theSetVector.
 
void clear ()
 Completely clear theSetVector.
 
void pop_back ()
 Remove the last element of theSetVector.
 
value_type pop_back_val ()
 
bool operator== (constSetVector &that)const
 
bool operator!= (constSetVector &that)const
 
template<class STy >
bool set_union (const STy &S)
 Compute This := This u S, return whether 'This' changed.
 
template<class STy >
void set_subtract (const STy &S)
 Compute This := This - B TODO: We should be able to use set_subtract fromSetOperations.h, butSetVector interface is inconsistent withDenseSet.
 
void swap (SetVector<T,Vector, Set,N > &RHS)
 

Detailed Description

template<typenameT, typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
class llvm::SetVector< T, Vector, Set, N >

A vector that has set insertion semantics.

This adapter class provides a way to keep a set of things that also has the property of a deterministic iteration order. The order of iteration is the order of insertion.

The key and value types are derived from the Set and Vector types respectively. This allows the vector-type operations and set-type operations to have different types. In particular, this is useful when storing pointers as "Foo *" values but looking them up as "const Foo *" keys.

No constraint is placed on the key and value types, although it is assumed that value_type can be converted into key_type for insertion. Users must be aware of any loss of information in this conversion. For example, setting value_type to float and key_type to int can produce very surprising results, but it is not explicitly disallowed.

The parameter N specifies the "small" size of the container, which is the number of elements upto which a linear scan over the Vector will be used when searching for elements instead of checking Set, due to it being better for performance. A value of 0 means that this mode of operation is not used, and is the default value.

Definition at line57 of fileSetVector.h.

Member Typedef Documentation

◆ const_iterator

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::const_iterator = typename vector_type::const_iterator

Definition at line70 of fileSetVector.h.

◆ const_reference

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::const_reference =constvalue_type &

Definition at line66 of fileSetVector.h.

◆ const_reverse_iterator

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::const_reverse_iterator = typename vector_type::const_reverse_iterator

Definition at line72 of fileSetVector.h.

◆ iterator

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::iterator = typename vector_type::const_iterator

Definition at line69 of fileSetVector.h.

◆ key_type

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::key_type = typename Set::key_type

Definition at line64 of fileSetVector.h.

◆ reference

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::reference =value_type &

Definition at line65 of fileSetVector.h.

◆ reverse_iterator

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::reverse_iterator = typename vector_type::const_reverse_iterator

Definition at line71 of fileSetVector.h.

◆ set_type

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::set_type = Set

Definition at line67 of fileSetVector.h.

◆ size_type

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::size_type = typename vector_type::size_type

Definition at line73 of fileSetVector.h.

◆ value_type

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::value_type = typename Vector::value_type

Definition at line63 of fileSetVector.h.

◆ vector_type

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
usingllvm::SetVector<T,Vector, Set,N >::vector_type =Vector

Definition at line68 of fileSetVector.h.

Constructor & Destructor Documentation

◆ SetVector()[1/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
llvm::SetVector<T,Vector, Set,N >::SetVector()
default

Construct an emptySetVector.

◆ SetVector()[2/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
template<typename It >
llvm::SetVector<T,Vector, Set,N >::SetVector(It Start,
It End 
)
inline

Initialize aSetVector with a range of elements.

Definition at line80 of fileSetVector.h.

ReferencesEnd, andllvm::SetVector< T, Vector, Set, N >::insert().

Member Function Documentation

◆ back()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
constvalue_type &llvm::SetVector<T,Vector, Set,N >::back() const
inline

Return the last element of theSetVector.

Definition at line149 of fileSetVector.h.

Referencesassert(), andllvm::SetVector< T, Vector, Set, N >::empty().

Referenced byllvm::DGNode< NodeType, EdgeType >::back(),llvm::ControlFlowHub::finalize(),llvm::SetVector< T, Vector, Set, N >::pop_back(),llvm::SetVector< T, Vector, Set, N >::pop_back_val(),llvm::AttributorCGSCCPass::run(),llvm::AttributorLightCGSCCPass::run(),llvm::OpenMPOptCGSCCPass::run(), andsortBlocks().

◆ begin()[1/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
iteratorllvm::SetVector<T,Vector, Set,N >::begin()
inline

Get an iterator to the beginning of theSetVector.

Definition at line103 of fileSetVector.h.

Referenced byllvm::NodeSet::begin(),llvm::sandboxir::Region::begin(),llvm::AADepGraphNode::begin(),llvm::DGNode< NodeType, EdgeType >::begin(),llvm::AADepGraphNode::child_begin(),llvm::rdf::Liveness::computeLiveIns(),llvm::MachO::convertToInterfaceFile(),llvm::SetTheory::expand(),findLiveSetAtInst(),formLCSSAForInstructionsImpl(),getPotentialCopiesOfMemoryValue(),llvm::AttributorCallGraph::optimisticEdgesBegin(),llvm::promoteLoopAccessesToScalars(),llvm::MemorySSAUpdater::removeMemoryAccess(),replaceConditionalBranchesOnConstant(),llvm::coro::sinkSpillUsesAfterCoroBegin(),splitPredecessorsOfLoopExit(),unswitchNontrivialInvariants(), andllvm::VPlan::vectorFactors().

◆ begin()[2/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
const_iteratorllvm::SetVector<T,Vector, Set,N >::begin() const
inline

Get a const_iterator to the beginning of theSetVector.

Definition at line108 of fileSetVector.h.

◆ clear()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
voidllvm::SetVector<T,Vector, Set,N >::clear()
inline

Completely clear theSetVector.

Definition at line273 of fileSetVector.h.

Referenced byanalyzeLoopUnrollCost(),llvm::DGNode< NodeType, EdgeType >::clear(),llvm::NodeSet::clear(),llvm::slpvectorizer::BoUpSLP::deleteTree(),findBestInsertionSet(),fixIrreducible(),pred_L(),llvm::MemorySSAUpdater::removeMemoryAccess(),llvm::InstructionSelect::MIIteratorMaintainer::reportFullyCreatedInstrs(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::reset(),llvm::VPlan::setUF(),llvm::VPlan::setVF(), andsucc_L().

◆ contains()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
boolllvm::SetVector<T,Vector, Set,N >::contains(constkey_typekey) const
inline

Check if theSetVector contains the given key.

Definition at line254 of fileSetVector.h.

Referencesllvm::is_contained().

Referenced byllvm::InterleavedAccessInfo::analyzeInterleaving(),canRewriteGEPAsOffset(),computePath(),llvm::PotentialValuesState< MemberTy >::contains(),llvm::sandboxir::Region::contains(),llvm::convertUsersOfConstantsToInstructions(),llvm::slpvectorizer::BoUpSLP::findPartiallyOrderedLoads(),gatherPossiblyVectorizableLoads(),getSameOpcode(),llvm::VPlan::hasUF(),insertTrivialPHIs(), andllvm::SIMachineFunctionInfo::isWWMReg().

◆ count()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
size_typellvm::SetVector<T,Vector, Set,N >::count(constkey_typekey) const
inline

Count the number of elements of a given key in theSetVector.

Returns
0 if the element is not in theSetVector, 1 if it is.

Definition at line264 of fileSetVector.h.

Referencesllvm::is_contained().

Referenced byaddMappingsFromTLI(),buildClonedLoops(),llvm::NodeSet::count(),deleteDeadBlocksFromLoop(),eliminateDeadCode(),eraseLifetimeMarkersOnInputs(),findBestInsertionSet(),findExtractedInputToOverallInputMapping(),llvm::CodeExtractor::findInputsOutputs(),getPotentialCopiesOfMemoryValue(),llvm::VPlan::hasVF(),llvm::Attributor::isAssumedDead(),llvm::DotFuncBCIInfo::isDependent(),llvm::Attributor::isRunOn(),llvm::MemorySSAUpdater::removeBlocks(),shouldEmitDWARF(),llvm::SimplifyInstructionsInBlock(),sortBlocks(),tryInterleave(), andunswitchNontrivialInvariants().

◆ empty()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
boolllvm::SetVector<T,Vector, Set,N >::empty() const
inline

Determine if theSetVector is empty or not.

Definition at line93 of fileSetVector.h.

Referenced byaddUsersInExitBlocks(),analyzeLoopUnrollCost(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::appliedCombine(),llvm::SetVector< T, Vector, Set, N >::back(),computeLiveInValues(),llvm::DwarfCompileUnit::createAndAddScopeChildren(),llvm::OpenMPIRBuilder::createParallel(),llvm::LLVMContextImpl::dropTriviallyDeadConstantArrays(),eliminateDeadCode(),llvm::LiveRangeEdit::eliminateDeadDefs(),llvm::NodeSet::empty(),llvm::sandboxir::Region::empty(),llvm::rdf::DeadCodeElimination::erase(),llvm::CodeExtractor::extractCodeRegion(),llvm::SetVector< T, Vector, Set, N >::front(),gatherPossiblyVectorizableLoads(),llvm::MDNode::getMostGenericAliasScope(),llvm::VPlan::hasUF(),interpretValues(),llvm::InstructionWorklist::isEmpty(),llvm::Attributor::isRunOn(),llvm::SetVector< T, Vector, Set, N >::pop_back(),llvm::InstructionWorklist::popDeferred(),pred_L(),llvm::MemorySSAUpdater::removeMemoryAccess(),llvm::removeUnreachableBlocks(),llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(),llvm::InstructionSelect::MIIteratorMaintainer::reportFullyCreatedInstrs(),llvm::ReassociatePass::run(),llvm::AttributorCGSCCPass::run(),llvm::AttributorLightCGSCCPass::run(),runAttributorLightOnFunctions(),runAttributorOnFunctions(),llvm::PlaceSafepointsPass::runImpl(),llvm::SimplifyInstructionsInBlock(),llvm::InnerLoopVectorizer::sinkScalarOperands(),sortBlocks(),llvm::SplitIndirectBrCriticalEdges(),splitPredecessorsOfLoopExit(),succ_L(),tryInterleave(), andllvm::InstructionWorklist::zap().

◆ end()[1/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
iteratorllvm::SetVector<T,Vector, Set,N >::end()
inline

Get an iterator to the end of theSetVector.

Definition at line113 of fileSetVector.h.

Referenced byllvm::AADepGraphNode::child_end(),llvm::rdf::Liveness::computeLiveIns(),llvm::NodeSet::end(),llvm::sandboxir::Region::end(),llvm::AADepGraphNode::end(),llvm::DGNode< NodeType, EdgeType >::end(),llvm::SetTheory::expand(),findLiveSetAtInst(),formLCSSAForInstructionsImpl(),getPotentialCopiesOfMemoryValue(),llvm::DGNode< NodeType, EdgeType >::hasEdgeTo(),llvm::AttributorCallGraph::optimisticEdgesEnd(),llvm::MemorySSAUpdater::removeMemoryAccess(),replaceConditionalBranchesOnConstant(),llvm::coro::sinkSpillUsesAfterCoroBegin(), andllvm::VPlan::vectorFactors().

◆ end()[2/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
const_iteratorllvm::SetVector<T,Vector, Set,N >::end() const
inline

Get a const_iterator to the end of theSetVector.

Definition at line118 of fileSetVector.h.

◆ erase()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
iteratorllvm::SetVector<T,Vector, Set,N >::erase(const_iterator I)
inline

Erase a single element from the set vector.

Returns
an iterator pointing to the next element that followed the element erased. This is the end of theSetVector if the last element is erased.

Definition at line212 of fileSetVector.h.

Referencesassert(), andI.

◆ front()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
constvalue_type &llvm::SetVector<T,Vector, Set,N >::front() const
inline

Return the first element of theSetVector.

Definition at line143 of fileSetVector.h.

Referencesassert(), andllvm::SetVector< T, Vector, Set, N >::empty().

Referenced byllvm::ControlFlowHub::finalize(), andllvm::DGNode< NodeType, EdgeType >::front().

◆ getArrayRef()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
ArrayRef<value_type >llvm::SetVector<T,Vector, Set,N >::getArrayRef() const
inline

Definition at line84 of fileSetVector.h.

Referenced byllvm::MDNode::concatenate(),llvm::CodeExtractor::extractCodeRegion(),llvm::ControlFlowHub::finalize(),getCodeExtractorArguments(),llvm::MDNode::getMostGenericAliasScope(),llvm::FunctionImporter::importFunctions(),llvm::MDNode::intersect(),llvm::AA::isPotentiallyAffectedByBarrier(), andllvm::slpvectorizer::BoUpSLP::vectorizeTree().

◆ insert()[1/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
boolllvm::SetVector<T,Vector, Set,N >::insert(constvalue_typeX)
inline

Insert a new element into theSetVector.

Returns
true if the element was inserted into theSetVector.

Definition at line162 of fileSetVector.h.

Referencesllvm::is_contained(),N, andX.

Referenced byllvm::InstructionWorklist::add(),llvm::DGNode< NodeType, EdgeType >::addEdge(),llvm::MCContext::addGenDwarfSection(),llvm::InstrProfWriter::addTemporalProfileTraces(),llvm::VPlan::addVF(),analyzeExitPHIsForOutputUses(),llvm::InterleavedAccessInfo::analyzeInterleaving(),analyzeLoopUnrollCost(),llvm::CombinerHelper::applyExtendThroughPhis(),buildClonedLoops(),llvm::LoopVectorizationCostModel::calculateRegisterUsage(),canRewriteGEPAsOffset(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::changedInstr(),collectMemAccessInfo(),collectUsersInExitBlocks(),computeBlocksDominatingExits(),computeFunctionSummary(),computeKillSet(),llvm::rdf::Liveness::computeLiveIns(),computeLiveInValues(),computeLiveOutSeed(),llvm::rdf::Liveness::computePhiInfo(),llvm::MDNode::concatenate(),llvm::MachO::convertToInterfaceFile(),llvm::convertUsersOfConstantsToInstructions(),llvm::DwarfCompileUnit::createAndAddScopeChildren(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::createdInstr(),llvm::InstructionSelect::MIIteratorMaintainer::createdInstr(),DCEInstruction(),deleteDeadBlocksFromLoop(),llvm::HexagonFrameLowering::determineCalleeSaves(),llvm::DGNode< NodeType, EdgeType >::DGNode(),llvm::LLVMContextImpl::dropTriviallyDeadConstantArrays(),eraseLifetimeMarkersOnInputs(),llvm::SetTheory::evaluate(),llvm::HexagonEvaluator::evaluate(),llvm::CodeExtractor::excludeArgFromAggregate(),llvm::ControlFlowHub::finalize(),llvm::CodeExtractor::findAllocas(),findBestInsertionSet(),llvm::CodeExtractor::findInputsOutputs(),llvm::FunctionPropertiesUpdater::finish(),fixIrreducible(),formLCSSAForInstructionsImpl(),gatherPossiblyVectorizableLoads(),llvm::rdf::Liveness::getAllReachingDefs(),getLeastCommonType(),llvm::MDNode::getMostGenericAliasScope(),llvm::DWARFYAML::Data::getNonEmptySectionNames(),getPlanEntry(),llvm::AliasSet::getPointers(),getPotentialCopiesOfMemoryValue(),getSameOpcode(),llvm::FunctionImporter::ImportMapTy::getSourceModules(),llvm::FunctionImporter::importFunctions(),llvm::SetVector< T, Vector, Set, N >::insert(),llvm::NodeSet::insert(),insertIfNamed(),insertTrivialPHIs(),isFunctionMallocLike(),llvm::LiveRangeCalc::isJointlyDominated(),llvm::AA::isPotentiallyAffectedByBarrier(),isReturnNonNull(),isVectorPromotionViable(),LinearizeExprTree(),lowerStatepointMetaArgs(),SlotIndexUpdateDelegate::MF_HandleInsertion(),NegateValue(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::noteLostUses(),llvm::memprof::RawMemProfReader::peekBuildIds(),pred_L(),llvm::Attributor::registerAA(),remapExtractedInputs(),llvm::MemorySSAUpdater::removeMemoryAccess(),llvm::removeUnreachableBlocks(),llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(),replaceAndRecursivelySimplifyImpl(),llvm::SIMachineFunctionInfo::reserveWWMRegister(),llvm::AttributorCGSCCPass::run(),llvm::AttributorLightCGSCCPass::run(),llvm::AttributorPass::run(),llvm::AttributorLightPass::run(),llvm::OpenMPOptPass::run(),runAttributorOnFunctions(),llvm::PlaceSafepointsPass::runImpl(),runIPSCCP(),llvm::SetVector< T, Vector, Set, N >::set_union(),llvm::VPlan::setUF(),llvm::SetVector< T, Vector, Set, N >::SetVector(),llvm::VPlan::setVF(),llvm::SIMachineFunctionInfo::shiftWwmVGPRsToLowestRange(),simplifyAndDCEInstruction(),simplifyOneLoop(),llvm::InnerLoopVectorizer::sinkScalarOperands(),sinkScalarOperands(),llvm::coro::sinkSpillUsesAfterCoroBegin(),sortBlocks(),llvm::SplitIndirectBrCriticalEdges(),succ_L(),tryInterleave(),llvm::UnrollLoop(),unswitchNontrivialInvariants(),updateCGAndAnalysisManagerForPass(), andllvm::slpvectorizer::BoUpSLP::vectorizeTree().

◆ insert()[2/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
template<typename It >
voidllvm::SetVector<T,Vector, Set,N >::insert(It Start,
It End 
)
inline

Insert a range of elements into theSetVector.

Definition at line182 of fileSetVector.h.

ReferencesEnd, andllvm::SetVector< T, Vector, Set, N >::insert().

◆ operator!=()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
boolllvm::SetVector<T,Vector, Set,N >::operator!=(constSetVector<T,Vector, Set,N > & that) const
inline

Definition at line295 of fileSetVector.h.

◆ operator==()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
boolllvm::SetVector<T,Vector, Set,N >::operator==(constSetVector<T,Vector, Set,N > & that) const
inline

Definition at line291 of fileSetVector.h.

◆ operator[]()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
const_referencellvm::SetVector<T,Vector, Set,N >::operator[](size_type n) const
inline

Index into theSetVector.

Definition at line155 of fileSetVector.h.

Referencesassert().

◆ pop_back()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
voidllvm::SetVector<T,Vector, Set,N >::pop_back()
inline

Remove the last element of theSetVector.

Definition at line279 of fileSetVector.h.

Referencesassert(),llvm::SetVector< T, Vector, Set, N >::back(), andllvm::SetVector< T, Vector, Set, N >::empty().

Referenced byllvm::SetVector< T, Vector, Set, N >::pop_back_val(), andsortBlocks().

◆ pop_back_val()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
value_typellvm::SetVector<T,Vector, Set,N >::pop_back_val()
inline

Definition at line285 of fileSetVector.h.

Referencesllvm::SetVector< T, Vector, Set, N >::back(), andllvm::SetVector< T, Vector, Set, N >::pop_back().

Referenced byanalyzeLoopUnrollCost(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::appliedCombine(),computeLiveInValues(),llvm::LLVMContextImpl::dropTriviallyDeadConstantArrays(),eliminateDeadCode(),llvm::LiveRangeEdit::eliminateDeadDefs(),llvm::InstructionWorklist::popDeferred(),llvm::ReassociatePass::run(),llvm::SimplifyInstructionsInBlock(),llvm::InnerLoopVectorizer::sinkScalarOperands(), andsortBlocks().

◆ rbegin()[1/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
reverse_iteratorllvm::SetVector<T,Vector, Set,N >::rbegin()
inline

Get an reverse_iterator to the end of theSetVector.

Definition at line123 of fileSetVector.h.

◆ rbegin()[2/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
const_reverse_iteratorllvm::SetVector<T,Vector, Set,N >::rbegin() const
inline

Get a const_reverse_iterator to the end of theSetVector.

Definition at line128 of fileSetVector.h.

◆ remove()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
boolllvm::SetVector<T,Vector, Set,N >::remove(constvalue_typeX)
inline

Remove an item from the set vector.

Definition at line188 of fileSetVector.h.

Referencesassert(),llvm::find(),I, andX.

Referenced byllvm::InterleavedAccessInfo::analyzeInterleaving(),computeFunctionSummary(),computeLiveInValues(),llvm::Combiner::WorkListMaintainerImpl< Lvl >::erasingInstr(),llvm::InstructionSelect::MIIteratorMaintainer::erasingInstr(),findLiveSetAtInst(),SlotIndexUpdateDelegate::MF_HandleRemoval(),llvm::InstructionWorklist::remove(),llvm::DGNode< NodeType, EdgeType >::removeEdge(),llvm::SetVector< T, Vector, Set, N >::set_subtract(),llvm::SIMachineFunctionInfo::shiftWwmVGPRsToLowestRange(), andsplitPredecessorsOfLoopExit().

◆ remove_if()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
template<typename UnaryPredicate >
boolllvm::SetVector<T,Vector, Set,N >::remove_if(UnaryPredicate P)
inline

Remove items from the set vector based on a predicate function.

This is intended to be equivalent to the following code, if we could write it:

V.erase(remove_if(V,P), V.end());
#define P(N)
bool remove_if(UnaryPredicate P)
Remove items from the set vector based on a predicate function.
Definition:SetVector.h:237

However,SetVector doesn't expose non-const iterators, making any algorithm like remove_if impossible to use.

Returns
true if any element is removed.

Definition at line237 of fileSetVector.h.

ReferencesI,P, andllvm::remove_if().

Referenced byllvm::OpenMPIRBuilder::createParallel(),llvm::MDNode::intersect(), andllvm::NodeSet::remove_if().

◆ rend()[1/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
reverse_iteratorllvm::SetVector<T,Vector, Set,N >::rend()
inline

Get a reverse_iterator to the beginning of theSetVector.

Definition at line133 of fileSetVector.h.

◆ rend()[2/2]

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
const_reverse_iteratorllvm::SetVector<T,Vector, Set,N >::rend() const
inline

Get a const_reverse_iterator to the beginning of theSetVector.

Definition at line138 of fileSetVector.h.

◆ set_subtract()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
template<class STy >
voidllvm::SetVector<T,Vector, Set,N >::set_subtract(const STy & S)
inline

Compute This := This - B TODO: We should be able to use set_subtract fromSetOperations.h, butSetVector interface is inconsistent withDenseSet.

Definition at line318 of fileSetVector.h.

Referencesllvm::SetVector< T, Vector, Set, N >::remove().

Referenced bycomputeLiveInValues().

◆ set_union()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
template<class STy >
boolllvm::SetVector<T,Vector, Set,N >::set_union(const STy & S)
inline

Compute This := This u S, return whether 'This' changed.

TODO: We should be able to use set_union fromSetOperations.h, butSetVector interface is inconsistent withDenseSet.

Definition at line303 of fileSetVector.h.

Referencesllvm::SetVector< T, Vector, Set, N >::insert().

Referenced bycomputeLiveInValues(), andllvm::BlockCoverageInference::getDependencies().

◆ size()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
size_typellvm::SetVector<T,Vector, Set,N >::size() const
inline

Determine the number of elements in theSetVector.

Definition at line98 of fileSetVector.h.

Referenced byanalyzeLoopUnrollCost(),canRewriteGEPAsOffset(),llvm::Attributor::checkForAllUses(),computeFunctionSummary(),llvm::rdf::Liveness::computeLiveIns(),computeLiveInValues(),llvm::rdf::Liveness::computePhiInfo(),llvm::ControlFlowHub::finalize(),llvm::FunctionPropertiesUpdater::finish(),llvm::rdf::Liveness::getAllReachingDefs(),getCodeExtractorArguments(),getLeastCommonType(),getPlanEntry(),getSameOpcode(),llvm::VPlan::getUF(),llvm::VPlan::hasScalarVFOnly(),llvm::FunctionImporter::importFunctions(),isFunctionMallocLike(),llvm::LiveRangeCalc::isJointlyDominated(),isReturnNonNull(),lowerStatepointMetaArgs(),llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(),llvm::removeUnreachableBlocks(),replaceAndRecursivelySimplifyImpl(),runAttributorLightOnFunctions(),runAttributorOnFunctions(),sinkScalarOperands(),llvm::NodeSet::size(),sortBlocks(), andunswitchNontrivialInvariants().

◆ swap()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
voidllvm::SetVector<T,Vector, Set,N >::swap(SetVector<T,Vector, Set,N > & RHS)
inline

Definition at line324 of fileSetVector.h.

ReferencesRHS.

◆ takeVector()

template<typenameT , typenameVector = SmallVector<T, 0>, typename Set = DenseSet<T>,unsigned N = 0>
Vectorllvm::SetVector<T,Vector, Set,N >::takeVector()
inline

Clear theSetVector and return the underlying vector.

Definition at line87 of fileSetVector.h.

Referenced bycomputeFunctionSummary(),computeVariableSummary(),llvm::AliasSet::getPointers(),llvm::FunctionImporter::ImportMapTy::getSourceModules(),lowerStatepointMetaArgs(),llvm::memprof::RawMemProfReader::peekBuildIds(), andllvm::removeUnreachableBlocks().


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

Generated on Sun Jul 20 2025 19:50:30 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp