LLVM 22.0.0git
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/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/VectorUtils.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/FMF.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/InstructionCost.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <string>

Go to the source code of this file.

Classes

class  llvm::VPBlockBase
 VPBlockBase is the building block of the Hierarchical Control-Flow Graph. 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::VPIRFlags
 Class to record and manage LLVM IR flags. More...
struct  llvm::VPIRFlags::WrapFlagsTy
struct  llvm::VPIRFlags::TruncFlagsTy
struct  llvm::VPIRFlags::DisjointFlagsTy
struct  llvm::VPIRFlags::NonNegFlagsTy
struct  llvm::VPRecipeWithIRFlags
 A pure-virtual common base class for recipes defining a single VPValue and using IR flags. More...
class  llvm::VPUnrollPartAccessor< PartOpIdx >
 Helper to access the operand that contains the unroll part for this recipe after unrolling. More...
 Helper to manage IR metadata for recipes. More...
class  llvm::VPInstruction
 This is a concrete Recipe that models a single VPlan-level instruction. More...
class  llvm::VPInstructionWithType
 A specialization of VPInstruction augmenting it with a dedicated result type, to be used when the opcode and operands of the VPInstruction don't directly determine the result type. More...
class  llvm::VPPhiAccessors
 Helper type to provide functions to access incoming values and blocks for phi-like recipes. More...
struct  llvm::VPPhi
class  llvm::VPIRInstruction
 A recipe to wrap on original IR instruction not to be modified during execution, except for PHIs. More...
struct  llvm::VPIRPhi
 An overlay for VPIRInstructions wrapping PHI nodes enabling convenient use cast/dyn_cast/isa and execute() implementation. More...
class  llvm::VPWidenRecipe
 VPWidenRecipe is a recipe for producing a widened instruction using the opcode and operands of the recipe. More...
class  llvm::VPWidenCastRecipe
 VPWidenCastRecipe is a recipe to create vector cast instructions. More...
class  llvm::VPWidenIntrinsicRecipe
 A recipe for widening vector intrinsics. More...
class  llvm::VPWidenCallRecipe
 A recipe for widening Call instructions using library calls. More...
class  llvm::VPHistogramRecipe
 A recipe representing a sequence of load -> update -> store as part of a histogram operation. More...
struct  llvm::VPWidenSelectRecipe
 A recipe for widening select instructions. More...
class  llvm::VPWidenGEPRecipe
 A recipe for handling GEP instructions. More...
class  llvm::VPVectorEndPointerRecipe
 A recipe to compute a pointer to the last element of each part of a widened memory access for widened memory accesses of IndexedTy. More...
class  llvm::VPVectorPointerRecipe
 A recipe to compute the pointers for widened memory accesses of IndexTy. 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::VPWidenInductionRecipe
 Base class for widened induction (VPWidenIntOrFpInductionRecipe and VPWidenPointerInductionRecipe), providing shared functionality, including retrieving the step value, induction descriptor and original phi node. 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 widened phis. 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::VPInterleaveBase
 A common base class for interleaved memory operations. 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::VPInterleaveEVLRecipe
 A recipe for interleaved memory operations with vector-predication intrinsics. 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::VPPartialReductionRecipe
 A recipe for forming partial reductions. More...
class  llvm::VPReductionEVLRecipe
 A recipe to represent inloop reduction operations with vector-predication intrinsics, performing a reduction on a vector operand with the explicit vector length (EVL) 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::VPExpressionRecipe
 A recipe to combine multiple recipes into a single 'expression' recipe, which should be considered a single entity for cost-modeling and transforms. 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::VPWidenMemoryRecipe
 A common base class for widening memory operations. More...
struct  llvm::VPWidenLoadRecipe
 A recipe for widening load operations, using the address to load from and an optional mask. More...
struct  llvm::VPWidenLoadEVLRecipe
 A recipe for widening load operations with vector-predication intrinsics, using the address to load from, the explicit vector length and an optional mask. More...
struct  llvm::VPWidenStoreRecipe
 A recipe for widening store operations, using the stored value, the address to store to and an optional mask. More...
struct  llvm::VPWidenStoreEVLRecipe
 A recipe for widening store operations with vector-predication intrinsics, using the value to store, the address to store to, the explicit vector length and an optional mask. 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::VPEVLBasedIVPHIRecipe
 A recipe for generating the phi node for the current index of elements, adjusted in accordance with EVL value. 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 input value IV value to the corresponding value of an IV with different start and step values, using Start + IV * Step. More...
class  llvm::VPScalarIVStepsRecipe
 A recipe for handling phi nodes of integer and floating-point inductions, producing their scalar values. More...
struct  llvm::CastIsPossible< VPPhiAccessors, const VPRecipeBase * >
 Casting from VPRecipeBase -> VPPhiAccessors is supported for all recipe types implementing VPPhiAccessors. More...
struct  llvm::CastInfoVPPhiAccessors< SrcTy >
 Support casting from VPRecipeBase -> VPPhiAccessors, by down-casting to the recipe types implementing VPPhiAccessors. More...
struct  llvm::CastInfo< VPPhiAccessors, VPRecipeBase * >
struct  llvm::CastInfo< VPPhiAccessors, const VPRecipeBase * >
class  llvm::VPBasicBlock
 VPBasicBlock serves as the leaf of the Hierarchical Control-Flow Graph. More...
class  llvm::VPIRBasicBlock
 A special type of VPBasicBlock that wraps an existing IR basic block. 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...

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.

Macros

#define VP_CLASSOF_IMPL(VPDefID)

Typedefs

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

Functions

raw_ostreamllvm::operator<< (raw_ostream &OS, const VPlan &Plan)

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; 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 499 of file VPlan.h.