LLVM 22.0.0git
VPlan.cpp File Reference

This is the LLVM vectorization plan. More...

Go to the source code of this file.

Namespaces

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

Macros

#define DEBUG_TYPE   "loop-vectorize"

Functions

template<typename T>
static TgetPlanEntry (T *Start)
template<typename T>
static TgetEnclosingLoopRegionForRegion (T *P)
 Return the enclosing loop region for region P.
static bool hasConditionalTerminator (const VPBasicBlock *VPBB)
static std::pair< VPBlockBase *, VPBlockBase * > cloneFrom (VPBlockBase *Entry)
static void remapOperands (VPBlockBase *Entry, VPBlockBase *NewEntry, DenseMap< VPValue *, VPValue * > &Old2NewVPValues)
static bool isDefinedInsideLoopRegions (const VPValue *VPV)
 Returns true if there is a vector loop region and VPV is defined in a loop region.
static void addRuntimeUnrollDisableMetaData (Loop *L)

Variables

cl::opt< unsignedForceTargetInstructionCost
static cl::opt< boolPrintVPlansInDotFormat ("vplan-print-in-dot-format", cl::Hidden, cl::desc("Use dot format instead of plain text when dumping VPlans"))
const char LLVMLoopVectorizeFollowupAll [] = "llvm.loop.vectorize.followup_all"
const char LLVMLoopVectorizeFollowupVectorized []
const char LLVMLoopVectorizeFollowupEpilogue []

Detailed Description

This is the LLVM vectorization plan.

It represents a candidate for vectorization, allowing to plan and optimize how to vectorize a given loop before generating LLVM-IR. The vectorizer uses vectorization plans to estimate the costs of potential candidates and if profitable to execute the desired plan, generating vector LLVM-IR code.

Definition in file VPlan.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "loop-vectorize"

Definition at line 74 of file VPlan.cpp.

Function Documentation

◆ addRuntimeUnrollDisableMetaData()

◆ cloneFrom()

◆ getEnclosingLoopRegionForRegion()

template<typename T>
T * getEnclosingLoopRegionForRegion ( T * P)
static

Return the enclosing loop region for region P.

The templated version is used to support both const and non-const block arguments.

Definition at line 609 of file VPlan.cpp.

References assert(), P, and T.

Referenced by llvm::VPBasicBlock::getEnclosingLoopRegion(), and llvm::VPBasicBlock::getEnclosingLoopRegion().

◆ getPlanEntry()

◆ hasConditionalTerminator()

◆ isDefinedInsideLoopRegions()

bool isDefinedInsideLoopRegions ( const VPValue * VPV)
static

Returns true if there is a vector loop region and VPV is defined in a loop region.

Definition at line 1403 of file VPlan.cpp.

References llvm::VPValue::getDefiningRecipe(), llvm::VPBasicBlock::getEnclosingLoopRegion(), and llvm::VPRecipeBase::getParent().

Referenced by llvm::VPValue::isDefinedOutsideLoopRegions().

◆ remapOperands()

void remapOperands ( VPBlockBase * Entry,
VPBlockBase * NewEntry,
DenseMap< VPValue *, VPValue * > & Old2NewVPValues )
static

Variable Documentation

◆ ForceTargetInstructionCost

cl::opt<unsigned> ForceTargetInstructionCost
extern

◆ LLVMLoopVectorizeFollowupAll

const char LLVMLoopVectorizeFollowupAll[] = "llvm.loop.vectorize.followup_all"

Metadata attribute names

Definition at line 61 of file VPlan.cpp.

Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().

◆ LLVMLoopVectorizeFollowupEpilogue

const char LLVMLoopVectorizeFollowupEpilogue[]
Initial value:
=
"llvm.loop.vectorize.followup_epilogue"

Definition at line 64 of file VPlan.cpp.

Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().

◆ LLVMLoopVectorizeFollowupVectorized

const char LLVMLoopVectorizeFollowupVectorized[]
Initial value:
=
"llvm.loop.vectorize.followup_vectorized"

Definition at line 62 of file VPlan.cpp.

Referenced by llvm::LoopVectorizationPlanner::updateLoopMetadataAndProfileInfo().

◆ PrintVPlansInDotFormat

cl::opt< bool > PrintVPlansInDotFormat("vplan-print-in-dot-format", cl::Hidden, cl::desc("Use dot format instead of plain text when dumping VPlans")) ( "vplan-print-in-dot-format" ,
cl::Hidden ,
cl::desc("Use dot format instead of plain text when dumping VPlans")  )
static