LLVM  13.0.0git
Public Member Functions | List of all members
llvm::VPRecipeBuilder Class Reference

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

#include "Transforms/Vectorize/VPRecipeBuilder.h"

Public Member Functions

 VPRecipeBuilder (Loop *OrigLoop, const TargetLibraryInfo *TLI, LoopVectorizationLegality *Legal, LoopVectorizationCostModel &CM, PredicatedScalarEvolution &PSE, VPBuilder &Builder)
 
VPRecipeOrVPValueTy tryToCreateWidenRecipe (Instruction *Instr, VFRange &Range, VPlanPtr &Plan)
 Check if an existing VPValue can be used for Instr or a recipe can be create for I withing the given VF Range. More...
 
void setRecipe (Instruction *I, VPRecipeBase *R)
 Set the recipe created for given ingredient. More...
 
VPValuecreateBlockInMask (BasicBlock *BB, VPlanPtr &Plan)
 A helper function that computes the predicate of the block BB, assuming that the header block of the loop is set to True. More...
 
VPValuecreateEdgeMask (BasicBlock *Src, BasicBlock *Dst, VPlanPtr &Plan)
 A helper function that computes the predicate of the edge between SRC and DST. More...
 
void recordRecipeOf (Instruction *I)
 Mark given ingredient for recording its recipe once one is created for it. More...
 
VPRecipeBasegetRecipe (Instruction *I)
 Return the recipe created for given ingredient. More...
 
VPRegionBlockcreateReplicateRegion (Instruction *I, VPRecipeBase *PredRecipe, VPlanPtr &Plan)
 Create a replicating region for instruction I that requires predication. More...
 
VPBasicBlockhandleReplication (Instruction *I, VFRange &Range, VPBasicBlock *VPBB, DenseMap< Instruction *, VPReplicateRecipe * > &PredInst2Recipe, VPlanPtr &Plan)
 Build a VPReplicationRecipe for I and enclose it within a Region if it is predicated. More...
 

Detailed Description

Helper class to create VPRecipies from IR instructions.

Definition at line 27 of file VPRecipeBuilder.h.

Constructor & Destructor Documentation

◆ VPRecipeBuilder()

llvm::VPRecipeBuilder::VPRecipeBuilder ( Loop OrigLoop,
const TargetLibraryInfo TLI,
LoopVectorizationLegality Legal,
LoopVectorizationCostModel CM,
PredicatedScalarEvolution PSE,
VPBuilder Builder 
)
inline

Definition at line 102 of file VPRecipeBuilder.h.

References Builder, and llvm::IRSimilarity::Legal.

Member Function Documentation

◆ createBlockInMask()

VPValue * VPRecipeBuilder::createBlockInMask ( BasicBlock BB,
VPlanPtr Plan 
)

◆ createEdgeMask()

VPValue * VPRecipeBuilder::createEdgeMask ( BasicBlock Src,
BasicBlock Dst,
VPlanPtr Plan 
)

◆ createReplicateRegion()

VPRegionBlock * VPRecipeBuilder::createReplicateRegion ( Instruction I,
VPRecipeBase PredRecipe,
VPlanPtr Plan 
)

Create a replicating region for instruction I that requires predication.

PredRecipe is a VPReplicateRecipe holding I.

Definition at line 8580 of file LoopVectorize.cpp.

References assert(), llvm::Instruction::getOpcodeName(), and llvm::Instruction::getParent().

◆ getRecipe()

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

◆ handleReplication()

VPBasicBlock * VPRecipeBuilder::handleReplication ( Instruction I,
VFRange Range,
VPBasicBlock VPBB,
DenseMap< Instruction *, VPReplicateRecipe * > &  PredInst2Recipe,
VPlanPtr Plan 
)

◆ recordRecipeOf()

void llvm::VPRecipeBuilder::recordRecipeOf ( Instruction I)
inline

◆ setRecipe()

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

Set the recipe created for given ingredient.

This operation is a no-op for ingredients that were not marked using a nullptr entry in the map.

Definition at line 118 of file VPRecipeBuilder.h.

References assert(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::count(), and I.

◆ tryToCreateWidenRecipe()

VPRecipeOrVPValueTy VPRecipeBuilder::tryToCreateWidenRecipe ( Instruction Instr,
VFRange Range,
VPlanPtr Plan 
)

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