LLVM 22.0.0git
|
Base class for DenseSet and DenseSmallSet. More...
#include "llvm/ADT/DenseSet.h"
Public Types | |
using | key_type = ValueT |
using | value_type = ValueT |
using | size_type = unsigned |
using | iterator = DenseSetIterator<false> |
using | const_iterator = DenseSetIterator<true> |
Public Member Functions | |
DenseSetImpl (unsigned InitialReserve=0) | |
template<typename InputIt> | |
DenseSetImpl (const InputIt &I, const InputIt &E) | |
DenseSetImpl (std::initializer_list< ValueT > Elems) | |
template<typename Range> | |
DenseSetImpl (llvm::from_range_t, Range &&R) | |
bool | empty () const |
size_type | size () const |
size_t | getMemorySize () const |
void | resize (size_t Size) |
Grow the DenseSet so that it has at least Size buckets. | |
void | reserve (size_t Size) |
Grow the DenseSet so that it can contain at least NumEntries items before resizing again. | |
void | clear () |
bool | erase (const ValueT &V) |
void | swap (DenseSetImpl &RHS) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
iterator | find (const_arg_type_t< ValueT > V) |
const_iterator | find (const_arg_type_t< ValueT > V) const |
bool | contains (const_arg_type_t< ValueT > V) const |
Check if the set contains the given element. | |
size_type | count (const_arg_type_t< ValueT > V) const |
Return 1 if the specified key is in the set, 0 otherwise. | |
template<class LookupKeyT> | |
iterator | find_as (const LookupKeyT &Val) |
Alternative version of find() which allows a different, and possibly less expensive, key type. | |
template<class LookupKeyT> | |
const_iterator | find_as (const LookupKeyT &Val) const |
void | erase (iterator I) |
void | erase (const_iterator CI) |
std::pair< iterator, bool > | insert (const ValueT &V) |
std::pair< iterator, bool > | insert (ValueT &&V) |
template<typename LookupKeyT> | |
std::pair< iterator, bool > | insert_as (const ValueT &V, const LookupKeyT &LookupKey) |
Alternative version of insert that uses a different (and possibly less expensive) key type. | |
template<typename LookupKeyT> | |
std::pair< iterator, bool > | insert_as (ValueT &&V, const LookupKeyT &LookupKey) |
template<typename InputIt> | |
void | insert (InputIt I, InputIt E) |
template<typename Range> | |
void | insert_range (Range &&R) |
Base class for DenseSet and DenseSmallSet.
MapTy should be either
DenseMap<ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair<ValueT>>
or the equivalent SmallDenseMap type. ValueInfoT must implement the DenseMapInfo "concept".
Definition at line 56 of file DenseSet.h.
using llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::const_iterator = DenseSetIterator<true> |
Definition at line 155 of file DenseSet.h.
using llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::iterator = DenseSetIterator<false> |
Definition at line 154 of file DenseSet.h.
using llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::key_type = ValueT |
Definition at line 65 of file DenseSet.h.
using llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::size_type = unsigned |
Definition at line 67 of file DenseSet.h.
using llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::value_type = ValueT |
Definition at line 66 of file DenseSet.h.
|
inlineexplicit |
Definition at line 69 of file DenseSet.h.
|
inline |
Definition at line 72 of file DenseSet.h.
|
inline |
Definition at line 77 of file DenseSet.h.
|
inline |
Definition at line 83 of file DenseSet.h.
|
inline |
Definition at line 157 of file DenseSet.h.
Referenced by CheckLargerCands(), llvm::ComputeCrossModuleImport(), llvm::computeEHOnlyBlocks(), and llvm::MDBuilder::createFunctionEntryCount().
|
inline |
Definition at line 160 of file DenseSet.h.
|
inline |
Definition at line 98 of file DenseSet.h.
Referenced by checkNumberingAndReplace(), EliminateDuplicatePHINodesSetBasedImpl(), reduceDbgValsBackwardScan(), removeRedundantDbgInstrsUsingBackwardScan(), llvm::objcopy::coff::Object::removeSections(), llvm::ModuleToPostOrderCGSCCPassAdaptor::run(), and llvm::OutlinableRegion::splitCandidate().
|
inlinenodiscard |
Check if the set contains the given element.
Definition at line 169 of file DenseSet.h.
Referenced by llvm::orc::addFunctionPointerRelocationsToCurrentSymbol(), llvm::lto::Config::addSaveTemps(), llvm::DbgValueRangeTable::addVariable(), analyzeExitPHIsForOutputUses(), buildOverlapMapAndRecordDeclares(), llvm::DroppedVariableStats::calculateDroppedStatsAndPrint(), checkNumberingAndReplace(), checkNumberingAndReplaceCommutative(), llvm::IRSimilarity::IRSimilarityCandidate::checkRelativeLocations(), llvm::collectEphemeralRecipesForVPlan(), collectRegionsConstants(), llvm::computeLTOCacheKey(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::SelectionDAG::copyExtraInfo(), llvm::IRSimilarity::IRSimilarityCandidate::createCanonicalRelationFrom(), llvm::VETargetLowering::emitSjLjDispatchBlock(), findConstants(), findCostForOutputBlocks(), findExtractedOutputToOverallOutputMapping(), findOrCreatePHIInBlock(), getBranchInsertPoint(), getFormForIdxParent(), getGVNForPHINode(), DOTGraphTraits< const CallsiteContextGraph< DerivedCCG, FuncTy, CallTy > * >::getNodeAttributes(), llvm::AMDGPU::getTransitiveUsesOfLDS(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::DIExpression::hasAllLocationOps(), llvm::FunctionImporter::importFunctions(), llvm::slpvectorizer::BoUpSLP::isAnyGathered(), isDataTypeToken(), processLoadCommands(), propagateAttributesToRefs(), llvm::PHINode::removeIncomingValueIf(), llvm::objcopy::coff::Object::removeSections(), removeUndefDbgAssignsFromEntryBlock(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), replaceTargetsFromPHINode(), llvm::InstructionSelect::selectMachineFunction(), llvm::OutlinableRegion::splitCandidate(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), and willGenerateVectors().
|
inlinenodiscard |
Return 1 if the specified key is in the set, 0 otherwise.
Definition at line 174 of file DenseSet.h.
Referenced by llvm::LiveVariables::addNewBlock(), llvm::ModuloScheduleExpanderMVE::canApply(), canProveExitOnFirstIteration(), checkHoistValue(), checkVariableImport(), collectBlocksReachableByDirty(), computeFunctionSummary(), llvm::MCPseudoProbeDecoder::countRecords(), llvm::orc::StaticLibraryDefinitionGenerator::Create(), llvm::ModuleSummaryIndex::exportToDot(), llvm::orc::JITDylib::getDFSLinkOrder(), getInstrBB(), getPostIncrementOperand(), handleArgs(), hasDirtyPred(), hoistValue(), llvm::SIInstrInfo::legalizeOperandsVOP3(), processLoadCommands(), llvm::ModuleSummaryIndex::propagateAttributes(), llvm::jitlink::prune(), llvm::sampleprof::SampleProfileReaderExtBinaryBase::readFuncProfiles(), relocationViaAlloca(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), sortLocalVars(), llvm::thinLTOFinalizeInModule(), thinLTOResolvePrevailingGUID(), llvm::updateVCallVisibilityInIndex(), llvm::updateVCallVisibilityInModule(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), and VisitGlobalVariableForEmission().
|
inline |
Definition at line 86 of file DenseSet.h.
Referenced by llvm::lto::Config::addSaveTemps(), CheckLargerCands(), checkNumberingAndReplaceCommutative(), TransferTracker::clobberMloc(), llvm::computeDeadSymbolsAndUpdateIndirectCalls(), llvm::computeEHOnlyBlocks(), llvm::MCPseudoProbeDecoder::countRecords(), llvm::ThinLTOCodeGenerator::internalize(), llvm::orc::BlockFreqQuery::operator()(), ProcessThinLTOModule(), llvm::PHINode::removeIncomingValueIf(), llvm::objcopy::coff::Object::removeSections(), RemoveLoadsIntoFakeUses::run(), shouldSplit(), llvm::orc::SymbolsCouldNotBeRemoved::SymbolsCouldNotBeRemoved(), llvm::orc::SymbolsNotFound::SymbolsNotFound(), and llvm::thinLTOFinalizeInModule().
|
inline |
Definition at line 158 of file DenseSet.h.
Referenced by analyzeLoopUnrollCost(), llvm::slpvectorizer::BoUpSLP::buildExternalUses(), llvm::ComputeCrossModuleImport(), llvm::MDBuilder::createFunctionEntryCount(), and handleArgs().
|
inline |
Definition at line 161 of file DenseSet.h.
|
inline |
Definition at line 100 of file DenseSet.h.
Referenced by analyzeExitPHIsForOutputUses(), llvm::ComputeCrossModuleImport(), llvm::computeEHOnlyBlocks(), processLoadCommands(), reduceDbgValsBackwardScan(), and VisitGlobalVariableForEmission().
|
inline |
Definition at line 192 of file DenseSet.h.
|
inline |
Definition at line 191 of file DenseSet.h.
|
inline |
Definition at line 163 of file DenseSet.h.
Referenced by analyzeLoopUnrollCost(), llvm::slpvectorizer::BoUpSLP::buildExternalUses(), CheckLargerCands(), and handleArgs().
|
inline |
Definition at line 164 of file DenseSet.h.
|
inline |
Alternative version of find() which allows a different, and possibly less expensive, key type.
The DenseMapInfo is responsible for supplying methods getHashValue(LookupKeyT) and isEqual(LookupKeyT, KeyT) for each key type used.
Definition at line 183 of file DenseSet.h.
|
inline |
Definition at line 187 of file DenseSet.h.
|
inline |
Definition at line 88 of file DenseSet.h.
|
inline |
Definition at line 194 of file DenseSet.h.
Referenced by addDefsUsesToList(), addDefsUsesToList(), llvm::orc::addFunctionPointerRelocationsToCurrentSymbol(), llvm::LiveVariables::addNewBlock(), addUsedSymbolToPreservedGUID(), llvm::DbgValueRangeTable::addVariable(), analyzeExitPHIsForOutputUses(), analyzeLoopUnrollCost(), llvm::DwarfDebug::beginModule(), llvm::buildModuleSummaryIndex(), buildOverlapMapAndRecordDeclares(), llvm::ModuloScheduleExpanderMVE::canApply(), canProveExitOnFirstIteration(), checkClobberSanity(), checkHoistValue(), CheckLargerCands(), checkNumberingAndReplace(), checkNumberingAndReplaceCommutative(), checkVariableImport(), TransferTracker::clobberMloc(), llvm::collectEphemeralRecipesForVPlan(), collectRegionsConstants(), llvm::IRSimilarity::IRSimilarityCandidate::compareCommutativeOperandMapping(), computeAliasSummary(), llvm::computeEHOnlyBlocks(), computeFunctionSummary(), computeGUIDPreservedSymbols(), computeVariableSummary(), llvm::SelectionDAG::copyExtraInfo(), costShuffleViaSplitting(), costShuffleViaVRegSplitting(), llvm::orc::StaticLibraryDefinitionGenerator::Create(), llvm::IRSimilarity::IRSimilarityCandidate::createCanonicalRelationFrom(), llvm::deleteDeadLoop(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, DenseSetEmpty, ValueInfoT, DenseSetPair< ValueT > >, ValueInfoT >< ValueT, ValueInfoT >::DenseSetImpl(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, DenseSetEmpty, ValueInfoT, DenseSetPair< ValueT > >, ValueInfoT >< ValueT, ValueInfoT >::DenseSetImpl(), EliminateDuplicatePHINodesSetBasedImpl(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::VETargetLowering::emitSjLjDispatchBlock(), llvm::DwarfDebug::endFunctionImpl(), llvm::sampleprof::FunctionSamples::findAllNames(), findBaseObject(), llvm::orc::SpeculateQuery::findCalles(), findConstants(), findCostForOutputBlocks(), findExtractedOutputToOverallOutputMapping(), llvm::sampleprof::FunctionSamples::findInlinedFunctions(), findOrCreatePHIInBlock(), getBaseType(), llvm::IRSimilarity::IRSimilarityCandidate::getBasicBlocks(), llvm::IRSimilarity::IRSimilarityCandidate::getBasicBlocks(), getBranchInsertPoint(), getCHRConditionValuesForRegion(), llvm::orc::JITDylib::getDFSLinkOrder(), getPostIncrementOperand(), getRegsUsedByPHIs(), llvm::slpvectorizer::BoUpSLP::getSpillCost(), llvm::AMDGPU::getTransitiveUsesOfLDS(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::getVisibleToRegularObjVtableGUIDs(), getWaitStatesSince(), handleArgs(), llvm::DIExpression::hasAllLocationOps(), hasDuplicates(), hasHazard(), hoistValue(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, DenseSetEmpty, ValueInfoT, DenseSetPair< ValueT > >, ValueInfoT >< ValueT, ValueInfoT >::insert(), llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, DenseSetEmpty, ValueInfoT, DenseSetPair< ValueT > >, ValueInfoT >< ValueT, ValueInfoT >::insert_range(), insertRelocationStores(), insertRematerializationStores(), insertTrivialPHIs(), llvm::SIInstrInfo::isOperandLegal(), isSaveReachableThroughClean(), llvm::SIInstrInfo::legalizeOperandsVOP3(), LLVMOrcMaterializationResponsibilityDelegate(), lowerBuildVectorViaDominantValues(), markAllReachable(), planContainsAdditionalSimplifications(), llvm::DroppedVariableStats::populateVarIDSetAndInlinedMap(), processLoadCommands(), propagateAttributesToRefs(), llvm::jitlink::prune(), llvm::sampleprof::SampleProfileReader::read(), llvm::sampleprof::SampleProfileReaderExtBinaryBase::readFuncProfiles(), reduceDbgValsBackwardScan(), remapIndices(), llvm::PHINode::removeIncomingValueIf(), llvm::slpvectorizer::BoUpSLP::removeInstructionsAndOperands(), removeRedundantDbgInstrsUsingBackwardScan(), llvm::objcopy::coff::Object::removeSections(), removeUndefDbgAssignsFromEntryBlock(), llvm::slpvectorizer::BoUpSLP::reorderBottomToTop(), llvm::CtxProfAnalysis::run(), llvm::lto::LTO::run(), RemoveLoadsIntoFakeUses::run(), scanInlinedCode(), scanOneBB(), searchPredecessors(), llvm::InstructionSelect::selectMachineFunction(), sortLocalVars(), stripDeadDebugInfoImpl(), llvm::thinLTOFinalizeInModule(), llvm::thinLTOResolvePrevailingInIndex(), LLVMOrcLazyCallThroughManagerRef::toSymbolDependenceMap(), undefInvalidDbgValues(), llvm::InstrProfWriter::validateRecord(), llvm::cas::ObjectStore::validateTree(), llvm::slpvectorizer::BoUpSLP::vectorizeTree(), llvm::GenericCycle< ContextT >::verifyCycle(), llvm::GenericCycleInfo< ContextT >::verifyCycleNest(), VisitGlobalVariableForEmission(), and willGenerateVectors().
|
inline |
Definition at line 215 of file DenseSet.h.
|
inline |
Definition at line 198 of file DenseSet.h.
|
inline |
Alternative version of insert that uses a different (and possibly less expensive) key type.
Definition at line 205 of file DenseSet.h.
|
inline |
Definition at line 210 of file DenseSet.h.
|
inline |
Definition at line 220 of file DenseSet.h.
Referenced by checkHoistValue(), llvm::ComputeCrossModuleImport(), llvm::sampleprof::FunctionSamples::findAllNames(), getSelectsInScope(), llvm::FunctionImporter::importFunctions(), promoteIndirectCalls(), and llvm::ThinLTOCodeGenerator::run().
|
inline |
Grow the DenseSet so that it can contain at least NumEntries
items before resizing again.
Definition at line 96 of file DenseSet.h.
Referenced by EliminateDuplicatePHINodesSetBasedImpl().
|
inline |
Grow the DenseSet so that it has at least Size buckets.
Will not shrink the Size of the set.
Definition at line 92 of file DenseSet.h.
|
inline |
Definition at line 87 of file DenseSet.h.
Referenced by checkNumberingAndReplace(), checkNumberingAndReplaceCommutative(), llvm::SampleProfileLoaderBaseImpl< FT >::computeAndPropagateWeights(), llvm::computeDeadSymbolsAndUpdateIndirectCalls(), llvm::computeLTOCacheKey(), llvm::PHINode::removeIncomingValueIf(), and llvm::orc::SymbolLookupSet::SymbolLookupSet().
|
inline |
Definition at line 102 of file DenseSet.h.