LLVM: llvm::ElementCount Class Reference (original) (raw)

#include "[llvm/Support/TypeSize.h](TypeSize%5F8h%5Fsource.html)"

Inheritance diagram for llvm::ElementCount:

Public Member Functions
constexpr ElementCount ()
constexpr bool isScalar () const
Exactly one element.
constexpr bool isVector () const
One or more elements.
Public Member Functions inherited from llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >
constexpr bool operator== (const FixedOrScalableQuantity &RHS) const
constexpr bool operator!= (const FixedOrScalableQuantity &RHS) const
constexpr bool isZero () const
constexpr bool isNonZero () const
operator bool () const
constexpr ElementCount getWithIncrement (ScalarTy RHS) const
Add RHS to the underlying quantity.
constexpr ScalarTy getKnownMinValue () const
Returns the minimum value this quantity can represent.
constexpr bool isScalable () const
Returns whether the quantity is scaled by a runtime quantity (vscale).
constexpr bool isFixed () const
Returns true if the quantity is not scaled by vscale.
constexpr bool isKnownEven () const
A return value of true indicates we know at compile time that the number of elements (vscale * Min) is definitely even.
constexpr bool isKnownMultipleOf (ScalarTy RHS) const
This function tells the caller whether the element count is known at compile time to be a multiple of the scalar value RHS.
constexpr ScalarTy getFixedValue () const
constexpr ElementCount divideCoefficientBy (ScalarTy RHS) const
We do not provide the '/' operator here because division for polynomial types does not work in the same way as for normal integer types.
constexpr ElementCount multiplyCoefficientBy (ScalarTy RHS) const
constexpr ElementCount coefficientNextPowerOf2 () const
constexpr bool hasKnownScalarFactor (const FixedOrScalableQuantity &RHS) const
Returns true if there exists a value X where RHS.multiplyCoefficientBy(X) will result in a value whose quantity matches our own.
constexpr ScalarTy getKnownScalarFactor (const FixedOrScalableQuantity &RHS) const
Returns a value X where RHS.multiplyCoefficientBy(X) will result in a value whose quantity matches our own.
void print (raw_ostream &OS) const
Printing function.
Static Public Member Functions
static constexpr ElementCount getFixed (ScalarTy MinVal)
static constexpr ElementCount getScalable (ScalarTy MinVal)
static constexpr ElementCount get (ScalarTy MinVal, bool Scalable)
Static Public Member Functions inherited from llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >
static constexpr bool isKnownLT (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
static constexpr bool isKnownGT (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
static constexpr bool isKnownLE (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
static constexpr bool isKnownGE (const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Additional Inherited Members
Public Types inherited from llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >
using ScalarTy
Protected Member Functions inherited from llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >
constexpr FixedOrScalableQuantity ()=default
Protected Attributes inherited from llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >
ScalarTy Quantity
bool Scalable

Detailed Description

Constructor & Destructor Documentation

llvm::ElementCount::ElementCount ( ) inlineconstexpr

Member Function Documentation

get()

Definition at line 315 of file TypeSize.h.

References ElementCount(), and llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::Scalable.

Referenced by llvm::ConstantFoldShuffleVectorInstruction(), determineVPlanVF(), llvm::sandboxir::VectorType::get(), llvm::VectorType::get(), llvm::LLT::getElementCount(), llvm::VectorType::getElementCount(), llvm::getGCDType(), llvm::getLCMType(), llvm::TargetTransformInfoImplBase::getMinimumVF(), llvm::getOptionalElementCountLoopAttribute(), llvm::EVT::getPow2VectorType(), llvm::MVT::getPow2VectorType(), llvm::Intrinsic::IITDescriptor::getVector(), llvm::MVT::getVectorElementCount(), llvm::LoopVectorizeHints::getWidth(), and llvm::LegalizerHelper::moreElementsVector().

getFixed()

Definition at line 309 of file TypeSize.h.

References ElementCount().

Referenced by addMappingsFromTLI(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::LegalizerHelper::bitcastExtractVectorElt(), bitcastToVectorElement32(), llvm::calculateRegisterUsageForPlan(), llvm::CastInst::castIsValid(), llvm::LegalizeMutations::changeElementCountTo(), llvm::LegalizeRuleSet::clampMaxNumElements(), llvm::LoopVectorizationPlanner::computeBestVF(), llvm::VPInstruction::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::VectorizationFactor::Disabled(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), expand16BitIsFinite(), expand16BitIsInf(), expand16BitIsNaN(), expand16BitIsNormal(), expandAbs(), expandAnyOrAllIntrinsic(), expandBufferStoreIntrinsic(), expandExpIntrinsic(), expandLogIntrinsic(), expandStepIntrinsic(), fewerEltsToSize64Vector(), llvm::LLT::fixed_vector(), llvm::LLT::fixed_vector(), slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), getBitcastRegisterType(), getCopyToPartsVector(), llvm::getCoverTy(), llvm::ConstantAggregateZero::getElementCount(), llvm::ConstantExpr::getGetElementPtr(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::HexagonTTIImpl::getMinimumVF(), getNarrowTypeBreakDown(), getPow2VectorType(), llvm::ConstantDataVector::getRaw(), llvm::VFShape::getScalarShape(), slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), llvm::AArch64TTIImpl::getShuffleCost(), getSmallBestKnownTC(), getSmallConstantTripCount(), llvm::ConstantDataVector::getSplat(), llvm::DenseMapInfo< ElementCount, void >::getTombstoneKey(), getVectorCallCosts(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), llvm::AArch64TargetLowering::getVectorTypeBreakdownForCallingConv(), getVectorTypeBreakdownMVT(), llvm::TargetLibraryInfoImpl::getWidestVF(), llvm::VPlan::hasScalarVFOnly(), isOutsideLoopWorkProfitable(), llvm::isTLIScalarize(), llvm::AMDGPULegalizerInfo::legalizeImageIntrinsic(), llvm::AMDGPULegalizerInfo::legalizeLaneOp(), llvm::LLT::LLT(), llvm::LoopVectorizeHints::LoopVectorizeHints(), mutationIsSane(), numVectorEltsOrZero(), performVSelectCombine(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), llvm::LLT::pointer(), replaceWithCallToVeclib(), llvm::LoopVectorizePass::runImpl(), llvm::LLT::scalar(), llvm::LoopVectorizationPlanner::selectEpilogueVectorizationFactor(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), splitUnequalType(), llvm::LLT::token(), llvm::toVectorTy(), llvm::VFABI::tryDemangleForVFABI(), llvm::LegalizationArtifactCombiner::tryFoldUnmergeCast(), llvm::LoopVectorizeHints::vectorizeAnalysisPassName(), and widenToNextPowerOf2().

getScalable()

Definition at line 312 of file TypeSize.h.

References ElementCount().

Referenced by llvm::VPlanTransforms::addExitUsersForFirstOrderRecurrences(), addMappingsFromTLI(), llvm::VPInstruction::computeCost(), llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::AArch64TTIImpl::getArithmeticInstrCost(), llvm::AArch64TTIImpl::getArithmeticReductionCost(), getElementCountForTy(), llvm::DenseMapInfo< ElementCount, void >::getEmptyKey(), llvm::AArch64TTIImpl::getGatherScatterOpCost(), llvm::AArch64TTIImpl::getIntrinsicInstrCost(), llvm::AArch64TTIImpl::getMaskedMemoryOpCost(), getMaxValueForSVECntIntrinsic(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getMinMaxReductionCost(), getScalableECFromSignature(), getSmallConstantTripCount(), llvm::AArch64TTIImpl::getSpliceCost(), llvm::TargetLoweringBase::getTypeConversion(), llvm::TargetLibraryInfoImpl::getWidestVF(), instCombineSMECntsd(), instCombineSVECntElts(), llvm::isTLIScalarize(), LowerSVEIntrinsicEXT(), llvm::VPlanTransforms::narrowInterleaveGroups(), llvm::LoopVectorizationPlanner::plan(), llvm::LLT::scalable_vector(), and llvm::LLT::scalable_vector().

isScalar()

bool llvm::ElementCount::isScalar ( ) const inlineconstexpr

Exactly one element.

Definition at line 320 of file TypeSize.h.

References llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::getKnownMinValue(), and llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::isScalable().

Referenced by llvm::LoopVectorizationCostModel::collectNonVectorizedAndSetWideningDecisions(), llvm::LoopVectorizationPlanner::computeBestVF(), llvm::VPFirstOrderRecurrencePHIRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::LoopVectorizationPlanner::executePlan(), llvm::LoopVectorizationCostModel::expectedCost(), llvm::LoopVectorizationCostModel::getCallWideningDecision(), getCopyToPartsVector(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::GCNTTIImpl::getMaxInterleaveFactor(), llvm::R600TTIImpl::getMaxInterleaveFactor(), llvm::RISCVTTIImpl::getMaxInterleaveFactor(), llvm::X86TTIImpl::getMaxInterleaveFactor(), llvm::AArch64TargetLowering::getNumRegistersForCallingConv(), llvm::TargetLoweringBase::getPreferredVectorAction(), llvm::LoopVectorizationCostModel::getReductionPatternCost(), llvm::AArch64TargetLowering::getRegisterTypeForCallingConv(), llvm::VPCostContext::getScalarizationOverhead(), llvm::TargetLoweringBase::getTypeConversion(), llvm::LoopVectorizationCostModel::getVectorCallCost(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), isOutsideLoopWorkProfitable(), llvm::LoopVectorizationCostModel::isScalarAfterVectorization(), llvm::LoopVectorizationCostModel::isScalarWithPredication(), llvm::LoopVectorizationLegality::isUniform(), llvm::LoopVectorizationCostModel::isUniformAfterVectorization(), maybeVectorizeType(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), llvm::LoopVectorizePass::processLoop(), llvm::LoopVectorizationPlanner::selectInterleaveCount(), llvm::LoopVectorizationCostModel::setCallWideningDecision(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), and llvm::VPRecipeBuilder::tryToCreateWidenRecipe().

isVector()

bool llvm::ElementCount::isVector ( ) const inlineconstexpr

One or more elements.

Definition at line 324 of file TypeSize.h.

References llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::getKnownMinValue(), and llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::isScalable().

Referenced by llvm::LoopVectorizationPlanner::addMinimumIterationCheck(), llvm::calculateRegisterUsageForPlan(), llvm::LoopVectorizationCostModel::canTruncateToMinimalBitwidth(), llvm::LoopVectorizationCostModel::collectInstsToScalarize(), llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::VPRecipeBase::cost(), llvm::VPRegionBlock::cost(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::LoopVectorizationPlanner::executePlan(), llvm::LoopVectorizationCostModel::expectedCost(), getCostForIntrinsics(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), llvm::LoopVectorizationCostModel::getInstructionCost(), llvm::BasicTTIImplBase< BasicTTIImpl >::getIntrinsicInstrCost(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), llvm::LoopVectorizationCostModel::getWideningCost(), llvm::LoopVectorizationCostModel::getWideningDecision(), llvm::LoopVectorizationCostModel::isLegalGatherOrScatter(), llvm::LoopVectorizationCostModel::isProfitableToScalarize(), llvm::LoopVectorizationCostModel::isScalarWithPredication(), preparePlanForEpilogueVectorLoop(), llvm::LoopVectorizePass::processLoop(), llvm::LoopVectorizationPlanner::selectInterleaveCount(), llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), llvm::LoopVectorizationCostModel::setWideningDecision(), llvm::LoopVectorizationCostModel::setWideningDecision(), tryToReplaceALMWithWideALM(), and willGenerateVectors().


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