LLVM
15.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 | size_type = size_t |
using | const_iterator = SmallSetIterator< T, N, C > |
Public Member Functions | |
SmallSet ()=default | |
LLVM_NODISCARD 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. More... | |
std::pair< NoneType, bool > | insert (const T &V) |
insert - Insert an element into the set if it isn't already there. More... | |
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. More... | |
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 136 of file SmallSet.h.
using llvm::SmallSet< T, N, C >::const_iterator = SmallSetIterator<T, N, C> |
Definition at line 153 of file SmallSet.h.
using llvm::SmallSet< T, N, C >::size_type = size_t |
Definition at line 152 of file SmallSet.h.
|
default |
|
inline |
Definition at line 225 of file SmallSet.h.
Referenced by findConsecutiveLoad(), and INITIALIZE_PASS().
|
inline |
Definition at line 220 of file SmallSet.h.
Referenced by llvm::HexagonSubtarget::adjustSchedDependency(), llvm::HexagonHazardRecognizer::AdvanceCycle(), findConsecutiveLoad(), getBBClusterInfo(), ReduceLoopStrength(), and llvm::HexagonHazardRecognizer::Reset().
|
inline |
Check if the SmallSet contains the given element.
Definition at line 238 of file SmallSet.h.
Referenced by llvm::SMSchedule::normalizeNonPipelinedInstructions().
|
inline |
count - Return 1 if the element is in the set, 0 otherwise.
Definition at line 166 of file SmallSet.h.
Referenced by addHints(), llvm::DomTreeUpdater::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::SystemZRegisterInfo::getRegAllocationHints(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(), handleNormalInst(), hoistAndMergeSGPRInits(), IsSafeAndProfitableToMove(), lowerStatepointMetaArgs(), MaySpeculate(), llvm::mustTriggerUB(), llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized(), ProcessSourceNode(), llvm::LoopVectorizationCostModel::selectVectorizationFactor(), llvm::MachineBasicBlock::SplitCriticalEdge(), and verifyCTRBranch().
|
inline |
Definition at line 157 of file SmallSet.h.
Referenced by llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), INITIALIZE_PASS(), IsValueFullyAvailableInBlock(), and llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized().
|
inline |
Definition at line 231 of file SmallSet.h.
Referenced by findConsecutiveLoad().
|
inline |
Definition at line 209 of file SmallSet.h.
Referenced by llvm::finalizeBundle(), INITIALIZE_PASS(), and IsValueFullyAvailableInBlock().
|
inline |
insert - Insert an element into the set if it isn't already there.
Returns true if the element is inserted (it was not in the set before). The first value of the returned pair is unused and provided for partial compatibility with the standard library self-associative container concept.
Definition at line 182 of file SmallSet.h.
Referenced by addArgumentAttrs(), addArgumentReturnedAttrs(), addHints(), addMemoryAttrs(), addNoAliasAttrs(), addNonNullAttrs(), addNoRecurseAttrs(), addNoReturnAttrs(), addWillReturn(), AntiDepEdges(), llvm::AMDGPURegisterBankInfo::applyMappingSBufferLoad(), llvm::OpenMPIRBuilder::applySimd(), llvm::DomTreeUpdater::applyUpdatesPermissive(), llvm::ARMBaseInstrInfo::ARMBaseInstrInfo(), AssignProtectedObjSet(), llvm::CallGraphDOTInfo::CallGraphDOTInfo(), llvm::changeToUnreachable(), CheckForLiveRegDef(), CheckForLiveRegDefMasked(), llvm::AMDGPURegisterBankInfo::collectWaterfallOperands(), combineShuffleOfScalars(), llvm::SMSchedule::computeUnpipelineableNodes(), llvm::ConstantFoldTerminator(), llvm::ARMBaseInstrInfo::copyPhysReg(), deriveAttrsInPostOrder(), llvm::Instruction::dropUnknownNonDebugMetadata(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::HexagonHazardRecognizer::EmitInstruction(), llvm::WebAssemblyAsmPrinter::EmitProducerInfo(), emitSelectPseudo(), llvm::finalizeBundle(), findConsecutiveLoad(), llvm::DWARFDie::findRecursively(), llvm::R600InstrInfo::fitsConstReadLimitations(), genericValueTraversal(), llvm::rdf::Liveness::getAllReachingDefs(), getBBClusterInfo(), llvm::SystemZRegisterInfo::getRegAllocationHints(), llvm::X86RegisterInfo::getRegAllocationHints(), llvm::TargetRegisterInfo::getRegAllocationHints(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getScoreAtLevelRec(), llvm::MachineInstr::getUsedDebugRegs(), handleNormalInst(), hoistAndMergeSGPRInits(), INITIALIZE_PASS(), llvm::SmallSet< unsigned, 16 >::insert(), llvm::MemorySSAUpdater::insertDef(), llvm::AMDGPU::isClobberedInFunction(), isLoadCombineCandidate(), IsSafeAndProfitableToMove(), IsValueFullyAvailableInBlock(), liesBetween(), llvm::SelectionDAGBuilder::LowerStatepoint(), lowerStatepointMetaArgs(), mustExecuteUBIfPoisonOnPathTo(), llvm::LoopVectorizationPlanner::plan(), llvm::PointerMayBeCaptured(), llvm::WebAssemblyInstPrinter::printInst(), llvm::HexagonFrameLowering::processFunctionBeforeFrameFinalized(), ProcessSourceNode(), llvm::SwiftErrorValueTracking::propagateVRegs(), llvm::MachineDominatorTree::recordSplitCriticalEdge(), llvm::MachineBasicBlock::SplitCriticalEdge(), TryToSinkInstruction(), unique_unsorted(), and verifyCTRBranch().
|
inline |
Definition at line 204 of file SmallSet.h.
|
inline |
Definition at line 161 of file SmallSet.h.
Referenced by llvm::changeToUnreachable(), llvm::ConstantFoldTerminator(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::R600InstrInfo::fitsConstReadLimitations(), IsSafeAndProfitableToMove(), and llvm::LoopVectorizationCostModel::selectVectorizationFactor().