LLVM 17.0.0git
|
#include "Transforms/Vectorize/VPlanValue.h"
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 () |
Return the underlying Value attached to this VPValue. | |
const Value * | getUnderlyingValue () const |
VPValue (Value *UV=nullptr) | |
Create a live-in VPValue. | |
VPValue (VPDef *Def, Value *UV=nullptr) | |
Create a VPValue for a Def which is a subclass of VPValue. | |
VPValue (Value *UV, VPDef *Def) | |
Create a VPValue for a Def which defines multiple values. | |
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 () |
Returns true if the value has more than one unique user. | |
void | replaceAllUsesWith (VPValue *New) |
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 () |
Returns the underlying IR value, if this VPValue is defined outside the scope of VPlan. | |
const Value * | getLiveInIRValue () const |
bool | isDefinedOutsideVectorRegions () const |
Returns true if the VPValue is defined outside any vector regions, i.e. | |
Protected Member Functions | |
VPValue (const unsigned char SC, Value *UV=nullptr, VPDef *Def=nullptr) | |
void | setUnderlyingValue (Value *Val) |
Protected Attributes | |
Value * | UnderlyingVal |
VPDef * | Def |
Pointer to the VPDef that defines this VPValue. | |
Friends | |
class | VPBuilder |
class | VPDef |
class | VPInstruction |
struct | VPlanTransforms |
class | VPBasicBlock |
class | VPInterleavedAccessInfo |
class | VPSlotTracker |
class | VPRecipeBase |
class | VPWidenMemoryInstructionRecipe |
Definition at line 44 of file VPlanValue.h.
Definition at line 139 of file VPlanValue.h.
Definition at line 141 of file VPlanValue.h.
typedef SmallVectorImpl<VPUser*>::iterator llvm::VPValue::user_iterator |
Definition at line 138 of file VPlanValue.h.
Definition at line 140 of file VPlanValue.h.
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.
|
inline |
Create a live-in VPValue.
Definition at line 96 of file VPlanValue.h.
Create a VPValue for a Def
which is a subclass of VPValue.
Definition at line 98 of file VPlanValue.h.
Create a VPValue for a Def
which defines multiple values.
Definition at line 100 of file VPlanValue.h.
|
virtual |
|
inline |
Definition at line 120 of file VPlanValue.h.
References Users.
Referenced by llvm::VPUser::addOperand().
void VPValue::dump | ( | ) | const |
Dump the value to stderr (for debugging).
Definition at line 99 of file VPlan.cpp.
References llvm::dbgs(), Def, llvm::VPRecipeBase::getParent(), llvm::VPBlockBase::getPlan(), 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 116 of file VPlan.cpp.
References Def.
Referenced by llvm::VPHeaderPHIRecipe::getBackedgeRecipe(), llvm::vputils::getOrCreateVPValueForSCEVExpr(), llvm::VPWidenCanonicalIVRecipe::getScalarType(), hasDefiningRecipe(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::VPCanonicalIVPHIRecipe::isCanonical(), llvm::vputils::isUniformAfterVectorization(), and llvm::VPlanTransforms::optimizeInductions().
const VPRecipeBase * VPValue::getDefiningRecipe | ( | ) | 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 180 of file VPlanValue.h.
References assert(), getUnderlyingValue(), and isLiveIn().
Referenced by llvm::VPWidenIntOrFpInductionRecipe::execute(), llvm::VPWidenPointerInductionRecipe::execute(), llvm::VPFirstOrderRecurrencePHIRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPCanonicalIVPHIRecipe::execute(), llvm::VPDerivedIVRecipe::execute(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InnerLoopVectorizer::fixupIVUsers(), llvm::VPCanonicalIVPHIRecipe::getScalarType(), llvm::VPWidenIntOrFpInductionRecipe::isCanonical(), llvm::VPCanonicalIVPHIRecipe::isCanonical(), and llvm::VPlanTransforms::optimizeForVFAndUF().
Definition at line 185 of file VPlanValue.h.
References assert(), getUnderlyingValue(), and isLiveIn().
|
inline |
Definition at line 119 of file VPlanValue.h.
References Users.
Referenced by createReplicateRegion(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), and hasMoreThanOneUniqueUser().
|
inline |
Return the underlying Value attached to this VPValue.
Definition at line 84 of file VPlanValue.h.
References UnderlyingVal.
Referenced by llvm::VPWidenRecipe::execute(), llvm::VPWidenCastRecipe::execute(), llvm::VPReductionPHIRecipe::execute(), llvm::VPPredInstPHIRecipe::execute(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), llvm::InnerLoopVectorizer::fixReduction(), getLiveInIRValue(), llvm::VPWidenPHIRecipe::print(), and llvm::VPlanTransforms::VPInstructionsToVPRecipes().
Definition at line 85 of file VPlanValue.h.
References UnderlyingVal.
|
inline |
Definition at line 109 of file VPlanValue.h.
|
inline |
Returns true if this VPValue is defined by a recipe.
Definition at line 172 of file VPlanValue.h.
References getDefiningRecipe().
Referenced by isDefinedOutsideVectorRegions(), and isLiveIn().
|
inline |
Returns true if the value has more than one unique user.
Definition at line 153 of file VPlanValue.h.
References getNumUsers(), user_begin(), and user_end().
|
inline |
Returns true if the VPValue is defined outside any vector regions, i.e.
it is a live-in value. TODO: Also handle recipes defined in pre-header blocks.
Definition at line 194 of file VPlanValue.h.
References hasDefiningRecipe().
Referenced by llvm::VPWidenSelectRecipe::isInvariantCond(), and llvm::vputils::isUniformAfterVectorization().
|
inline |
Returns true if this VPValue is a live-in, i.e. defined outside the VPlan.
Definition at line 175 of file VPlanValue.h.
References hasDefiningRecipe().
Referenced by llvm::VPlan::addVPValue(), llvm::InnerLoopVectorizer::fixupIVUsers(), and getLiveInIRValue().
void VPValue::print | ( | raw_ostream & | OS, |
VPSlotTracker & | Tracker | ||
) | const |
Definition at line 92 of file VPlan.cpp.
References Def, OS, and printAsOperand().
Referenced by llvm::VPlanPrinter::dump(), and dump().
void VPValue::printAsOperand | ( | raw_ostream & | OS, |
VPSlotTracker & | Tracker | ||
) | const |
Definition at line 1038 of file VPlan.cpp.
References llvm::VPSlotTracker::getSlot(), and OS.
Referenced by llvm::VPInstruction::print(), llvm::VPWidenRecipe::print(), llvm::VPWidenCastRecipe::print(), llvm::VPWidenCallRecipe::print(), llvm::VPWidenSelectRecipe::print(), llvm::VPWidenGEPRecipe::print(), llvm::VPWidenIntOrFpInductionRecipe::print(), llvm::VPWidenPointerInductionRecipe::print(), llvm::VPWidenPHIRecipe::print(), llvm::VPFirstOrderRecurrencePHIRecipe::print(), llvm::VPReductionPHIRecipe::print(), llvm::VPBlendRecipe::print(), llvm::VPInterleaveRecipe::print(), llvm::VPReductionRecipe::print(), llvm::VPReplicateRecipe::print(), llvm::VPPredInstPHIRecipe::print(), llvm::VPWidenMemoryInstructionRecipe::print(), llvm::VPExpandSCEVRecipe::print(), llvm::VPCanonicalIVPHIRecipe::print(), llvm::VPActiveLaneMaskPHIRecipe::print(), llvm::VPWidenCanonicalIVRecipe::print(), llvm::VPDerivedIVRecipe::print(), llvm::VPScalarIVStepsRecipe::print(), llvm::VPLiveOut::print(), and print().
|
inline |
Remove a single User
from the list of users.
Definition at line 123 of file VPlanValue.h.
References llvm::erase_if(), llvm::Other, and Users.
void VPValue::replaceAllUsesWith | ( | VPValue * | New | ) |
Definition at line 1022 of file VPlan.cpp.
References E, llvm::User::getNumOperands(), llvm::User::getOperand(), I, llvm::User::setOperand(), and Users.
Referenced by createReplicateRegion(), llvm::LoopVectorizePass::processLoop(), llvm::VPlanTransforms::removeRedundantCanonicalIVs(), llvm::VPlanTransforms::removeRedundantInductionCasts(), and llvm::VPlanTransforms::VPInstructionsToVPRecipes().
|
inlineprotected |
Definition at line 77 of file VPlanValue.h.
References assert(), and UnderlyingVal.
Referenced by llvm::VPBuilder::createNaryOp(), and llvm::VPInstruction::setUnderlyingInstr().
|
inline |
Definition at line 143 of file VPlanValue.h.
References Users.
Referenced by llvm::VPReplicateRecipe::execute(), llvm::InnerLoopVectorizer::fixFixedOrderRecurrence(), hasMoreThanOneUniqueUser(), and users().
|
inline |
Definition at line 144 of file VPlanValue.h.
References Users.
|
inline |
Definition at line 145 of file VPlanValue.h.
References Users.
Referenced by llvm::VPReplicateRecipe::execute(), hasMoreThanOneUniqueUser(), and users().
|
inline |
Definition at line 146 of file VPlanValue.h.
References Users.
|
inline |
Definition at line 147 of file VPlanValue.h.
References user_begin(), and user_end().
Referenced by llvm::InnerLoopVectorizer::clearReductionWrapFlags(), mergeReplicateRegionsIntoSuccessors(), llvm::VPBlendRecipe::onlyFirstLaneUsed(), llvm::VPlanTransforms::removeRedundantCanonicalIVs(), llvm::VPlanTransforms::removeRedundantInductionCasts(), llvm::VPReplicateRecipe::shouldPack(), sinkRecurrenceUsersAfterPrevious(), and sinkScalarOperands().
|
inline |
Definition at line 148 of file VPlanValue.h.
References user_begin(), and user_end().
|
friend |
Definition at line 49 of file VPlanValue.h.
|
friend |
Definition at line 45 of file VPlanValue.h.
|
friend |
Definition at line 46 of file VPlanValue.h.
|
friend |
Definition at line 47 of file VPlanValue.h.
Referenced by llvm::VPInstruction::clone().
|
friend |
Definition at line 50 of file VPlanValue.h.
|
friend |
Definition at line 48 of file VPlanValue.h.
|
friend |
Definition at line 52 of file VPlanValue.h.
|
friend |
Definition at line 51 of file VPlanValue.h.
|
friend |
Definition at line 53 of file VPlanValue.h.
|
protected |
Pointer to the VPDef that defines this VPValue.
If it is nullptr, the VPValue is not defined by any recipe modeled in VPlan.
Definition at line 65 of file VPlanValue.h.
Referenced by dump(), getDefiningRecipe(), print(), VPValue(), and ~VPValue().
|
protected |
Definition at line 61 of file VPlanValue.h.
Referenced by getUnderlyingValue(), and setUnderlyingValue().