LLVM 23.0.0git
llvm::VPRecipeBuilder Class Reference

Helper class to create VPRecipies from IR instructions. More...

#include "Transforms/Vectorize/VPRecipeBuilder.h"

Public Member Functions

 VPRecipeBuilder (VPlan &Plan, const TargetLibraryInfo *TLI, LoopVectorizationLegality *Legal, LoopVectorizationCostModel &CM, VPBuilder &Builder, DenseMap< VPBasicBlock *, VPValue * > &BlockMaskCache)
VPRecipeBasetryToCreateWidenNonPhiRecipe (VPSingleDefRecipe *R, VFRange &Range)
 Create and return a widened recipe for a non-phi recipe R if one can be created within the given VF Range.
void setRecipe (Instruction *I, VPRecipeBase *R)
 Set the recipe created for given ingredient.
VPValuegetBlockInMask (VPBasicBlock *VPBB) const
 Returns the entry mask for block VPBB or null if the mask is all-true.
VPRecipeBasegetRecipe (Instruction *I)
 Return the recipe created for given ingredient.
VPReplicateRecipehandleReplication (VPInstruction *VPI, VFRange &Range)
 Build a VPReplicationRecipe for VPI.
VPValuegetVPValueOrAddLiveIn (Value *V)
void updateBlockMaskCache (DenseMap< VPValue *, VPValue * > &Old2New)

Detailed Description

Helper class to create VPRecipies from IR instructions.

Definition at line 26 of file VPRecipeBuilder.h.

Constructor & Destructor Documentation

◆ VPRecipeBuilder()

llvm::VPRecipeBuilder::VPRecipeBuilder ( VPlan & Plan,
const TargetLibraryInfo * TLI,
LoopVectorizationLegality * Legal,
LoopVectorizationCostModel & CM,
VPBuilder & Builder,
DenseMap< VPBasicBlock *, VPValue * > & BlockMaskCache )
inline

Definition at line 88 of file VPRecipeBuilder.h.

Member Function Documentation

◆ getBlockInMask()

VPValue * llvm::VPRecipeBuilder::getBlockInMask ( VPBasicBlock * VPBB) const
inline

Returns the entry mask for block VPBB or null if the mask is all-true.

Definition at line 109 of file VPRecipeBuilder.h.

Referenced by handleReplication().

◆ getRecipe()

VPRecipeBase * llvm::VPRecipeBuilder::getRecipe ( Instruction * I)
inline

Return the recipe created for given ingredient.

Definition at line 114 of file VPRecipeBuilder.h.

References assert(), and I.

Referenced by llvm::VPlanTransforms::createInterleaveGroups().

◆ getVPValueOrAddLiveIn()

VPValue * llvm::VPRecipeBuilder::getVPValueOrAddLiveIn ( Value * V)
inline

Definition at line 127 of file VPRecipeBuilder.h.

References llvm::dyn_cast(), and I.

◆ handleReplication()

VPReplicateRecipe * VPRecipeBuilder::handleReplication ( VPInstruction * VPI,
VFRange & Range )

Build a VPReplicationRecipe for VPI.

If it is predicated, add the mask as last operand. Range.End may be decreased to ensure same recipe behavior from Range.Start to Range.End.

Definition at line 7975 of file LoopVectorize.cpp.

References assert(), llvm::cast(), llvm::dbgs(), getBlockInMask(), llvm::VPRecipeBase::getDebugLoc(), llvm::LoopVectorizationPlanner::getDecisionAndClampRange(), getIntrinsicID(), llvm::VPSingleDefRecipe::getUnderlyingInstr(), I, llvm::isa(), LLVM_DEBUG, llvm::VPUser::operands(), and Range.

◆ setRecipe()

void llvm::VPRecipeBuilder::setRecipe ( Instruction * I,
VPRecipeBase * R )
inline

Set the recipe created for given ingredient.

Definition at line 101 of file VPRecipeBuilder.h.

References assert(), and I.

◆ tryToCreateWidenNonPhiRecipe()

VPRecipeBase * VPRecipeBuilder::tryToCreateWidenNonPhiRecipe ( VPSingleDefRecipe * R,
VFRange & Range )

◆ updateBlockMaskCache()

void llvm::VPRecipeBuilder::updateBlockMaskCache ( DenseMap< VPValue *, VPValue * > & Old2New)
inline

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