LLVM 23.0.0git
llvm::VPWidenMemoryRecipe Class Referenceabstract

A common mixin class for widening memory operations. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPWidenMemoryRecipe:
[legend]

Public Member Functions

virtual ~VPWidenMemoryRecipe ()=default
virtual VPRecipeBasegetAsRecipe ()=0
 Return a VPRecipeBase* to the current object.
virtual const VPRecipeBasegetAsRecipe () const =0
bool isConsecutive () const
 Return whether the loaded-from / stored-to addresses are consecutive.
VPValuegetAddr () const
 Return the address accessed by this recipe.
bool isMasked () const
 Returns true if the recipe is masked.
VPValuegetMask () 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.
InstructiongetIngredient () const

Protected Member Functions

void setMask (VPValue *Mask)
 VPWidenMemoryRecipe (Instruction &I, bool Consecutive, const VPIRMetadata &Metadata)

Protected Attributes

InstructionIngredient
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.

Detailed Description

A common mixin class for widening memory operations.

An optional mask can be provided as the last operand.

Definition at line 3505 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPWidenMemoryRecipe()

llvm::VPWidenMemoryRecipe::VPWidenMemoryRecipe ( Instruction & I,
bool Consecutive,
const VPIRMetadata & Metadata )
inlineprotected

◆ ~VPWidenMemoryRecipe()

virtual llvm::VPWidenMemoryRecipe::~VPWidenMemoryRecipe ( )
virtualdefault

Member Function Documentation

◆ computeCost()

◆ getAddr()

◆ getAlign()

Align llvm::VPWidenMemoryRecipe::getAlign ( ) const
inline

Returns the alignment of the memory access.

Definition at line 3556 of file VPlan.h.

References Alignment.

◆ getAsRecipe() [1/2]

virtual const VPRecipeBase * llvm::VPWidenMemoryRecipe::getAsRecipe ( ) const
pure virtual

◆ getAsRecipe() [2/2]

virtual VPRecipeBase * llvm::VPWidenMemoryRecipe::getAsRecipe ( )
pure virtual

◆ getIngredient()

Instruction & llvm::VPWidenMemoryRecipe::getIngredient ( ) const
inline

Definition at line 3561 of file VPlan.h.

References Ingredient.

◆ getMask()

VPValue * llvm::VPWidenMemoryRecipe::getMask ( ) const
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().

◆ isConsecutive()

◆ isMasked()

bool llvm::VPWidenMemoryRecipe::isMasked ( ) const
inline

Returns true if the recipe is masked.

Definition at line 3545 of file VPlan.h.

References IsMasked.

Referenced by getMask().

◆ setMask()

void llvm::VPWidenMemoryRecipe::setMask ( VPValue * Mask)
inlineprotected

Definition at line 3518 of file VPlan.h.

References assert(), getAsRecipe(), and IsMasked.

Member Data Documentation

◆ Alignment

◆ Consecutive

◆ Ingredient

◆ IsMasked

bool llvm::VPWidenMemoryRecipe::IsMasked = false
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().


The documentation for this class was generated from the following files: