|
LLVM 23.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 | 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 46 of file VPlanValue.h.
Definition at line 117 of file VPlanValue.h.
Definition at line 119 of file VPlanValue.h.
| typedef SmallVectorImpl<VPUser*>::iterator llvm::VPValue::user_iterator |
Definition at line 116 of file VPlanValue.h.
Definition at line 118 of file VPlanValue.h.
| anonymous enum |
|
inlinevirtual |
Definition at line 87 of file VPlanValue.h.
References assert().
|
inline |
Definition at line 105 of file VPlanValue.h.
Referenced by llvm::VPUser::addOperand().
| void VPValue::dump | ( | ) | const |
Dump the value to stderr (for debugging).
Definition at line 106 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 125 of file VPlan.cpp.
References llvm::dyn_cast().
Referenced by canNarrowLoad(), llvm::VPlanTransforms::canonicalizeEVLLoops(), llvm::VPReductionRecipe::classof(), llvm::VPlanTransforms::createInterleaveGroups(), createReplicateRegion(), createWidenInductionRecipe(), dump(), expandVPWidenIntOrFpInduction(), llvm::vputils::findRecipe(), fixupVFUsersForEVL(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), getOptimizableIVOf(), hasDefiningRecipe(), isDefinedInsideLoopRegions(), llvm::vputils::isSingleScalar(), preparePlanForMainVectorLoop(), print(), recursivelyDeleteDeadRecipes(), removeCommonBlendMask(), llvm::VPRecipeBuilder::tryToCreatePartialReduction(), and tryToMatchAndCreateMulAccumulateReduction().
| const VPRecipeBase * VPValue::getDefiningRecipe | ( | ) | const |
Definition at line 130 of file VPlan.cpp.
References llvm::dyn_cast().
| Value * VPValue::getLiveInIRValue | ( | ) | const |
Return the underlying IR value for a VPIRValue.
Definition at line 135 of file VPlan.cpp.
References llvm::cast().
Referenced by llvm::VPReplicateRecipe::computeCost(), llvm::VPDerivedIVRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::LoopVectorizationPlanner::executePlan(), llvm::VPWidenCallRecipe::getCalledScalarFunction(), llvm::VPlanTransforms::materializeConstantVectorTripCount(), preparePlanForEpilogueVectorLoop(), and preparePlanForMainVectorLoop().
|
inline |
Definition at line 104 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(), and simplifyBlends().
|
inline |
Return the single user of this value, or nullptr if there is not exactly one user.
Definition at line 146 of file VPlanValue.h.
References hasOneUse(), and user_begin().
Definition at line 147 of file VPlanValue.h.
References hasOneUse(), and user_begin().
|
inline |
Return the underlying Value attached to this VPValue.
Definition at line 71 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::VPIRValue::getValue(), llvm::VPlanTransforms::materializeVectorTripCount(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::VPlanTransforms::tryToConvertVPInstructionsToVPRecipes(), and llvm::VPReductionEVLRecipe::VPReductionEVLRecipe().
|
inline |
Definition at line 94 of file VPlanValue.h.
|
inline |
Returns true if this VPValue is defined by a recipe.
Definition at line 166 of file VPlanValue.h.
References getDefiningRecipe().
|
inline |
Returns true if the value has more than one unique user.
Definition at line 131 of file VPlanValue.h.
References getNumUsers(), user_begin(), and user_end().
|
inline |
Definition at line 142 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 1384 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 99 of file VPlan.cpp.
References getDefiningRecipe(), and printAsOperand().
Referenced by dump().
| void VPValue::printAsOperand | ( | raw_ostream & | OS, |
| VPSlotTracker & | Tracker ) const |
Definition at line 1426 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 108 of file VPlanValue.h.
| void VPValue::replaceAllUsesWith | ( | VPValue * | New | ) |
Definition at line 1387 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(), fixupVFUsersForEVL(), llvm::VPlanTransforms::handleFindLastReductions(), llvm::VPlanTransforms::materializeBackedgeTakenCount(), llvm::VPlanTransforms::materializeVectorTripCount(), llvm::VPlanTransforms::materializeVFAndVFxUF(), llvm::VPlanTransforms::narrowInterleaveGroups(), preparePlanForEpilogueVectorLoop(), removeRedundantCanonicalIVs(), removeRedundantInductionCasts(), simplifyBlends(), simplifyBranchConditionForVFAndUF(), simplifyRecipe(), 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 1391 of file VPlan.cpp.
References llvm::User::getNumOperands(), getNumUsers(), llvm::User::getOperand(), I, and llvm::User::setOperand().
Referenced by fixupVFUsersForEVL(), llvm::VPlanTransforms::materializeVFAndVFxUF(), mergeReplicateRegionsIntoSuccessors(), preparePlanForMainVectorLoop(), replaceAllUsesWith(), llvm::VPlanTransforms::replaceSymbolicStrides(), and sinkScalarOperands().
|
inline |
Definition at line 172 of file VPlanValue.h.
References assert().
Referenced by llvm::VPlanTransforms::materializeConstantVectorTripCount(), and llvm::VPReductionRecipe::VPReductionRecipe().
|
inline |
Definition at line 121 of file VPlanValue.h.
Referenced by getSingleUser(), getSingleUser(), hasMoreThanOneUniqueUser(), users(), and users().
|
inline |
Definition at line 122 of file VPlanValue.h.
|
inline |
Definition at line 123 of file VPlanValue.h.
Referenced by hasMoreThanOneUniqueUser(), users(), and users().
|
inline |
Definition at line 124 of file VPlanValue.h.
|
inline |
Definition at line 125 of file VPlanValue.h.
References user_begin(), and user_end().
Referenced by llvm::VPlanTransforms::addActiveLaneMask(), llvm::VPlanTransforms::createInLoopReductionRecipes(), findHeaderMask(), llvm::vputils::findRecipe(), fixupVFUsersForEVL(), poisonGuaranteesUB(), removeRedundantCanonicalIVs(), removeRedundantInductionCasts(), sinkRecurrenceUsersAfterPrevious(), and sinkScalarOperands().
|
inline |
Definition at line 126 of file VPlanValue.h.
References user_begin(), and user_end().
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 49 of file VPlanValue.h.
References VPSymbolicValue.
Referenced by VPSymbolicValue.