LLVM 20.0.0git
|
Functions | |
bool | onlyFirstLaneUsed (const VPValue *Def) |
Returns true if only the first lane of Def is used. | |
bool | onlyFirstPartUsed (const VPValue *Def) |
Returns true if only the first part of Def is used. | |
VPValue * | getOrCreateVPValueForSCEVExpr (VPlan &Plan, const SCEV *Expr, ScalarEvolution &SE) |
Get or create a VPValue that corresponds to the expansion of Expr . | |
const SCEV * | getSCEVExprForVPValue (VPValue *V, ScalarEvolution &SE) |
Return the SCEV expression for V . | |
bool | isUniformAfterVectorization (const VPValue *VPV) |
Returns true if VPV is uniform after vectorization. | |
bool | isHeaderMask (const VPValue *V, VPlan &Plan) |
Return true if V is a header mask in Plan . | |
bool | isUniformAcrossVFsAndUFs (VPValue *V) |
Checks if V is uniform across all VF lanes and UF parts. | |
VPValue * llvm::vputils::getOrCreateVPValueForSCEVExpr | ( | VPlan & | Plan, |
const SCEV * | Expr, | ||
ScalarEvolution & | SE | ||
) |
Get or create a VPValue that corresponds to the expansion of Expr
.
If Expr
is a SCEVConstant or SCEVUnknown, return a VPValue wrapping the live-in value. Otherwise return a VPExpandSCEVRecipe to expand Expr
. If Plan's
pre-header already contains a recipe expanding Expr
, return it. If not, create a new one.
Definition at line 26 of file VPlanUtils.cpp.
References llvm::VPlan::addSCEVExpansion(), llvm::VPBasicBlock::appendRecipe(), llvm::VPValue::getDefiningRecipe(), llvm::VPlan::getEntry(), llvm::VPlan::getOrAddLiveIn(), and llvm::VPlan::getSCEVExpansion().
Referenced by llvm::VPlan::createInitialVPlan(), createWidenInductionRecipes(), and llvm::VPlanTransforms::VPInstructionsToVPRecipes().
const SCEV * llvm::vputils::getSCEVExprForVPValue | ( | VPValue * | V, |
ScalarEvolution & | SE | ||
) |
Return the SCEV expression for V
.
Returns SCEVCouldNotCompute if no SCEV expression could be constructed.
Definition at line 65 of file VPlanUtils.cpp.
References llvm::TypeSwitch< T, ResultT >::Case(), Default, llvm::ScalarEvolution::getCouldNotCompute(), and llvm::ScalarEvolution::getSCEV().
Referenced by llvm::VPlanTransforms::optimizeForVFAndUF(), and llvm::LoopVectorizationPlanner::selectEpilogueVectorizationFactor().
Return true if V
is a header mask in Plan
.
Definition at line 43 of file VPlanUtils.cpp.
References A, B, llvm::VPlan::getOrCreateBackedgeTakenCount(), llvm::VPlan::getTripCount(), llvm::PatternMatch::m_SpecificInt(), and llvm::PatternMatch::match().
Referenced by collectAllHeaderMasks().
Checks if V
is uniform across all VF lanes and UF parts.
It is considered as such if it is either loop invariant (defined outside the vector region) or its operand is known to be uniform across all VFs and UFs (e.g. VPDerivedIV or VPCanonicalIVPHI).
Definition at line 76 of file VPlanUtils.cpp.
References llvm::all_of(), llvm::TypeSwitch< T, ResultT >::Case(), Default, isUniformAcrossVFsAndUFs(), and llvm::PatternMatch::match().
Referenced by isUniformAcrossVFsAndUFs().
Returns true if VPV
is uniform after vectorization.
Definition at line 39 of file VPlanUtils.h.
References llvm::all_of(), assert(), GEP, llvm::VPValue::getDefiningRecipe(), llvm::VPValue::isDefinedOutsideLoopRegions(), and isUniformAfterVectorization().
Referenced by llvm::VPIRInstruction::execute(), llvm::VPReplicateRecipe::execute(), llvm::VPTransformState::get(), isUniformAfterVectorization(), and llvm::InnerLoopVectorizer::scalarizeInstruction().
Returns true if only the first lane of Def
is used.
Definition at line 16 of file VPlanUtils.cpp.
References llvm::all_of().
Referenced by llvm::VPBlendRecipe::computeCost(), llvm::VPInstruction::execute(), llvm::VPBlendRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::VPScalarIVStepsRecipe::execute(), llvm::VPTransformState::get(), llvm::VPInstruction::onlyFirstLaneUsed(), llvm::VPWidenPointerInductionRecipe::onlyScalarsGenerated(), and removeRedundantCanonicalIVs().
Returns true if only the first part of Def
is used.
Definition at line 21 of file VPlanUtils.cpp.
References llvm::all_of().
Referenced by llvm::VPInstruction::onlyFirstPartUsed().