LLVM
12.0.0git
|
LinearPolySize is a base class to represent sizes. More...
#include "llvm/Support/TypeSize.h"
Public Types | |
enum | Dims : unsigned { FixedDim = 0, ScalableDim = 1 } |
using | ScalarTy = typename UnivariateLinearPolyBase< LeafTy >::ScalarTy |
![]() | |
using | ScalarTy = typename LinearPolyBaseTypeTraits< LeafTy >::ScalarTy |
Public Member Functions | |
ScalarTy | getKnownMinValue () const |
Returns the minimum value this size can represent. More... | |
bool | isScalable () const |
Returns whether the size is scaled by a runtime quantity (vscale). More... | |
bool | isKnownEven () const |
A return value of true indicates we know at compile time that the number of elements (vscale * Min) is definitely even. More... | |
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. More... | |
ScalarTy | getFixedValue () const |
LeafTy | 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. More... | |
LeafTy | coefficientNextPowerOf2 () const |
void | print (raw_ostream &OS) const |
Printing function. More... | |
![]() | |
bool | operator== (const UnivariateLinearPolyBase &RHS) const |
bool | operator!= (const UnivariateLinearPolyBase &RHS) const |
bool | isZero () const |
bool | isNonZero () const |
operator bool () const | |
ScalarTy | getValue () const |
ScalarTy | getValue (unsigned Dim) const |
LeafTy | getWithIncrement (ScalarTy RHS) |
Add RHS to the value at the univariate dimension. More... | |
LeafTy | getWithDecrement (ScalarTy RHS) |
Subtract RHS from the value at the univariate dimension. More... | |
Static Public Member Functions | |
static LeafTy | getFixed (ScalarTy MinVal) |
static LeafTy | getScalable (ScalarTy MinVal) |
static LeafTy | get (ScalarTy MinVal, bool Scalable) |
static LeafTy | getNull () |
static bool | isKnownLT (const LinearPolySize &LHS, const LinearPolySize &RHS) |
static bool | isKnownGT (const LinearPolySize &LHS, const LinearPolySize &RHS) |
static bool | isKnownLE (const LinearPolySize &LHS, const LinearPolySize &RHS) |
static bool | isKnownGE (const LinearPolySize &LHS, const LinearPolySize &RHS) |
Protected Member Functions | |
LinearPolySize (ScalarTy MinVal, Dims D) | |
LinearPolySize (const UnivariateLinearPolyBase< LeafTy > &V) | |
![]() | |
UnivariateLinearPolyBase (ScalarTy Val, unsigned UnivariateDim) | |
Friends | |
class | UnivariateLinearPolyBase< LeafTy > |
Additional Inherited Members | |
![]() | |
static constexpr auto | Dimensions = LinearPolyBaseTypeTraits<LeafTy>::Dimensions |
![]() | |
ScalarTy | Value |
unsigned | UnivariateDim |
LinearPolySize is a base class to represent sizes.
It is either fixed-sized or it is scalable-sized, but it cannot be both.
Definition at line 261 of file TypeSize.h.
using llvm::LinearPolySize< LeafTy >::ScalarTy = typename UnivariateLinearPolyBase<LeafTy>::ScalarTy |
Definition at line 268 of file TypeSize.h.
enum llvm::LinearPolySize::Dims : unsigned |
Enumerator | |
---|---|
FixedDim | |
ScalableDim |
Definition at line 269 of file TypeSize.h.
|
inlineprotected |
Definition at line 272 of file TypeSize.h.
Referenced by llvm::LinearPolySize< TypeSize >::get(), llvm::LinearPolySize< TypeSize >::getFixed(), and llvm::LinearPolySize< TypeSize >::getScalable().
|
inlineprotected |
Definition at line 275 of file TypeSize.h.
|
inline |
Definition at line 362 of file TypeSize.h.
Referenced by llvm::TargetLoweringBase::getVectorTypeBreakdown().
|
inline |
We do not provide the '/' operator here because division for polynomial types does not work in the same way as for normal integer types.
We can only divide the minimum value (or coefficient) by RHS, which is not the same as (Min * Vscale) / RHS The caller is recommended to use this function in combination with isKnownMultipleOf(RHS), which lets the caller know if it's possible to perform a lossless divide by RHS.
Definition at line 357 of file TypeSize.h.
Referenced by llvm::TargetLoweringBase::getVectorTypeBreakdown().
|
inlinestatic |
Definition at line 286 of file TypeSize.h.
Referenced by llvm::LinearPolySize< TypeSize >::coefficientNextPowerOf2(), llvm::LinearPolySize< TypeSize >::divideCoefficientBy(), and llvm::LinearPolySize< TypeSize >::getNull().
|
inlinestatic |
Definition at line 280 of file TypeSize.h.
|
inline |
Definition at line 309 of file TypeSize.h.
Referenced by llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::GCNTTIImpl::getIntrinsicInstrCost(), llvm::LoopVectorizationCostModel::selectVectorizationFactor(), and llvm::TargetLowering::SimplifyDemandedBits().
|
inline |
Returns the minimum value this size can represent.
Definition at line 293 of file TypeSize.h.
Referenced by llvm::InnerLoopVectorizer::buildScalarSteps(), llvm::LinearPolySize< TypeSize >::coefficientNextPowerOf2(), llvm::TargetLoweringBase::computeRegisterProperties(), llvm::EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(), llvm::EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(), createStepForVF(), llvm::LinearPolySize< TypeSize >::divideCoefficientBy(), llvm::EpilogueVectorizerMainLoop::emitMinimumIterationCountCheck(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPReplicateRecipe::execute(), llvm::VPRegionBlock::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::InnerLoopVectorizer::fixLCSSAPHIs(), foldBitcastExtElt(), getCopyFromPartsVector(), llvm::SelectionDAG::GetDependentSplitDestVTs(), llvm::LinearPolySize< TypeSize >::getFixedValue(), llvm::AArch64TTIImpl::getGatherScatterOpCost(), llvm::DenseMapInfo< ElementCount >::getHashValue(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getIntrinsicInstrCost(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::InnerLoopVectorizer::getOrCreateVectorValue(), llvm::EVT::getPow2VectorType(), llvm::DataLayout::getTypeSizeInBits(), llvm::LoopVectorizationCostModel::getVectorCallCost(), llvm::EVT::getVectorMinNumElements(), llvm::MVT::getVectorMinNumElements(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), hasIrregularType(), llvm::VectorizerValueMap::hasScalarValue(), llvm::VFRange::isEmpty(), llvm::LinearPolySize< TypeSize >::isKnownEven(), llvm::LinearPolySize< TypeSize >::isKnownGE(), llvm::LinearPolySize< TypeSize >::isKnownGT(), llvm::LinearPolySize< TypeSize >::isKnownLE(), llvm::LinearPolySize< TypeSize >::isKnownLT(), llvm::LinearPolySize< TypeSize >::isKnownMultipleOf(), llvm::AArch64TargetLowering::PerformDAGCombine(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), llvm::LinearPolySize< TypeSize >::print(), llvm::EpilogueVectorizerMainLoop::printDebugTracesAtStart(), llvm::EpilogueVectorizerEpilogueLoop::printDebugTracesAtStart(), llvm::LoopVectorizePass::processLoop(), llvm::InnerLoopVectorizer::reverseVector(), llvm::LoopVectorizationCostModel::selectInterleaveCount(), llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(), llvm::InnerLoopVectorizer::setDebugLocFromInst(), SimplifyShuffleVectorInst(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), llvm::VFRange::VFRange(), llvm::InnerLoopVectorizer::widenCallInstruction(), and llvm::InnerLoopVectorizer::widenPHIInstruction().
|
inlinestatic |
Definition at line 290 of file TypeSize.h.
|
inlinestatic |
Definition at line 283 of file TypeSize.h.
|
inline |
A return value of true indicates we know at compile time that the number of elements (vscale * Min) is definitely even.
However, returning false does not guarantee that the total number of elements is odd.
Definition at line 299 of file TypeSize.h.
|
inlinestatic |
Definition at line 343 of file TypeSize.h.
|
inlinestatic |
Definition at line 331 of file TypeSize.h.
|
inlinestatic |
Definition at line 337 of file TypeSize.h.
|
inlinestatic |
Definition at line 325 of file TypeSize.h.
|
inline |
This function tells the caller whether the element count is known at compile time to be a multiple of the scalar value RHS.
Definition at line 302 of file TypeSize.h.
Referenced by llvm::EVT::isByteSized(), and llvm::MVT::isByteSized().
|
inline |
Returns whether the size is scaled by a runtime quantity (vscale).
Definition at line 295 of file TypeSize.h.
Referenced by llvm::InnerLoopVectorizer::buildScalarSteps(), llvm::LinearPolySize< TypeSize >::coefficientNextPowerOf2(), computeKnownBitsFromOperator(), llvm::LoopVectorizationCostModel::computeMaxVF(), llvm::SelectionDAG::CreateStackTemporary(), createStepForVF(), llvm::LinearPolySize< TypeSize >::divideCoefficientBy(), llvm::VPReplicateRecipe::execute(), llvm::VPRegionBlock::execute(), llvm::InnerLoopVectorizer::fixFirstOrderRecurrence(), llvm::InnerLoopVectorizer::fixLCSSAPHIs(), llvm::InnerLoopVectorizer::fixReduction(), foldBitcastExtElt(), llvm::AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters(), llvm::TargetTransformInfoImplBase::getCastInstrCost(), getCopyFromPartsVector(), llvm::SelectionDAG::GetDependentSplitDestVTs(), llvm::LinearPolySize< TypeSize >::getFixedValue(), llvm::DenseMapInfo< ElementCount >::getHashValue(), llvm::AArch64InstrInfo::getMemOperandWithOffsetWidth(), llvm::InnerLoopVectorizer::getOrCreateVectorTripCount(), llvm::InnerLoopVectorizer::getOrCreateVectorValue(), llvm::Type::getPrimitiveSizeInBits(), llvm::EVT::getStoreSize(), llvm::MVT::getStoreSize(), llvm::DataLayout::getTypeStoreSize(), llvm::LoopVectorizationCostModel::getVectorCallCost(), hasIrregularType(), llvm::InlineFunction(), llvm::IntrinsicCostAttributes::IntrinsicCostAttributes(), llvm::isAArch64FrameOffsetLegal(), llvm::LinearPolySize< TypeSize >::isKnownGE(), llvm::LinearPolySize< TypeSize >::isKnownGT(), llvm::LinearPolySize< TypeSize >::isKnownLE(), llvm::LinearPolySize< TypeSize >::isKnownLT(), isLoadInvariantInLoop(), llvm::LoopVectorizationPlanner::plan(), llvm::LoopVectorizationPlanner::planInVPlanNativePath(), llvm::LinearPolySize< TypeSize >::print(), llvm::InnerLoopVectorizer::reverseVector(), llvm::LoopVectorizationCostModel::selectEpilogueVectorizationFactor(), llvm::LoopVectorizationCostModel::selectVectorizationFactor(), llvm::InnerLoopVectorizer::setDebugLocFromInst(), llvm::TargetLowering::SimplifyDemandedBits(), SimplifyShuffleVectorInst(), valueCoversEntireFragment(), llvm::InnerLoopVectorizer::vectorizeInterleaveGroup(), llvm::InnerLoopVectorizer::vectorizeMemoryInstruction(), llvm::VFRange::VFRange(), llvm::InnerLoopVectorizer::widenCallInstruction(), and llvm::InnerLoopVectorizer::widenPHIInstruction().
|
inline |
|
friend |
Definition at line 265 of file TypeSize.h.