LLVM: llvm::VPValue Class Reference (original) (raw)
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](VPlanValue%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| enum | { VPValueSC, VPVRecipeSC } |
| 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. | |
| 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 | isLiveIn () const |
| Returns true if this VPValue is a live-in, i.e. defined outside the VPlan. | |
| Value * | getLiveInIRValue () const |
| Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan. | |
| bool | isDefinedOutsideLoopRegions () const |
| Returns true if the VPValue is defined outside any loop. | |
| void | setUnderlyingValue (Value *Val) |
| Protected Member Functions |
|---|
| Friends | |
|---|---|
| class | VPDef |
| struct | VPDoubleValueDef |
| class | VPInterleaveBase |
| class | VPlan |
| class | VPExpressionRecipe |
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 and instructions which VPlan will generate if executed.
Definition at line 48 of file VPlanValue.h.
◆ const_user_iterator
◆ const_user_range
◆ user_iterator
◆ user_range
◆ anonymous enum
An enumeration for keeping track of the concrete subclass of VPValue that are actually instantiated.
| Enumerator | |
|---|---|
| VPValueSC | |
| VPVRecipeSC | A generic VPValue, like live-in values or defined by a recipe that defines multiple values. A VPValue sub-class that is a VPRecipeBase. |
Definition at line 89 of file VPlanValue.h.
◆ VPValue() [1/5]
Definition at line 94 of file VPlan.cpp.
References Def, UnderlyingVal, and VPDef.
Referenced by llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenLoadEVLRecipe::getEVL(), operator=(), replaceAllUsesWith(), replaceUsesWithIf(), llvm::VPWidenLoadEVLRecipe::usesFirstLaneOnly(), llvm::VPWidenLoadRecipe::usesFirstLaneOnly(), llvm::VPSingleDefRecipe::VPSingleDefRecipe(), llvm::VPSingleDefRecipe::VPSingleDefRecipe(), VPValue(), VPValue(), VPValue(), VPValue(), llvm::VPWidenLoadEVLRecipe::VPWidenLoadEVLRecipe(), and llvm::VPWidenLoadRecipe::VPWidenLoadRecipe().
◆ VPValue() [2/5]
| llvm::VPValue::VPValue ( Value * UV = nullptr) | inlineprotected |
|---|
◆ VPValue() [3/5]
| llvm::VPValue::VPValue ( VPDef * Def, Value * UV = nullptr ) | inlineprotected |
|---|
◆ VPValue() [4/5]
| llvm::VPValue::VPValue ( Value * UV, VPDef * Def ) | inlineprotected |
|---|
◆ VPValue() [5/5]
| VPValue::~VPValue ( ) | virtual |
|---|
◆ addUser()
| void llvm::VPValue::addUser ( VPUser & User) | inline |
|---|
◆ dump()
| void VPValue::dump | ( | ) | const |
|---|
◆ getDefiningRecipe() [1/2]
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 131 of file VPlan.cpp.
References llvm::cast_or_null(), and Def.
Referenced by canNarrowLoad(), llvm::VPlanTransforms::canonicalizeEVLLoops(), llvm::VPReductionRecipe::classof(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPlanTransforms::createInterleaveGroups(), createReplicateRegion(), createWidenInductionRecipes(), dump(), expandVPWidenIntOrFpInduction(), getAddressAccessSCEV(), getOptimizableIVOf(), hasDefiningRecipe(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), isDefinedInsideLoopRegions(), llvm::vputils::isSingleScalar(), preparePlanForMainVectorLoop(), print(), recursivelyDeleteDeadRecipes(), removeCommonBlendMask(), transformRecipestoEVLRecipes(), llvm::VPRecipeBuilder::tryToCreatePartialReduction(), tryToMatchAndCreateMulAccumulateReduction(), and ~VPValue().
◆ getDefiningRecipe() [2/2]
◆ getLiveInIRValue()
| Value * llvm::VPValue::getLiveInIRValue ( ) const | inline |
|---|
Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan.
Returns nullptr if the VPValue is defined by a VPDef inside a VPlan.
Definition at line 183 of file VPlanValue.h.
References assert(), getUnderlyingValue(), and isLiveIn().
Referenced by llvm::VPHistogramRecipe::computeCost(), llvm::VPInstruction::computeCost(), llvm::VPReplicateRecipe::computeCost(), llvm::VPDerivedIVRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPWidenRecipe::execute(), llvm::LoopVectorizationPlanner::executePlan(), llvm::VPWidenCallRecipe::getCalledScalarFunction(), llvm::VPCanonicalIVPHIRecipe::getScalarType(), llvm::VPDerivedIVRecipe::getScalarType(), llvm::VPWidenIntOrFpInductionRecipe::getScalarType(), getStartValueFromReductionResult(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::VPlanPatternMatch::bind_apint::match(), llvm::VPlanPatternMatch::int_pred_ty< is_specific_int, Bitwidth >::match(), llvm::VPlanTransforms::materializeConstantVectorTripCount(), llvm::VPlanTransforms::materializeVectorTripCount(), preparePlanForEpilogueVectorLoop(), and preparePlanForMainVectorLoop().
◆ getNumUsers()
| unsigned llvm::VPValue::getNumUsers ( ) const | inline |
|---|
Definition at line 113 of file VPlanValue.h.
Referenced by llvm::VPWidenCastRecipe::computeCost(), 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().
◆ getSingleUser() [1/2]
| VPUser * llvm::VPValue::getSingleUser ( ) | inline |
|---|
◆ getSingleUser() [2/2]
| const VPUser * llvm::VPValue::getSingleUser ( ) const | inline |
|---|
◆ getUnderlyingValue()
| Value * llvm::VPValue::getUnderlyingValue ( ) const | inline |
|---|
Return the underlying Value attached to this VPValue.
Definition at line 85 of file VPlanValue.h.
References UnderlyingVal.
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::VPWidenSelectRecipe::computeCost(), llvm::VPlanTransforms::dropPoisonGeneratingRecipes(), llvm::VPWidenCallRecipe::execute(), llvm::VPWidenIntrinsicRecipe::execute(), llvm::VPRecipeWithIRFlags::getCostForRecipeWithOpcode(), getLiveInIRValue(), llvm::VPWidenInductionRecipe::getPHINode(), llvm::VPSingleDefRecipe::getUnderlyingInstr(), llvm::VPSingleDefRecipe::getUnderlyingInstr(), llvm::VPUnrollPartAccessor< 1 >::getUnrollPart(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::VPlanTransforms::tryToConvertVPInstructionsToVPRecipes(), and llvm::VPReductionEVLRecipe::VPReductionEVLRecipe().
◆ getVPValueID()
| unsigned llvm::VPValue::getVPValueID ( ) const | inline |
|---|
Returns
an ID for the concrete type of this object. This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves.
Definition at line 103 of file VPlanValue.h.
◆ hasDefiningRecipe()
| bool llvm::VPValue::hasDefiningRecipe ( ) const | inline |
|---|
◆ hasMoreThanOneUniqueUser()
| bool llvm::VPValue::hasMoreThanOneUniqueUser ( ) const | inline |
|---|
◆ hasOneUse()
| bool llvm::VPValue::hasOneUse ( ) const | inline |
|---|
◆ isDefinedOutsideLoopRegions()
| bool VPValue::isDefinedOutsideLoopRegions | ( | ) | const |
|---|
◆ isLiveIn()
| bool llvm::VPValue::isLiveIn ( ) const | inline |
|---|
Returns true if this VPValue is a live-in, i.e. defined outside the VPlan.
Definition at line 178 of file VPlanValue.h.
References hasDefiningRecipe().
Referenced by llvm::VPHistogramRecipe::computeCost(), llvm::VPWidenCastRecipe::computeCost(), llvm::VPIRInstruction::extractLastLaneOfLastPartOfFirstOperand(), getLiveInIRValue(), llvm::VPlan::getOrAddLiveIn(), llvm::VPlanTransforms::handleUncountableEarlyExit(), isAlreadyNarrow(), llvm::vputils::isSingleScalar(), llvm::VPlanPatternMatch::bind_apint::match(), llvm::VPlanPatternMatch::int_pred_ty< is_specific_int, Bitwidth >::match(), llvm::VPlanPatternMatch::live_in_vpvalue::match(), llvm::VPlanTransforms::materializeConstantVectorTripCount(), llvm::VPlanTransforms::materializeVectorTripCount(), and tryToMatchAndCreateMulAccumulateReduction().
◆ operator=()
◆ print()
◆ printAsOperand()
Definition at line 1416 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(), llvm::VPWidenRecipe::printRecipe(), and llvm::VPWidenSelectRecipe::printRecipe().
◆ removeUser()
| void llvm::VPValue::removeUser ( VPUser & User) | inline |
|---|
◆ replaceAllUsesWith()
| void VPValue::replaceAllUsesWith | ( | VPValue * | New | ) |
|---|
Definition at line 1377 of file VPlan.cpp.
References replaceUsesWithIf(), and VPValue().
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().
◆ replaceUsesWithIf()
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 1381 of file VPlan.cpp.
References llvm::User::getNumOperands(), getNumUsers(), llvm::User::getOperand(), I, llvm::User::setOperand(), and VPValue().
Referenced by llvm::VPlanTransforms::materializeVFAndVFxUF(), mergeReplicateRegionsIntoSuccessors(), preparePlanForMainVectorLoop(), replaceAllUsesWith(), llvm::VPlanTransforms::replaceSymbolicStrides(), sinkScalarOperands(), and transformRecipestoEVLRecipes().
◆ setUnderlyingValue()
| void llvm::VPValue::setUnderlyingValue ( Value * Val) | inline |
|---|
◆ user_begin() [1/2]
| user_iterator llvm::VPValue::user_begin ( ) | inline |
|---|
◆ user_begin() [2/2]
| const_user_iterator llvm::VPValue::user_begin ( ) const | inline |
|---|
◆ user_end() [1/2]
| user_iterator llvm::VPValue::user_end ( ) | inline |
|---|
◆ user_end() [2/2]
| const_user_iterator llvm::VPValue::user_end ( ) const | inline |
|---|
◆ users() [1/2]
| user_range llvm::VPValue::users ( ) | inline |
|---|
◆ users() [2/2]
| const_user_range llvm::VPValue::users ( ) const | inline |
|---|
◆ VPDef
◆ VPDoubleValueDef
| friend struct VPDoubleValueDef | friend |
|---|
◆ VPExpressionRecipe
◆ VPInterleaveBase
◆ VPlan
◆ Def
| VPDef* llvm::VPValue::Def | protected |
|---|
◆ UnderlyingVal
| Value* llvm::VPValue::UnderlyingVal | protected |
|---|
The documentation for this class was generated from the following files:
- lib/Transforms/Vectorize/VPlanValue.h
- lib/Transforms/Vectorize/VPlan.cpp