LLVM 24.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 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

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.

Detailed Description

A common mixin class for widening memory operations.

An optional mask can be provided as the last operand.

Definition at line 3763 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 3816 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 3821 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 3809 of file VPlan.h.

References getAsRecipe(), and isMasked().

Referenced by 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 3805 of file VPlan.h.

References IsMasked.

Referenced by getMask().

◆ setMask()

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

Definition at line 3776 of file VPlan.h.

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

Member Data Documentation

◆ Alignment

◆ Consecutive

◆ Ingredient

Instruction& llvm::VPWidenMemoryRecipe::Ingredient
protected

◆ IsMasked

bool llvm::VPWidenMemoryRecipe::IsMasked = false
protected

Whether the memory access is masked.

Definition at line 3774 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: