LLVM 19.0.0git
Classes | Namespaces | Macros | Typedefs | Functions
VPlan.h File Reference

This file contains the declarations of the Vectorization Plan base classes: More...

#include "VPlanAnalysis.h"
#include "VPlanValue.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h"
#include "llvm/Analysis/IVDescriptors.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/FMF.h"
#include "llvm/IR/Operator.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <string>

Go to the source code of this file.

Classes

struct  llvm::VFRange
 A range of powers-of-2 vectorization factors with fixed start and adjustable end. More...
 
class  llvm::VFRange::iterator
 Iterator to iterate over vectorization factors in a VFRange. More...
 
class  llvm::VPLane
 In what follows, the term "input IR" refers to code that is fed into the vectorizer whereas the term "output IR" refers to code that is generated by the vectorizer. More...
 
struct  llvm::VPIteration
 VPIteration represents a single point in the iteration space of the output (vectorized and/or unrolled) IR loop. More...
 
struct  llvm::VPTransformState
 VPTransformState holds information passed down when "executing" a VPlan, needed for generating the output IR. More...
 
struct  llvm::VPTransformState::DataState
 
struct  llvm::VPTransformState::CFGState
 Hold state information used when constructing the CFG of the output IR, traversing the VPBasicBlocks and generating corresponding IR BasicBlocks. More...
 
class  llvm::VPBlockBase
 VPBlockBase is the building block of the Hierarchical Control-Flow Graph. More...
 
class  llvm::VPLiveOut
 A value that is used outside the VPlan. More...
 
class  llvm::VPRecipeBase
 VPRecipeBase is a base class modeling a sequence of one or more output IR instructions. More...
 
class  llvm::VPSingleDefRecipe
 VPSingleDef is a base class for recipes for modeling a sequence of one or more output IR that define a single result VPValue. More...
 
class  llvm::VPRecipeWithIRFlags
 Class to record LLVM IR flag for a recipe along with it. More...
 
struct  llvm::VPRecipeWithIRFlags::WrapFlagsTy
 
struct  llvm::VPRecipeWithIRFlags::GEPFlagsTy
 
class  llvm::VPInstruction
 This is a concrete Recipe that models a single VPlan-level instruction. More...
 
class  llvm::VPWidenRecipe
 VPWidenRecipe is a recipe for producing a copy of vector type its ingredient. More...
 
class  llvm::VPWidenCastRecipe
 VPWidenCastRecipe is a recipe to create vector cast instructions. More...
 
class  llvm::VPScalarCastRecipe
 VPScalarCastRecipe is a recipe to create scalar cast instructions. More...
 
class  llvm::VPWidenCallRecipe
 A recipe for widening Call instructions. More...
 
struct  llvm::VPWidenSelectRecipe
 A recipe for widening select instructions. More...
 
class  llvm::VPWidenGEPRecipe
 A recipe for handling GEP instructions. More...
 
class  llvm::VPVectorPointerRecipe
 A recipe to compute the pointers for widened memory accesses of IndexTy for all parts. More...
 
class  llvm::VPHeaderPHIRecipe
 A pure virtual base class for all recipes modeling header phis, including phis for first order recurrences, pointer inductions and reductions. More...
 
class  llvm::VPWidenIntOrFpInductionRecipe
 A recipe for handling phi nodes of integer and floating-point inductions, producing their vector values. More...
 
class  llvm::VPWidenPointerInductionRecipe
 
class  llvm::VPWidenPHIRecipe
 A recipe for handling phis that are widened in the vector loop. More...
 
struct  llvm::VPFirstOrderRecurrencePHIRecipe
 A recipe for handling first-order recurrence phis. More...
 
class  llvm::VPReductionPHIRecipe
 A recipe for handling reduction phis. More...
 
class  llvm::VPBlendRecipe
 A recipe for vectorizing a phi-node as a sequence of mask-based select instructions. More...
 
class  llvm::VPInterleaveRecipe
 VPInterleaveRecipe is a recipe for transforming an interleave group of load or stores into one wide load/store and shuffles. More...
 
class  llvm::VPReductionRecipe
 A recipe to represent inloop reduction operations, performing a reduction on a vector operand into a scalar value, and adding the result to a chain. More...
 
class  llvm::VPReplicateRecipe
 VPReplicateRecipe replicates a given instruction producing multiple scalar copies of the original scalar type, one per lane, instead of producing a single copy of widened type for all lanes. More...
 
class  llvm::VPBranchOnMaskRecipe
 A recipe for generating conditional branches on the bits of a mask. More...
 
class  llvm::VPPredInstPHIRecipe
 VPPredInstPHIRecipe is a recipe for generating the phi nodes needed when control converges back from a Branch-on-Mask. More...
 
class  llvm::VPWidenMemoryInstructionRecipe
 A Recipe for widening load/store operations. More...
 
