LLVM 23.0.0git
LoopVectorizationLegality.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define LV_NAME   "loop-vectorize"
#define DEBUG_TYPE   LV_NAME

Functions

static bool llvm::isUniformLoop (Loop *Lp, Loop *OuterLp)
static bool llvm::isUniformLoopNest (Loop *Lp, Loop *OuterLp)
static IntegerTypellvm::getInductionIntegerTy (const DataLayout &DL, Type *Ty)
static IntegerTypellvm::getWiderInductionTy (const DataLayout &DL, Type *Ty0, Type *Ty1)
static bool llvm::storeToSameAddress (ScalarEvolution *SE, StoreInst *A, StoreInst *B)
 Returns true if A and B have same pointer operands or same SCEVs addresses.
static bool llvm::isTLIScalarize (const TargetLibraryInfo &TLI, const CallInst &CI)
 Checks if a function is scalarizable according to the TLI, in the sense that it should be vectorized and then expanded in multiple scalar calls.
static bool llvm::findHistogram (LoadInst *LI, StoreInst *HSt, Loop *TheLoop, const PredicatedScalarEvolution &PSE, SmallVectorImpl< HistogramInfo > &Histograms)
 Find histogram operations that match high-level code in loops:

Variables

static cl::opt< boolEnableIfConversion ("enable-if-conversion", cl::init(true), cl::Hidden, cl::desc("Enable if-conversion during vectorization."))
static cl::opt< boolAllowStridedPointerIVs ("lv-strided-pointer-ivs", cl::init(false), cl::Hidden, cl::desc("Enable recognition of non-constant strided " "pointer induction variables."))
static cl::opt< boolHintsAllowReordering ("hints-allow-reordering", cl::init(true), cl::Hidden, cl::desc("Allow enabling loop hints to reorder " "FP operations during vectorization."))
static cl::opt< LoopVectorizeHints::ScalableForceKindForceScalableVectorization ("scalable-vectorization", cl::init(LoopVectorizeHints::SK_Unspecified), cl::Hidden, cl::desc("Control whether the compiler can use scalable vectors to " "vectorize a loop"), cl::values(clEnumValN(LoopVectorizeHints::SK_FixedWidthOnly, "off", "Scalable vectorization is disabled."), clEnumValN(LoopVectorizeHints::SK_PreferScalable, "preferred", "Scalable vectorization is available and favored when the " "cost is inconclusive."), clEnumValN(LoopVectorizeHints::SK_PreferScalable, "on", "Scalable vectorization is available and favored when the " "cost is inconclusive."), clEnumValN(LoopVectorizeHints::SK_AlwaysScalable, "always", "Scalable vectorization is available and always favored when " "feasible")))
static cl::opt< boolEnableHistogramVectorization ("enable-histogram-loop-vectorization", cl::init(false), cl::Hidden, cl::desc("Enables autovectorization of some loops containing histograms"))
static const unsigned MaxInterleaveFactor = 16
 Maximum vectorization interleave count.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   LV_NAME

Definition at line 40 of file LoopVectorizationLegality.cpp.

◆ LV_NAME

Variable Documentation

◆ AllowStridedPointerIVs

cl::opt< bool > AllowStridedPointerIVs("lv-strided-pointer-ivs", cl::init(false), cl::Hidden, cl::desc("Enable recognition of non-constant strided " "pointer induction variables.")) ( "lv-strided-pointer-ivs" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Enable recognition of non-constant strided " "pointer induction variables.")  )
static

◆ EnableHistogramVectorization

cl::opt< bool > EnableHistogramVectorization("enable-histogram-loop-vectorization", cl::init(false), cl::Hidden, cl::desc("Enables autovectorization of some loops containing histograms")) ( "enable-histogram-loop-vectorization" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Enables autovectorization of some loops containing histograms")  )
static

◆ EnableIfConversion

cl::opt< bool > EnableIfConversion("enable-if-conversion", cl::init(true), cl::Hidden, cl::desc("Enable if-conversion during vectorization.")) ( "enable-if-conversion" ,
cl::init(true) ,
cl::Hidden ,
cl::desc("Enable if-conversion during vectorization.")  )
static

◆ ForceScalableVectorization

cl::opt< LoopVectorizeHints::ScalableForceKind > ForceScalableVectorization("scalable-vectorization", cl::init(LoopVectorizeHints::SK_Unspecified), cl::Hidden, cl::desc("Control whether the compiler can use scalable vectors to " "vectorize a loop"), cl::values( clEnumValN(LoopVectorizeHints::SK_FixedWidthOnly, "off", "Scalable vectorization is disabled."), clEnumValN( LoopVectorizeHints::SK_PreferScalable, "preferred", "Scalable vectorization is available and favored when the " "cost is inconclusive."), clEnumValN( LoopVectorizeHints::SK_PreferScalable, "on", "Scalable vectorization is available and favored when the " "cost is inconclusive."), clEnumValN( LoopVectorizeHints::SK_AlwaysScalable, "always", "Scalable vectorization is available and always favored when " "feasible"))) ( "scalable-vectorization" ,
cl::init(LoopVectorizeHints::SK_Unspecified) ,
cl::Hidden ,
cl::desc("Control whether the compiler can use scalable vectors to " "vectorize a loop") ,
cl::values( clEnumValN(LoopVectorizeHints::SK_FixedWidthOnly, "off", "Scalable vectorization is disabled."), clEnumValN( LoopVectorizeHints::SK_PreferScalable, "preferred", "Scalable vectorization is available and favored when the " "cost is inconclusive."), clEnumValN( LoopVectorizeHints::SK_PreferScalable, "on", "Scalable vectorization is available and favored when the " "cost is inconclusive."), clEnumValN( LoopVectorizeHints::SK_AlwaysScalable, "always", "Scalable vectorization is available and always favored when " "feasible"))  )
static

◆ HintsAllowReordering

cl::opt< bool > HintsAllowReordering("hints-allow-reordering", cl::init(true), cl::Hidden, cl::desc("Allow enabling loop hints to reorder " "FP operations during vectorization.")) ( "hints-allow-reordering" ,
cl::init(true) ,
cl::Hidden ,
cl::desc("Allow enabling loop hints to reorder " "FP operations during vectorization.")  )
static

◆ MaxInterleaveFactor

const unsigned MaxInterleaveFactor = 16
static

Maximum vectorization interleave count.

Definition at line 83 of file LoopVectorizationLegality.cpp.

Referenced by llvm::WebAssemblyTTIImpl::getInterleavedMemoryOpCost().