|
LLVM 23.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 | |
| SmallSet (const SmallSet &)=default | |
| SmallSet (SmallSet &&)=default | |
| template<typename IterT> | |
| SmallSet (IterT Begin, IterT End) | |
| template<typename Range> | |
| SmallSet (llvm::from_range_t, Range &&R) | |
| SmallSet (std::initializer_list< T > L) | |
| SmallSet & | operator= (const SmallSet &)=default |
| SmallSet & | operator= (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. | |
| std::pair< const_iterator, bool > | insert (T &&V) |
| template<typename IterT> | |
| void | insert (IterT I, IterT E) |
| template<typename Range> | |
| void | insert_range (Range &&R) |
| 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 134 of file SmallSet.h.
| using llvm::SmallSet< T, N, C >::const_iterator = SmallSetIterator<T, N, C> |
Definition at line 150 of file SmallSet.h.
| using llvm::SmallSet< T, N, C >::key_type = T |
Definition at line 147 of file SmallSet.h.
| using llvm::SmallSet< T, N, C >::size_type = size_t |
Definition at line 148 of file SmallSet.h.
| using llvm::SmallSet< T, N, C >::value_type = T |
Definition at line 149 of file SmallSet.h.
|
default |
|
inline |
Definition at line 156 of file SmallSet.h.
|
inline |
Definition at line 161 of file SmallSet.h.
|
inline |
Definition at line 164 of file SmallSet.h.
|
inlinenodiscard |
Definition at line 216 of file SmallSet.h.
Referenced by llvm::RISCV::getCPUConfigurableTuneFeatures().
|
inline |
Definition at line 211 of file SmallSet.h.
Referenced by isProfitable().
Check if the SmallSet contains the given element.
Definition at line 229 of file SmallSet.h.
Referenced by clobberRegEntries(), llvm::SmallSet< Register, 16 >::count(), llvm::finalizeBundle(), gatherPossiblyVectorizableLoads(), and llvm::TargetInstrInfo::getAccumulatorReassociationPatterns().
count - Return 1 if the element is in the set, 0 otherwise.
Definition at line 176 of file SmallSet.h.
Referenced by addHints(), llvm::ARMBaseInstrInfo::copyPhysReg(), llvm::Instruction::dropUnknownNonDebugMetadata(), emitSelectPseudo(), emitSelectPseudo(), llvm::AMDGPURegisterBankInfo::executeInWaterfallLoop(), llvm::rdf::Liveness::getAllReachingDefs(), llvm::RISCVRegisterInfo::getRegAllocationHints(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::X86RegisterInfo::getRegAllocationHints(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(), getUniqueCaseValue(), hasPHICycleDFS(), llvm::WindowScheduler::initialize(), IsSafeAndProfitableToMove(), lowerStatepointMetaArgs(), MaySpeculate(), ProcessSourceNode(), and llvm::MachineBasicBlock::SplitCriticalEdge().
|
inlinenodiscard |
Definition at line 169 of file SmallSet.h.
Referenced by llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), getGatherLanePattern(), and llvm::ShuffleBlockStrategy::mutate().
|
inlinenodiscard |
Definition at line 222 of file SmallSet.h.
Referenced by llvm::RISCV::getCPUConfigurableTuneFeatures().
Definition at line 200 of file SmallSet.h.
Referenced by llvm::finalizeBundle(), getGatherLanePattern(), and hasPHICycleDFS().
|
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 184 of file SmallSet.h.
Referenced by llvm::AAPointerInfo::OffsetInfo::addToAll(), llvm::GCNDownwardRPTracker::advanceBeforeNext(), AntiDepEdges(), llvm::AMDGPURegisterBankInfo::applyMappingSBufferLoad(), llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdatesPermissive(), AssignProtectedObjSet(), CheckForLiveRegDef(), CheckForLiveRegDef(), CheckForLiveRegDefMasked(), clobberRegEntries(), llvm::JumpThreadingPass::cloneInstructions(), collectPrivatizingConstructs(), llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), combineShuffleOfScalars(), llvm::PPCInstrInfo::convertToImmediateForm(), llvm::ARMBaseInstrInfo::copyPhysReg(), llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::WebAssemblyAsmPrinter::EmitProducerInfo(), emitSelectPseudo(), emitSelectPseudo(), llvm::finalizeBundle(), llvm::DWARFDie::findRecursively(), llvm::R600InstrInfo::fitsConstReadLimitations(), gatherPossiblyVectorizableLoads(), llvm::rdf::Liveness::getAllReachingDefs(), llvm::RISCVRegisterInfo::getRegAllocationHints(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::X86RegisterInfo::getRegAllocationHints(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(), getUniqueCaseValue(), handleNormalInst(), hasAllNBitUsers(), hasAllNBitUsers(), hasPHICycleDFS(), llvm::WindowScheduler::initialize(), llvm::SmallSet< Register, 16 >::insert(), llvm::SmallSet< Register, 16 >::insert_range(), llvm::MemorySSAUpdater::insertDef(), isProfitable(), IsSafeAndProfitableToMove(), isSignExtendedW(), isSignExtendedW(), LowerAVXCONCAT_VECTORS(), llvm::SelectionDAGBuilder::LowerStatepoint(), lowerStatepointMetaArgs(), llvm::ShuffleBlockStrategy::mutate(), ProcessSourceNode(), simplifySwitchOfCmpIntrinsic(), llvm::SmallSet< Register, 16 >::SmallSet(), llvm::SmallSet< Register, 16 >::SmallSet(), sortBlocks(), llvm::MachineBasicBlock::SplitCriticalEdge(), llvm::InstCombinerImpl::tryToSinkInstructionDbgVariableRecords(), and llvm::DWARFCFIAnalysis::update().
|
inline |
Definition at line 191 of file SmallSet.h.
|
inline |
Definition at line 186 of file SmallSet.h.
Definition at line 196 of file SmallSet.h.
Referenced by interpretValues().
|
inlinenodiscard |
Definition at line 171 of file SmallSet.h.
Referenced by llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::R600InstrInfo::fitsConstReadLimitations(), llvm::MemorySSAUpdater::insertDef(), isProfitable(), IsSafeAndProfitableToMove(), and sortBlocks().