|
LLVM 23.0.0git
|
A common mixin class for widening memory operations. More...
#include "Transforms/Vectorize/VPlan.h"
Public Member Functions | |
| virtual | ~VPWidenMemoryRecipe ()=default |
| virtual VPRecipeBase * | getAsRecipe ()=0 |
| Return a VPRecipeBase* to the current object. | |
| virtual const VPRecipeBase * | getAsRecipe () const =0 |
| bool | isConsecutive () const |
| Return whether the loaded-from / stored-to addresses are consecutive. | |
| VPValue * | getAddr () const |
| Return the address accessed by this recipe. | |
| bool | isMasked () const |
| Returns true if the recipe is masked. | |
| VPValue * | getMask () const |
| Return the mask used by this recipe. | |
| Align | getAlign () const |
| Returns the alignment of the memory access. | |
| InstructionCost | computeCost (ElementCount VF, VPCostContext &Ctx) const |
| Return the cost of this VPWidenMemoryRecipe. | |
| Instruction & | getIngredient () const |
| Public Member Functions inherited from llvm::VPIRMetadata | |
| VPIRMetadata ()=default | |
| VPIRMetadata (Instruction &I) | |
Adds metatadata that can be preserved from the original instruction I. | |
| VPIRMetadata (const VPIRMetadata &Other)=default | |
| Copy constructor for cloning. | |
| VPIRMetadata & | operator= (const VPIRMetadata &Other)=default |
| void | applyMetadata (Instruction &I) const |
Add all metadata to I. | |
| void | setMetadata (unsigned Kind, MDNode *Node) |
Set metadata with kind Kind to Node. | |
| void | intersect (const VPIRMetadata &MD) |
Intersect this VPIRMetadata object with MD, keeping only metadata nodes that are common to both. | |
| MDNode * | getMetadata (unsigned Kind) const |
Get metadata of kind Kind. Returns nullptr if not found. | |
| void | print (raw_ostream &O, VPSlotTracker &SlotTracker) const |
| Print metadata with node IDs. | |
Protected Member Functions | |
| void | setMask (VPValue *Mask) |
| VPWidenMemoryRecipe (Instruction &I, bool Consecutive, const VPIRMetadata &Metadata) | |
Protected Attributes | |
| Instruction & | Ingredient |
| Align | Alignment |
| Alignment information for this memory access. | |
| bool | Consecutive |
| Whether the accessed addresses are consecutive. | |
| bool | IsMasked = false |
| Whether the memory access is masked. | |
A common mixin class for widening memory operations.
An optional mask can be provided as the last operand.
|
inlineprotected |
Definition at line 3526 of file VPlan.h.
References Alignment, Consecutive, llvm::getLoadStoreAlignment(), I, Ingredient, and llvm::VPIRMetadata::VPIRMetadata().
|
virtualdefault |
| InstructionCost VPWidenMemoryRecipe::computeCost | ( | ElementCount | VF, |
| VPCostContext & | Ctx ) const |
Return the cost of this VPWidenMemoryRecipe.
Definition at line 3656 of file VPlanRecipes.cpp.
References Alignment, assert(), llvm::cast(), Consecutive, getAddr(), getAsRecipe(), llvm::getLoadStorePointerOperand(), llvm::getLoadStoreType(), getMask(), llvm::Value::getType(), Ingredient, llvm::isa(), IsMasked, llvm::vputils::isSingleScalar(), llvm::PatternMatch::m_Intrinsic(), llvm::VPlanPatternMatch::m_Reverse(), llvm::VPlanPatternMatch::m_VPValue(), llvm::PatternMatch::match(), and llvm::toVectorTy().
Referenced by llvm::VPWidenLoadEVLRecipe::computeCost(), llvm::VPWidenLoadRecipe::computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), and llvm::VPWidenStoreRecipe::computeCost().
|
inline |
Return the address accessed by this recipe.
Definition at line 3542 of file VPlan.h.
References getAsRecipe().
Referenced by llvm::VPWidenLoadRecipe::clone(), llvm::VPWidenStoreRecipe::clone(), llvm::VPWidenLoadEVLRecipe::computeCost(), computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenLoadRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), llvm::VPWidenStoreRecipe::execute(), llvm::VPWidenLoadEVLRecipe::usesFirstLaneOnly(), llvm::VPWidenLoadRecipe::usesFirstLaneOnly(), llvm::VPWidenStoreEVLRecipe::usesFirstLaneOnly(), and llvm::VPWidenStoreRecipe::usesFirstLaneOnly().
|
inline |
|
pure virtual |
Implemented in llvm::VPWidenLoadEVLRecipe, llvm::VPWidenLoadRecipe, llvm::VPWidenStoreEVLRecipe, and llvm::VPWidenStoreRecipe.
|
pure virtual |
Return a VPRecipeBase* to the current object.
Implemented in llvm::VPWidenLoadEVLRecipe, llvm::VPWidenLoadRecipe, llvm::VPWidenStoreEVLRecipe, and llvm::VPWidenStoreRecipe.
Referenced by computeCost(), llvm::VPlanTransforms::createInterleaveGroups(), getAddr(), getMask(), and setMask().
|
inline |
Definition at line 3561 of file VPlan.h.
References Ingredient.
|
inline |
Return the mask used by this recipe.
Note that a full mask is represented by a nullptr.
Definition at line 3549 of file VPlan.h.
References getAsRecipe(), and isMasked().
Referenced by computeCost(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenLoadRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), and llvm::VPWidenStoreRecipe::execute().
|
inline |
Return whether the loaded-from / stored-to addresses are consecutive.
Definition at line 3539 of file VPlan.h.
References Consecutive.
Referenced by llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenLoadRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), llvm::VPWidenStoreRecipe::execute(), llvm::VPWidenLoadEVLRecipe::usesFirstLaneOnly(), llvm::VPWidenLoadRecipe::usesFirstLaneOnly(), llvm::VPWidenStoreEVLRecipe::usesFirstLaneOnly(), and llvm::VPWidenStoreRecipe::usesFirstLaneOnly().
|
inline |
|
inlineprotected |
Definition at line 3518 of file VPlan.h.
References assert(), getAsRecipe(), and IsMasked.
|
protected |
Alignment information for this memory access.
Definition at line 3510 of file VPlan.h.
Referenced by llvm::VPWidenLoadEVLRecipe::computeCost(), computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenLoadRecipe::execute(), llvm::VPWidenStoreEVLRecipe::execute(), llvm::VPWidenStoreRecipe::execute(), getAlign(), and VPWidenMemoryRecipe().
|
protected |
Whether the accessed addresses are consecutive.
Definition at line 3513 of file VPlan.h.
Referenced by llvm::VPWidenLoadRecipe::clone(), llvm::VPWidenStoreRecipe::clone(), llvm::VPWidenLoadEVLRecipe::computeCost(), computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), isConsecutive(), llvm::VPWidenLoadRecipe::VPWidenLoadRecipe(), VPWidenMemoryRecipe(), and llvm::VPWidenStoreRecipe::VPWidenStoreRecipe().
|
protected |
Definition at line 3507 of file VPlan.h.
Referenced by llvm::VPWidenLoadRecipe::clone(), llvm::VPWidenStoreRecipe::clone(), llvm::VPWidenLoadEVLRecipe::computeCost(), computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), llvm::VPWidenLoadEVLRecipe::execute(), llvm::VPWidenLoadRecipe::execute(), getIngredient(), and VPWidenMemoryRecipe().
|
protected |
Whether the memory access is masked.
Definition at line 3516 of file VPlan.h.
Referenced by llvm::VPWidenLoadEVLRecipe::computeCost(), computeCost(), llvm::VPWidenStoreEVLRecipe::computeCost(), isMasked(), and setMask().