9#ifndef LLVM_TRANSFORMS_VECTORIZE_VPRECIPEBUILDER_H
10#define LLVM_TRANSFORMS_VECTORIZE_VPRECIPEBUILDER_H
20class LoopVectorizationLegality;
21class LoopVectorizationCostModel;
22class TargetLibraryInfo;
114 : OrigLoop(OrigLoop), TLI(TLI),
Legal(
Legal), CM(CM), PSE(PSE),
129 if (!Ingredient2Recipe.
count(
I))
131 assert(Ingredient2Recipe[
I] ==
nullptr &&
132 "Recipe already set for ingredient");
133 Ingredient2Recipe[
I] = R;
151 assert((!Ingredient2Recipe.
count(
I) || Ingredient2Recipe[
I] ==
nullptr) &&
152 "Recipe already set for ingredient");
153 Ingredient2Recipe[
I] =
nullptr;
159 "Recording this ingredients recipe was not requested");
160 assert(Ingredient2Recipe[
I] !=
nullptr &&
161 "Ingredient doesn't have a recipe");
162 return Ingredient2Recipe[
I];
This file defines the DenseMap class.
This file provides a LoopVectorizationPlanner class.
mir Rename Register Operands
This file defines the PointerUnion class, which is a discriminated union of pointer types.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file contains the declarations of the Vectorization Plan base classes:
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
LLVM Basic Block Representation.
This class represents a function call, abstracting a target machine's calling convention.
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
LoopVectorizationCostModel - estimates the expected speedups due to vectorization.
LoopVectorizationLegality checks if it is legal to vectorize a loop, and to what vectorization factor...
Represents a single loop in the control flow graph.
A discriminated union of two or more pointer types, with the discriminator in the low bit of the poin...
An interface layer with SCEV used to manage how we see SCEV expressions for values in the context of ...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Provides information about what library functions are available for the current target.
This class represents a truncation of integer types.
VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph.
VPlan-based builder utility analogous to IRBuilder.
VPRecipeBase is a base class modeling a sequence of one or more output IR instructions.
Helper class to create VPRecipies from IR instructions.
void createHeaderMask(VPlan &Plan)
Create the mask for the vector loop header block.
VPRecipeBuilder(Loop *OrigLoop, const TargetLibraryInfo *TLI, LoopVectorizationLegality *Legal, LoopVectorizationCostModel &CM, PredicatedScalarEvolution &PSE, VPBuilder &Builder)
VPRecipeOrVPValueTy handleReplication(Instruction *I, VFRange &Range, VPlan &Plan)
Build a VPReplicationRecipe for I.
VPValue * createBlockInMask(BasicBlock *BB, VPlan &Plan)
A helper function that computes the predicate of the block BB, assuming that the header block of the ...
void fixHeaderPhis()
Add the incoming values from the backedge to reduction & first-order recurrence cross-iteration phis.
VPValue * createEdgeMask(BasicBlock *Src, BasicBlock *Dst, VPlan &Plan)
A helper function that computes the predicate of the edge between SRC and DST.
void recordRecipeOf(Instruction *I)
Mark given ingredient for recording its recipe once one is created for it.
void setRecipe(Instruction *I, VPRecipeBase *R)
Set the recipe created for given ingredient.
VPRecipeOrVPValueTy tryToCreateWidenRecipe(Instruction *Instr, ArrayRef< VPValue * > Operands, VFRange &Range, VPBasicBlock *VPBB, VPlanPtr &Plan)
Check if an existing VPValue can be used for Instr or a recipe can be create for I withing the given ...
VPRecipeBase * getRecipe(Instruction *I)
Return the recipe created for given ingredient.
A recipe for widening Call instructions.
A recipe for handling phi nodes of integer and floating-point inductions, producing their vector valu...
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient outp...
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< VPlan > VPlanPtr
A range of powers-of-2 vectorization factors with fixed start and adjustable end.