class  llvm::VPExpandSCEVRecipe
 Recipe to expand a SCEV expression. More...
 
class  llvm::VPCanonicalIVPHIRecipe
 Canonical scalar induction phi of the vector loop. More...
 
class  llvm::VPActiveLaneMaskPHIRecipe
 A recipe for generating the active lane mask for the vector loop that is used to predicate the vector operations. More...
 
class  llvm::VPWidenCanonicalIVRecipe
 A Recipe for widening the canonical induction variable of the vector loop. More...
 
class  llvm::VPDerivedIVRecipe
 A recipe for converting the canonical IV value to the corresponding value of an IV with different start and step values, using Start + CanonicalIV * Step. More...
 
class  llvm::VPScalarIVStepsRecipe
 A recipe for handling phi nodes of integer and floating-point inductions, producing their scalar values. More...
 
class  llvm::VPBasicBlock
 VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph. More...
 
class  llvm::VPRegionBlock
 VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-Single-Exiting subgraph of the output IR CFG. More...
 
class  llvm::VPlan
 VPlan models a candidate for vectorization, encoding various decisions take to produce efficient output IR, including which branches, basic-blocks and output IR instructions to generate, and their cost. More...
 
class  llvm::VPlanPrinter
 VPlanPrinter prints a given VPlan to a given output stream. More...
 
struct  llvm::VPlanIngredient
 
class  llvm::VPBlockUtils
 Class that provides utilities for VPBlockBases in VPlan. More...
 
class  llvm::VPInterleavedAccessInfo
 
class  llvm::VPlanSlp
 Class that maps (parts of) an existing VPlan to trees of combined VPInstructions. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::Intrinsic
 This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
 
namespace  llvm::vputils
 

Macros

#define VP_CLASSOF_IMPL(VPDefID)
 

Typedefs

using llvm::VPlanPtr = std::unique_ptr< VPlan >
 

Functions

Valuellvm::getRuntimeVF (IRBuilderBase &B, Type *Ty, ElementCount VF)
 Return the runtime value for VF.
 
Valuellvm::createStepForVF (IRBuilderBase &B, Type *Ty, ElementCount VF, int64_t Step)
 Return a value for Step multiplied by VF.
 
const SCEVllvm::createTripCountSCEV (Type *IdxTy, PredicatedScalarEvolution &PSE, Loop *OrigLoop)
 
raw_ostream & llvm::operator<< (raw_ostream &OS, const VPlanIngredient &I)
 
raw_ostream & llvm::operator<< (raw_ostream &OS, const VPlan &Plan)
 
bool llvm::vputils::onlyFirstLaneUsed (const VPValue *Def)
 Returns true if only the first lane of Def is used.
 
bool llvm::vputils::onlyFirstPartUsed (const VPValue *Def)
 Returns true if only the first part of Def is used.
 
VPValuellvm::vputils::getOrCreateVPValueForSCEVExpr (VPlan &Plan, const SCEV *Expr, ScalarEvolution &SE)
 Get or create a VPValue that corresponds to the expansion of Expr.
 
bool llvm::vputils::isUniformAfterVectorization (VPValue *VPV)
 Returns true if VPV is uniform after vectorization.
 

Detailed Description

This file contains the declarations of the Vectorization Plan base classes:

  1. VPBasicBlock and VPRegionBlock that inherit from a common pure virtual VPBlockBase, together implementing a Hierarchical CFG;
  2. Pure virtual VPRecipeBase serving as the base class for recipes contained within VPBasicBlocks;
  3. Pure virtual VPSingleDefRecipe serving as a base class for recipes that also inherit from VPValue.
  4. VPInstruction, a concrete Recipe and VPUser modeling a single planned instruction;
  5. The VPlan class holding a candidate for vectorization;
  6. The VPlanPrinter class providing a way to print a plan in dot format; These are documented in docs/VectorizationPlan.rst.

Definition in file VPlan.h.

Macro Definition Documentation

◆ VP_CLASSOF_IMPL

#define VP_CLASSOF_IMPL (   VPDefID)
Value:
static inline bool classof(const VPDef *D) { \
return D->getVPDefID() == VPDefID; \
} \
static inline bool classof(const VPValue *V) { \
auto *R = V->getDefiningRecipe(); \
return R && R->getVPDefID() == VPDefID; \
} \
static inline bool classof(const VPUser *U) { \
auto *R = dyn_cast<VPRecipeBase>(U); \
return R && R->getVPDefID() == VPDefID; \
} \
static inline bool classof(const VPRecipeBase *R) { \
return R->getVPDefID() == VPDefID; \
} \
static inline bool classof(const VPSingleDefRecipe *R) { \
return R->getVPDefID() == VPDefID; \
}
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")

Definition at line 808 of file VPlan.h.