|
LLVM 22.0.0git
|
This is the base class of the VPlan Def/Use graph, used for modeling the data flow into, within and out of the VPlan. More...
#include "Transforms/Vectorize/VPlanValue.h"
Public Types | |
| enum | { VPVIRValueSC , VPVSymbolicSC , VPVRecipeValueSC } |
| An enumeration for keeping track of the concrete subclass of VPValue that are actually instantiated. More... | |
| typedef SmallVectorImpl< VPUser * >::iterator | user_iterator |
| typedef SmallVectorImpl< VPUser * >::const_iterator | const_user_iterator |
| typedef iterator_range< user_iterator > | user_range |
| typedef iterator_range< const_user_iterator > | const_user_range |
Public Member Functions | |
| Value * | getUnderlyingValue () const |
| Return the underlying Value attached to this VPValue. | |
| Value * | getLiveInIRValue () const |
| Return the underlying IR value for a VPIRValue. | |
| VPValue (const VPValue &)=delete | |
| VPValue & | operator= (const VPValue &)=delete |
| virtual | ~VPValue () |
| unsigned | getVPValueID () const |
| void | printAsOperand (raw_ostream &OS, VPSlotTracker &Tracker) const |
| void | print (raw_ostream &OS, VPSlotTracker &Tracker) const |
| void | dump () const |
| Dump the value to stderr (for debugging). | |
| unsigned | getNumUsers () const |
| void | addUser (VPUser &User) |
| void | removeUser (VPUser &User) |
Remove a single User from the list of users. | |
| user_iterator | user_begin () |
| const_user_iterator | user_begin () const |
| user_iterator | user_end () |
| const_user_iterator | user_end () const |
| user_range | users () |
| const_user_range | users () const |
| bool | hasMoreThanOneUniqueUser () const |
| Returns true if the value has more than one unique user. | |
| bool | hasOneUse () const |
| VPUser * | getSingleUser () |
| Return the single user of this value, or nullptr if there is not exactly one user. | |
| const VPUser * | getSingleUser () const |
| void | replaceAllUsesWith (VPValue *New) |
| void | replaceUsesWithIf (VPValue *New, llvm::function_ref< bool(VPUser &U, unsigned Idx)> ShouldReplace) |
Go through the uses list for this VPValue and make each use point to New if the callback ShouldReplace returns true for the given use specified by a pair of (VPUser, the use index). | |
| VPRecipeBase * | getDefiningRecipe () |
| Returns the recipe defining this VPValue or nullptr if it is not defined by a recipe, i.e. | |
| const VPRecipeBase * | getDefiningRecipe () const |
| bool | hasDefiningRecipe () const |
| Returns true if this VPValue is defined by a recipe. | |
| bool | isDefinedOutsideLoopRegions () const |
| Returns true if the VPValue is defined outside any loop. | |
| void | setUnderlyingValue (Value *Val) |
Friends | |
| class | VPDef |
| struct | VPDoubleValueDef |
| class | VPlan |
| struct | VPIRValue |
| struct | VPSymbolicValue |
| class | VPRecipeValue |
This is the base class of the VPlan Def/Use graph, used for modeling the data flow into, within and out of the VPlan.
VPValues can stand for live-ins coming from the input IR, symbolic values and values defined by recipes.
Definition at line 45 of file VPlanValue.h.
Definition at line 118 of file VPlanValue.h.
Definition at line 120 of file VPlanValue.h.
| typedef SmallVectorImpl<VPUser*>::iterator llvm::VPValue::user_iterator |
Definition at line 117 of file VPlanValue.h.
Definition at line 119 of file VPlanValue.h.
| anonymous enum |
|
inlinevirtual |
Definition at line 88 of file VPlanValue.h.
References assert().
|
inline |
Definition at line 106 of file VPlanValue.h.
Referenced by llvm::VPUser::addOperand().
| void VPValue::dump | ( | ) | const |
Dump the value to stderr (for debugging).
Definition at line 102 of file VPlan.cpp.
References llvm::dbgs(), getDefiningRecipe(), and print().
| VPRecipeBase * VPValue::getDefiningRecipe | ( | ) |
Returns the recipe defining this VPValue or nullptr if it is not defined by a recipe, i.e.
is a live-in.
Definition at line 119 of file VPlan.cpp.
References llvm::cast(), and llvm::dyn_cast().
Referenced by canNarrowLoad(), llvm::VPlanTransforms::canonicalizeEVLLoops(), llvm::VPReductionRecipe::classof(), llvm::VPlanTransforms::createInterleaveGroups(), createReplicateRegion(), createWidenInductionRecipe(), dump(), expandVPWidenIntOrFpInduction(), findRecipe(), getOptimizableIVOf(), hasDefiningRecipe(), isDefinedInsideLoopRegions(), llvm::vputils::isSingleScalar(), preparePlanForMainVectorLoop(), print(), recursivelyDeleteDeadRecipes(), removeCommonBlendMask(), transformRecipestoEVLRecipes(), llvm::VPRecipeBuilder::tryToCreatePartialReduction(), and tryToMatchAndCreateMulAccumulateReduction().
| const VPRecipeBase * VPValue::getDefiningRecipe | ( | ) | const |
Definition at line 126 of file VPlan.cpp.
References llvm::cast(), and llvm::dyn_cast().
| Value * VPValue::getLiveInIRValue | ( | ) | const |
Return the underlying IR value for a VPIRValue.
Definition at line 133 of file VPlan.cpp.
References llvm::cast().
Referenced by llvm::VPInstruction::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPDerivedIVRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPWidenRecipe::execute(), llvm::LoopVectorizationPlanner::executePlan(), llvm::VPWidenCallRecipe::getCalledScalarFunction(), getStartValueFromReductionResult(), llvm::VPlanTransforms::materializeConstantVectorTripCount(), preparePlanForEpilogueVectorLoop(), and preparePlanForMainVectorLoop().
|
inline |
Definition at line 105 of file VPlanValue.h.
Referenced by createReplicateRegion(), llvm::VPlanTransforms::handleMultiUseReductions(), hasMoreThanOneUniqueUser(), hasOneUse(), llvm::VPlanTransforms::materializeBackedgeTakenCount(), llvm::VPlanTransforms::materializeBroadcasts(), llvm::VPlanTransforms::materializeVectorTripCount(), llvm::VPlanTransforms::materializeVFAndVFxUF(), replaceUsesWithIf(), llvm::VPlan::resetTripCount(), simplifyBlends(), and transformRecipestoEVLRecipes().
|
inline |
Return the single user of this value, or nullptr if there is not exactly one user.
Definition at line 147 of file VPlanValue.h.
References hasOneUse(), and user_begin().
Definition at line 148 of file VPlanValue.h.
References hasOneUse(), and user_begin().
|
inline |
Return the underlying Value attached to this VPValue.
Definition at line 72 of file VPlanValue.h.
Referenced by llvm::VPBlendRecipe::clone(), llvm::VPInstruction::clone(), llvm::VPInstructionWithType::clone(), llvm::VPPhi::clone(), llvm::VPReductionPHIRecipe::clone(), llvm::VPWidenCallRecipe::clone(), llvm::VPWidenCastRecipe::clone(), llvm::VPWidenIntrinsicRecipe::clone(), llvm::VPWidenPHIRecipe::clone(), llvm::VPInstruction::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), llvm::VPWidenCallRecipe::execute(), llvm::VPWidenIntrinsicRecipe::execute(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), llvm::VPWidenInductionRecipe::getPHINode(), llvm::VPIRValue::getType(), llvm::VPSingleDefRecipe::getUnderlyingInstr(), llvm::VPSingleDefRecipe::getUnderlyingInstr(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), llvm::VPIRValue::getValue(), llvm::VPlanTransforms::materializeVectorTripCount(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::VPlanTransforms::tryToConvertVPInstructionsToVPRecipes(), and llvm::VPReductionEVLRecipe::VPReductionEVLRecipe().
|
inline |
Definition at line 95 of file VPlanValue.h.
|
inline |
Returns true if this VPValue is defined by a recipe.
Definition at line 167 of file VPlanValue.h.
References getDefiningRecipe().
|
inline |
Returns true if the value has more than one unique user.
Definition at line 132 of file VPlanValue.h.
References getNumUsers(), user_begin(), and user_end().
|
inline |
Definition at line 143 of file VPlanValue.h.
References getNumUsers().
Referenced by getSingleUser(), and getSingleUser().
| bool VPValue::isDefinedOutsideLoopRegions | ( | ) | const |
Returns true if the VPValue is defined outside any loop.
Definition at line 1382 of file VPlan.cpp.
References isDefinedInsideLoopRegions().
Referenced by llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), and llvm::VPlanTransforms::hoistInvariantLoads().
| void VPValue::print | ( | raw_ostream & | OS, |
| VPSlotTracker & | Tracker ) const |
Definition at line 95 of file VPlan.cpp.
References getDefiningRecipe(), and printAsOperand().
Referenced by dump().
| void VPValue::printAsOperand | ( | raw_ostream & | OS, |
| VPSlotTracker & | Tracker ) const |
Definition at line 1424 of file VPlan.cpp.
References llvm::VPSlotTracker::getOrCreateName().
Referenced by print(), llvm::VPActiveLaneMaskPHIRecipe::printRecipe(), llvm::VPBlendRecipe::printRecipe(), llvm::VPCanonicalIVPHIRecipe::printRecipe(), llvm::VPDerivedIVRecipe::printRecipe(), llvm::VPEVLBasedIVPHIRecipe::printRecipe(), llvm::VPExpandSCEVRecipe::printRecipe(), llvm::VPExpressionRecipe::printRecipe(), llvm::VPFirstOrderRecurrencePHIRecipe::printRecipe(), llvm::VPHistogramRecipe::printRecipe(), llvm::VPInstruction::printRecipe(), llvm::VPInstructionWithType::printRecipe(), llvm::VPInterleaveEVLRecipe::printRecipe(), llvm::VPInterleaveRecipe::printRecipe(), llvm::VPPhi::printRecipe(), llvm::VPPredInstPHIRecipe::printRecipe(), llvm::VPReductionEVLRecipe::printRecipe(), llvm::VPReductionPHIRecipe::printRecipe(), llvm::VPReductionRecipe::printRecipe(), llvm::VPReplicateRecipe::printRecipe(), llvm::VPScalarIVStepsRecipe::printRecipe(), llvm::VPVectorEndPointerRecipe::printRecipe(), llvm::VPVectorPointerRecipe::printRecipe(), llvm::VPWidenCallRecipe::printRecipe(), llvm::VPWidenCanonicalIVRecipe::printRecipe(), llvm::VPWidenCastRecipe::printRecipe(), llvm::VPWidenGEPRecipe::printRecipe(), llvm::VPWidenIntOrFpInductionRecipe::printRecipe(), llvm::VPWidenIntrinsicRecipe::printRecipe(), llvm::VPWidenLoadEVLRecipe::printRecipe(), llvm::VPWidenLoadRecipe::printRecipe(), llvm::VPWidenPHIRecipe::printRecipe(), llvm::VPWidenPointerInductionRecipe::printRecipe(), and llvm::VPWidenRecipe::printRecipe().
|
inline |
Remove a single User from the list of users.
Definition at line 109 of file VPlanValue.h.
| void VPValue::replaceAllUsesWith | ( | VPValue * | New | ) |
Definition at line 1385 of file VPlan.cpp.
References replaceUsesWithIf().
Referenced by llvm::VPlanTransforms::addActiveLaneMask(), llvm::VPlanTransforms::addExitUsersForFirstOrderRecurrences(), llvm::VPlanTransforms::canonicalizeEVLLoops(), llvm::VPlanTransforms::convertToConcreteRecipes(), llvm::VPlanTransforms::createInterleaveGroups(), createReplicateRegion(), llvm::VPExpressionRecipe::decompose(), llvm::VPRegionBlock::dissolveToCFGLoop(), llvm::VPlanTransforms::expandSCEVs(), expandVPWidenIntOrFpInduction(), llvm::VPlanTransforms::materializeBackedgeTakenCount(), llvm::VPlanTransforms::materializeVectorTripCount(), llvm::VPlanTransforms::materializeVFAndVFxUF(), llvm::VPlanTransforms::narrowInterleaveGroups(), preparePlanForEpilogueVectorLoop(), removeRedundantCanonicalIVs(), removeRedundantInductionCasts(), simplifyBlends(), simplifyBranchConditionForVFAndUF(), transformRecipestoEVLRecipes(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), and llvm::VPlanTransforms::tryToConvertVPInstructionsToVPRecipes().
| void VPValue::replaceUsesWithIf | ( | VPValue * | New, |
| llvm::function_ref< bool(VPUser &U, unsigned Idx)> | ShouldReplace ) |
Go through the uses list for this VPValue and make each use point to New if the callback ShouldReplace returns true for the given use specified by a pair of (VPUser, the use index).
Definition at line 1389 of file VPlan.cpp.
References llvm::User::getNumOperands(), getNumUsers(), llvm::User::getOperand(), I, and llvm::User::setOperand().
Referenced by llvm::VPlanTransforms::materializeVFAndVFxUF(), mergeReplicateRegionsIntoSuccessors(), preparePlanForMainVectorLoop(), replaceAllUsesWith(), llvm::VPlanTransforms::replaceSymbolicStrides(), sinkScalarOperands(), and transformRecipestoEVLRecipes().
|
inline |
Definition at line 173 of file VPlanValue.h.
References assert().
Referenced by llvm::VPlanTransforms::materializeConstantVectorTripCount(), and llvm::VPReductionRecipe::VPReductionRecipe().
|
inline |
Definition at line 122 of file VPlanValue.h.
Referenced by getSingleUser(), getSingleUser(), hasMoreThanOneUniqueUser(), users(), and users().
|
inline |
Definition at line 123 of file VPlanValue.h.
|
inline |
Definition at line 124 of file VPlanValue.h.
Referenced by hasMoreThanOneUniqueUser(), users(), and users().
|
inline |
Definition at line 125 of file VPlanValue.h.
|
inline |
Definition at line 126 of file VPlanValue.h.
References user_begin(), and user_end().
Referenced by llvm::VPlanTransforms::addActiveLaneMask(), llvm::VPlanTransforms::createInLoopReductionRecipes(), findHeaderMask(), findRecipe(), removeRedundantCanonicalIVs(), removeRedundantInductionCasts(), sinkRecurrenceUsersAfterPrevious(), sinkScalarOperands(), and transformRecipestoEVLRecipes().
|
inline |
Definition at line 127 of file VPlanValue.h.
References user_begin(), and user_end().
|
friend |
|
friend |
Definition at line 47 of file VPlanValue.h.
References VPDoubleValueDef.
Referenced by VPDoubleValueDef.
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 50 of file VPlanValue.h.
References VPSymbolicValue.
Referenced by VPSymbolicValue.