LLVM 20.0.0git
|
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less than N). More...
#include "llvm/ADT/SmallSet.h"
Public Types | |
using | key_type = T |
using | size_type = size_t |
using | value_type = T |
using | const_iterator = SmallSetIterator< T, N, C > |
Public Member Functions | |
SmallSet ()=default | |
bool | empty () const |
size_type | size () const |
size_type | count (const T &V) const |
count - Return 1 if the element is in the set, 0 otherwise. | |
std::pair< const_iterator, bool > | insert (const T &V) |
insert - Insert an element into the set if it isn't already there. | |
template<typename IterT > | |
void | insert (IterT I, IterT E) |
bool | erase (const T &V) |
void | clear () |
const_iterator | begin () const |
const_iterator | end () const |
bool | contains (const T &V) const |
Check if the SmallSet contains the given element. | |
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less than N).
In this case, the set can be maintained with no mallocs. If the set gets large, we expand to using an std::set to maintain reasonable lookup times.
Definition at line 135 of file SmallSet.h.
using llvm::SmallSet< T, N, C >::const_iterator = SmallSetIterator<T, N, C> |
Definition at line 155 of file SmallSet.h.
using llvm::SmallSet< T, N, C >::key_type = T |
Definition at line 152 of file SmallSet.h.
using llvm::SmallSet< T, N, C >::size_type = size_t |
Definition at line 153 of file SmallSet.h.
using llvm::SmallSet< T, N, C >::value_type = T |
Definition at line 154 of file SmallSet.h.
|
default |
|
inline |
Definition at line 223 of file SmallSet.h.
References llvm::Vector.
Referenced by interpretValues().
|
inline |
Definition at line 218 of file SmallSet.h.
References llvm::Vector.
Referenced by llvm::HexagonSubtarget::adjustSchedDependency(), llvm::HexagonHazardRecognizer::AdvanceCycle(), llvm::SPIRV::RequirementHandler::clear(), findConsecutiveLoad(), ReduceLoopStrength(), and llvm::HexagonHazardRecognizer::Reset().
Check if the SmallSet contains the given element.
Definition at line 236 of file SmallSet.h.
References llvm::Vector.
Referenced by llvm::SPIRVSubtarget::canUseExtension(), llvm::SPIRVSubtarget::canUseExtInstSet(), clobberRegEntries(), foldConstantsIntoIntrinsics(), and llvm::SMSchedule::normalizeNonPipelinedInstructions().
count - Return 1 if the element is in the set, 0 otherwise.
Definition at line 166 of file SmallSet.h.
References llvm::Vector.
Referenced by addHints(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdatesPermissive(), llvm::ARMBaseInstrInfo::canCauseFpMLxStall(), llvm::SMSchedule::computeUnpipelineableNodes(), llvm::ARMBaseInstrInfo::copyPhysReg(), llvm::Instruction::dropUnknownNonDebugMetadata(), emitSelectPseudo(), llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(), llvm::finalizeBundle(), findConsecutiveLoad(), llvm::rdf::Liveness::getAllReachingDefs(), llvm::RISCVRegisterInfo::getRegAllocationHints(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::X86RegisterInfo::getRegAllocationHints(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(), getUniqueCaseValue(), hoistAndMergeSGPRInits(), llvm::WindowScheduler::initialize(), IsSafeAndProfitableToMove(), lowerStatepointMetaArgs(), MaySpeculate(), ProcessSourceNode(), programUndefinedIfUndefOrPoison(), and verifyCTRBranch().
|
inline |
Definition at line 159 of file SmallSet.h.
References llvm::Vector.
Referenced by llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), IsValueFullyAvailableInBlock(), and llvm::ShuffleBlockStrategy::mutate().
|
inline |
Definition at line 229 of file SmallSet.h.
References llvm::Vector.
Referenced by interpretValues().
Definition at line 207 of file SmallSet.h.
References E, I, and llvm::Vector.
Referenced by llvm::finalizeBundle(), and IsValueFullyAvailableInBlock().
|
inline |
insert - Insert an element into the set if it isn't already there.
Returns a pair. The first value of it is an iterator to the inserted element or the existing element in the set. The second value is true if the element is inserted (it was not in the set before).
Definition at line 179 of file SmallSet.h.
References I, N, and llvm::Vector.
Referenced by addArgumentAttrs(), addArgumentReturnedAttrs(), addConstantsToTrack(), llvm::SPIRV::RequirementHandler::addExtension(), llvm::SPIRV::RequirementHandler::addExtensions(), addHints(), addMemoryAttrs(), addNoAliasAttrs(), addNonNullAttrs(), addNoRecurseAttrs(), addNoReturnAttrs(), addNoUndefAttrs(), addWillReturn(), llvm::GCNDownwardRPTracker::advanceBeforeNext(), AntiDepEdges(), llvm::AMDGPURegisterBankInfo::applyMappingSBufferLoad(), llvm::OpenMPIRBuilder::applySimd(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdatesPermissive(), llvm::ARMBaseInstrInfo::ARMBaseInstrInfo(), AssignProtectedObjSet(), AvoidCapabilitiesSet::AvoidCapabilitiesSet(), llvm::CallGraphDOTInfo::CallGraphDOTInfo(), llvm::slpvectorizer::BoUpSLP::canVectorizeLoads(), llvm::changeToUnreachable(), CheckForLiveRegDef(), CheckForLiveRegDefMasked(), clobberRegEntries(), llvm::JumpThreadingPass::cloneInstructions(), llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), combineShuffleOfScalars(), llvm::SMSchedule::computeUnpipelineableNodes(), llvm::ConstantFoldTerminator(), llvm::PPCInstrInfo::convertToImmediateForm(), llvm::ARMBaseInstrInfo::copyPhysReg(), deriveAttrsInPostOrder(), despeculateCountZeros(), llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::HexagonHazardRecognizer::EmitInstruction(), llvm::WebAssemblyAsmPrinter::EmitProducerInfo(), emitSelectPseudo(), llvm::finalizeBundle(), findConsecutiveLoad(), llvm::DWARFDie::findRecursively(), llvm::R600InstrInfo::fitsConstReadLimitations(), foldURemOfLoopIncrement(), llvm::rdf::Liveness::getAllReachingDefs(), llvm::RISCVRegisterInfo::getRegAllocationHints(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::X86RegisterInfo::getRegAllocationHints(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(), getUniqueCaseValue(), handleNormalInst(), hasAllNBitUsers(), hoistAndMergeSGPRInits(), llvm::WindowScheduler::initialize(), llvm::SmallSet< T, N, C >::insert(), llvm::MemorySSAUpdater::insertDef(), interpretValues(), llvm::AMDGPU::isClobberedInFunction(), isLoadCombineCandidate(), IsSafeAndProfitableToMove(), isSignExtendedW(), IsValueFullyAvailableInBlock(), liesBetween(), llvm::SelectionDAGBuilder::LowerStatepoint(), lowerStatepointMetaArgs(), llvm::mustExecuteUBIfPoisonOnPathTo(), llvm::ShuffleBlockStrategy::mutate(), llvm::PointerMayBeCaptured(), llvm::WebAssemblyInstPrinter::printInst(), ProcessSourceNode(), programUndefinedIfUndefOrPoison(), llvm::SwiftErrorValueTracking::propagateVRegs(), llvm::MachineDominatorTree::recordSplitCriticalEdge(), replaceAllUsesWith(), llvm::InstCombinerImpl::tryToSinkInstructionDbgValues(), llvm::InstCombinerImpl::tryToSinkInstructionDbgVariableRecords(), unique_unsorted(), verifyCTRBranch(), and llvm::VirtRegAuxInfo::weightCalcHelper().
|
inline |
Definition at line 202 of file SmallSet.h.
References E, I, and llvm::SmallSet< T, N, C >::insert().
|
inline |
Definition at line 161 of file SmallSet.h.
References llvm::Vector.
Referenced by llvm::slpvectorizer::BoUpSLP::canVectorizeLoads(), llvm::changeToUnreachable(), llvm::ConstantFoldTerminator(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::R600InstrInfo::fitsConstReadLimitations(), IsSafeAndProfitableToMove(), and llvm::PointerMayBeCaptured().