LLVM  14.0.0git
Namespaces | Macros | Functions | Variables
LoopVectorizationLegality.cpp File Reference
#include "llvm/Transforms/Vectorize/LoopVectorizationLegality.h"
#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Transforms/Utils/SizeOpts.h"
#include "llvm/Transforms/Vectorize/LoopVectorize.h"
Include dependency graph for LoopVectorizationLegality.cpp:

Go to the source code of this file.

Namespaces

 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 bool llvm::canIfConvertPHINodes (BasicBlock *BB)
 Check whether it is safe to if-convert this phi node. More...
 
static Typellvm::convertPointerToIntegerType (const DataLayout &DL, Type *Ty)
 
static Typellvm::getWiderType (const DataLayout &DL, Type *Ty0, Type *Ty1)
 
static bool llvm::hasOutsideLoopUser (const Loop *TheLoop, Instruction *Inst, SmallPtrSetImpl< Value * > &AllowedExit)
 Check that the instruction has outside loop users and is not an identified reduction variable. More...
 
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. More...
 

Variables

cl::opt< bool > EnableVPlanPredication
 
static cl::opt< bool > EnableIfConversion ("enable-if-conversion", cl::init(true), cl::Hidden, cl::desc("Enable if-conversion during vectorization."))
 
cl::opt< bool > llvm::HintsAllowReordering ("hints-allow-reordering", cl::init(true), cl::Hidden, cl::desc("Allow enabling loop hints to reorder " "FP operations during vectorization."))
 
static cl::opt< unsigned > VectorizeSCEVCheckThreshold ("vectorize-scev-check-threshold", cl::init(16), cl::Hidden, cl::desc("The maximum number of SCEV checks allowed."))
 
static cl::opt< unsigned > PragmaVectorizeSCEVCheckThreshold ("pragma-vectorize-scev-check-threshold", cl::init(128), cl::Hidden, cl::desc("The maximum number of SCEV checks allowed with a " "vectorize(enable) pragma"))
 
static cl::opt< LoopVectorizeHints::ScalableForceKindScalableVectorization ("scalable-vectorization", cl::init(LoopVectorizeHints::SK_FixedWidthOnly), 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_PreferFixedWidth, "on", "Scalable vectorization is available, but favor fixed-width " "vectorization when the cost is inconclusive."), clEnumValN(LoopVectorizeHints::SK_PreferScalable, "preferred", "Scalable vectorization is available and favored when the " "cost is inconclusive.")))
 
static const unsigned MaxInterleaveFactor = 16
 Maximum vectorization interleave count. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   LV_NAME

Definition at line 32 of file LoopVectorizationLegality.cpp.

◆ LV_NAME

#define LV_NAME   "loop-vectorize"

Definition at line 31 of file LoopVectorizationLegality.cpp.

Variable Documentation

◆ EnableIfConversion

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

◆ EnableVPlanPredication

cl::opt<bool> EnableVPlanPredication

◆ MaxInterleaveFactor

const unsigned MaxInterleaveFactor = 16
static

Maximum vectorization interleave count.

Definition at line 76 of file LoopVectorizationLegality.cpp.

◆ PragmaVectorizeSCEVCheckThreshold

cl::opt<unsigned> PragmaVectorizeSCEVCheckThreshold("pragma-vectorize-scev-check-threshold", cl::init(128), cl::Hidden, cl::desc("The maximum number of SCEV checks allowed with a " "vectorize(enable) pragma"))
static

◆ ScalableVectorization

cl::opt<LoopVectorizeHints::ScalableForceKind> ScalableVectorization("scalable-vectorization", cl::init(LoopVectorizeHints::SK_FixedWidthOnly), 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_PreferFixedWidth, "on", "Scalable vectorization is available, but favor fixed-width " "vectorization when the cost is inconclusive."), clEnumValN(LoopVectorizeHints::SK_PreferScalable, "preferred", "Scalable vectorization is available and favored when the " "cost is inconclusive.")))
static

◆ VectorizeSCEVCheckThreshold

cl::opt<unsigned> VectorizeSCEVCheckThreshold("vectorize-scev-check-threshold", cl::init(16), cl::Hidden, cl::desc("The maximum number of SCEV checks allowed."))
static