LLVM 18.0.0git
|
#include "llvm/Support/TypeSize.h"
Public Member Functions | |
constexpr | ElementCount () |
constexpr bool | isScalar () const |
Exactly one element. | |
constexpr bool | isVector () const |
One or more elements. | |
![]() | |
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 | 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 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 | |
![]() | |
using | ScalarTy = unsigned |
![]() | |
constexpr | FixedOrScalableQuantity ()=default |
constexpr | FixedOrScalableQuantity (ScalarTy Quantity, bool Scalable) |
![]() | |
ScalarTy | Quantity |
bool | Scalable |
Definition at line 279 of file TypeSize.h.
|
inlineconstexpr |
Definition at line 289 of file TypeSize.h.
Referenced by get(), getFixed(), and getScalable().
|
inlinestaticconstexpr |
Definition at line 297 of file TypeSize.h.
References ElementCount(), and llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::Scalable.
Referenced by llvm::ConstantFoldShuffleVectorInstruction(), llvm::VectorType::get(), llvm::LLT::getElementCount(), llvm::VectorType::getElementCount(), llvm::TargetTransformInfoImplBase::getMinimumVF(), llvm::getOptionalElementCountLoopAttribute(), llvm::MVT::getPow2VectorType(), llvm::EVT::getPow2VectorType(), llvm::Intrinsic::IITDescriptor::getVector(), llvm::MVT::getVectorElementCount(), llvm::LoopVectorizeHints::getWidth(), and llvm::VFABI::tryDemangleForVFABI().
|
inlinestaticconstexpr |
Definition at line 291 of file TypeSize.h.
References ElementCount().
Referenced by addMappingsFromTLI(), areRuntimeChecksProfitable(), llvm::LegalizerHelper::bitcastExtractVectorElt(), bitcastToVectorElement32(), llvm::LoopVectorizationCostModel::calculateRegisterUsage(), llvm::CastInst::castIsValid(), llvm::LegalizeMutations::changeElementCountTo(), llvm::LegalizeRuleSet::clampMaxNumElements(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::VectorizationFactor::Disabled(), fewerEltsToSize64Vector(), llvm::LLT::fixed_vector(), llvm::slpvectorizer::BoUpSLP::ShuffleCostEstimator::gather(), llvm::FixedVectorType::get(), getBitcastRegisterType(), getCopyToPartsVector(), llvm::getCoverTy(), llvm::ConstantAggregateZero::getElementCount(), llvm::getGCDType(), llvm::ConstantExpr::getGetElementPtr(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::HexagonTTIImpl::getMinimumVF(), getNarrowTypeBreakDown(), getPow2VectorType(), llvm::ConstantDataVector::getRaw(), llvm::VFShape::getScalarShape(), llvm::slpvectorizer::BoUpSLP::LookAheadHeuristics::getShallowScore(), llvm::AArch64TTIImpl::getShuffleCost(), llvm::ConstantDataVector::getSplat(), llvm::DenseMapInfo< ElementCount, void >::getTombstoneKey(), getVectorCallCosts(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), getVectorTypeBreakdownMVT(), llvm::TargetLibraryInfoImpl::getWidestVF(), llvm::isTLIScalarize(), llvm::AMDGPULegalizerInfo::legalizeImageIntrinsic(), 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::VectorBuilder::setStaticVL(), splitUnequalType(), llvm::ToVectorTy(), llvm::LegalizationArtifactCombiner::tryFoldUnmergeCast(), llvm::LoopVectorizeHints::vectorizeAnalysisPassName(), and widenToNextPowerOf2().
|
inlinestaticconstexpr |
Definition at line 294 of file TypeSize.h.
References ElementCount().
Referenced by addMappingsFromTLI(), llvm::ScalableVectorType::get(), llvm::DenseMapInfo< ElementCount, void >::getEmptyKey(), llvm::AArch64TTIImpl::getGatherScatterOpCost(), llvm::AArch64TTIImpl::getMaskedMemoryOpCost(), llvm::AArch64TTIImpl::getMemoryOpCost(), llvm::AArch64TTIImpl::getSpliceCost(), llvm::TargetLoweringBase::getTypeConversion(), llvm::TargetLibraryInfoImpl::getWidestVF(), llvm::isTLIScalarize(), LowerSVEIntrinsicEXT(), performIntrinsicCombine(), llvm::LoopVectorizationPlanner::plan(), and llvm::LLT::scalable_vector().
|
inlineconstexpr |
Exactly one element.
Definition at line 302 of file TypeSize.h.
References llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::getKnownMinValue(), and llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::isScalable().
Referenced by areRuntimeChecksProfitable(), llvm::LoopVectorizationCostModel::collectInstsToScalarize(), llvm::LoopVectorizationCostModel::collectUniformsAndScalars(), llvm::VPWidenGEPRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::LoopVectorizationCostModel::expectedCost(), llvm::VPTransformState::get(), getCopyToPartsVector(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::GCNTTIImpl::getMaxInterleaveFactor(), llvm::R600TTIImpl::getMaxInterleaveFactor(), llvm::RISCVTTIImpl::getMaxInterleaveFactor(), llvm::X86TTIImpl::getMaxInterleaveFactor(), llvm::TargetLoweringBase::getPreferredVectorAction(), llvm::TargetLoweringBase::getTypeConversion(), llvm::LoopVectorizationCostModel::getVectorCallCost(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), llvm::LoopVectorizationCostModel::isScalarAfterVectorization(), llvm::LoopVectorizationLegality::isUniform(), llvm::LoopVectorizationCostModel::isUniformAfterVectorization(), MaybeVectorizeType(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), llvm::VPlan::prepareToExecute(), llvm::LoopVectorizePass::processLoop(), llvm::LoopVectorizationCostModel::selectInterleaveCount(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), and llvm::VPRecipeBuilder::tryToCreateWidenRecipe().
|
inlineconstexpr |
One or more elements.
Definition at line 306 of file TypeSize.h.
References llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::getKnownMinValue(), and llvm::details::FixedOrScalableQuantity< ElementCount, unsigned >::isScalable().
Referenced by llvm::LoopVectorizationCostModel::calculateRegisterUsage(), llvm::LoopVectorizationCostModel::canTruncateToMinimalBitwidth(), llvm::InnerLoopVectorizer::completeLoopSkeleton(), llvm::EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(), llvm::InnerLoopVectorizer::createVectorLoopSkeleton(), llvm::InnerLoopVectorizer::emitIterationCountCheck(), llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::InnerLoopVectorizer::emitSCEVChecks(), llvm::VPWidenCastRecipe::execute(), llvm::VPWidenCallRecipe::execute(), llvm::VPWidenGEPRecipe::execute(), llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPReductionRecipe::execute(), llvm::VPReplicateRecipe::execute(), llvm::VPWidenCanonicalIVRecipe::execute(), llvm::LoopVectorizationCostModel::expectedCost(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InnerLoopVectorizer::fixReduction(), llvm::InnerLoopVectorizer::fixVectorizedLoop(), llvm::BasicTTIImplBase< T >::getIntrinsicInstrCost(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), getStepVector(), llvm::LoopVectorizationCostModel::getWideningCost(), llvm::LoopVectorizationCostModel::getWideningDecision(), llvm::FixedScalableVFPair::hasVector(), llvm::LoopVectorizationCostModel::isLegalGatherOrScatter(), llvm::LoopVectorizationCostModel::isProfitableToScalarize(), llvm::LoopVectorizationCostModel::isScalarWithPredication(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizePass::processLoop(), llvm::LoopVectorizationCostModel::selectInterleaveCount(), and llvm::LoopVectorizationCostModel::setWideningDecision().