LLVM: llvm::VPRecipeBuilder Class Reference (original) (raw)
Helper class to create VPRecipies from IR instructions. More...
#include "[Transforms/Vectorize/VPRecipeBuilder.h](VPRecipeBuilder%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| VPRecipeBuilder (VPlan &Plan, Loop *OrigLoop, const TargetLibraryInfo *TLI, const TargetTransformInfo *TTI, LoopVectorizationLegality *Legal, LoopVectorizationCostModel &CM, PredicatedScalarEvolution &PSE, VPBuilder &Builder, DenseMap< VPBasicBlock *, VPValue * > &BlockMaskCache) | |
| std::optional< unsigned > | getScalingForReduction (const Instruction *ExitInst) |
| void | collectScaledReductions (VFRange &Range) |
| Find all possible partial reductions in the loop and track all of those that are valid so recipes can be formed later. | |
| VPRecipeBase * | tryToCreateWidenRecipe (VPSingleDefRecipe *R, VFRange &Range) |
| Create and return a widened recipe for R if one can be created within the given VF Range. | |
| VPRecipeBase * | tryToCreatePartialReduction (VPInstruction *Reduction, unsigned ScaleFactor) |
| Create and return a partial reduction recipe for a reduction instruction along with binary operation and reduction phi operands. | |
| void | setRecipe (Instruction *I, VPRecipeBase *R) |
| Set the recipe created for given ingredient. | |
| VPValue * | getBlockInMask (VPBasicBlock *VPBB) const |
| Returns the entry mask for block VPBB or null if the mask is all-true. | |
| 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) |
| void | updateBlockMaskCache (DenseMap< VPValue *, VPValue * > &Old2New) |
Helper class to create VPRecipies from IR instructions.
Definition at line 47 of file VPRecipeBuilder.h.
◆ collectScaledReductions()
| void VPRecipeBuilder::collectScaledReductions | ( | VFRange & | Range | ) |
|---|
◆ getBlockInMask()
◆ getRecipe()
◆ getScalingForReduction()
◆ getVPValueOrAddLiveIn()
| VPValue * llvm::VPRecipeBuilder::getVPValueOrAddLiveIn ( Value * V) | inline |
|---|
◆ handleReplication()
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 7979 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()
◆ tryToCreatePartialReduction()
Create and return a partial reduction recipe for a reduction instruction along with binary operation and reduction phi operands.
Definition at line 8339 of file LoopVectorize.cpp.
References AbstractManglingParser< Derived, Alloc >::Ops, Accumulator, llvm::Add, assert(), llvm::cast(), Cond, getBlockInMask(), llvm::VPValue::getDefiningRecipe(), llvm::vputils::getVFScaleFactor(), llvm::isa(), and std::swap().
Referenced by tryToCreateWidenRecipe().
◆ tryToCreateWidenRecipe()
Create and return a widened recipe for R if one can be created within the given VF Range.
Definition at line 8241 of file LoopVectorize.cpp.
References llvm::VPUser::addOperand(), assert(), llvm::cast(), llvm::dyn_cast(), llvm::VPRecipeBase::getDebugLoc(), llvm::LoopVectorizationPlanner::getDecisionAndClampRange(), llvm::VPBasicBlock::getEnclosingLoopRegion(), llvm::VPRegionBlock::getEntry(), llvm::RecurrenceDescriptor::getLoopExitInstr(), llvm::Instruction::getOpcode(), llvm::VPInstruction::getOpcode(), llvm::VPUser::getOperand(), llvm::VPBlockBase::getParent(), llvm::RecurrenceDescriptor::getRecurrenceKind(), llvm::RecurrenceDescriptor::getRecurrenceStartValue(), llvm::getReductionStyle(), getScalingForReduction(), llvm::RecurrenceDescriptor::hasUsesOutsideReductionChain(), llvm::Instruction::isCast(), llvm::ElementCount::isScalar(), Range, and tryToCreatePartialReduction().
◆ updateBlockMaskCache()
The documentation for this class was generated from the following files:
- lib/Transforms/Vectorize/VPRecipeBuilder.h
- lib/Transforms/Vectorize/LoopVectorize.cpp