|
LLVM 23.0.0git
|
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) | |
| VPRecipeBase * | tryToCreateWidenNonPhiRecipe (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. | |
| VPRecipeBase * | getRecipe (Instruction *I) |
| Return the recipe created for given ingredient. | |
| VPReplicateRecipe * | handleReplication (VPInstruction *VPI, VFRange &Range) |
Build a VPReplicationRecipe for VPI. | |
| VPValue * | getVPValueOrAddLiveIn (Value *V) |
Helper class to create VPRecipies from IR instructions.
Definition at line 26 of file VPRecipeBuilder.h.
|
inline |
Definition at line 83 of file VPRecipeBuilder.h.
|
inline |
Return the recipe created for given ingredient.
Definition at line 101 of file VPRecipeBuilder.h.
Referenced by llvm::VPlanTransforms::createInterleaveGroups().
Definition at line 114 of file VPRecipeBuilder.h.
References llvm::dyn_cast(), and I.
| 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 7984 of file LoopVectorize.cpp.
References assert(), llvm::cast(), llvm::dbgs(), llvm::VPRecipeBase::getDebugLoc(), llvm::LoopVectorizationPlanner::getDecisionAndClampRange(), getIntrinsicID(), llvm::VPInstruction::getMask(), llvm::VPSingleDefRecipe::getUnderlyingInstr(), I, llvm::isa(), LLVM_DEBUG, llvm::VPInstruction::operandsWithoutMask(), and Range.
|
inline |
Set the recipe created for given ingredient.
Definition at line 94 of file VPRecipeBuilder.h.
| VPRecipeBase * VPRecipeBuilder::tryToCreateWidenNonPhiRecipe | ( | 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.
Definition at line 8049 of file LoopVectorize.cpp.
References assert(), llvm::cast(), llvm::VPRecipeBase::getDebugLoc(), llvm::LoopVectorizationPlanner::getDecisionAndClampRange(), llvm::Instruction::getOpcode(), llvm::VPInstruction::getOpcode(), llvm::VPUser::getOperand(), llvm::Instruction::isCast(), llvm::ElementCount::isScalar(), llvm::VPInstruction::operandsWithoutMask(), and Range.