LLVM 24.0.0git
VPlan.cpp File Reference

This is the LLVM vectorization plan. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loop-vectorize"

Functions

template<typename T>
static T * getEnclosingLoopRegionForRegion (T *P)
 Return the enclosing loop region for region P.
static bool hasConditionalTerminator (const VPBasicBlock *VPBB)
static void printFinalVPlan (VPlan &)
 To make RUN_VPLAN_PASS print final VPlan.
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

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 66 of file VPlan.cpp.

Function Documentation

◆ addRuntimeUnrollDisableMetaData()

◆ 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 548 of file VPlan.cpp.

References assert(), P, and T.

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

◆ 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 1459 of file VPlan.cpp.

References llvm::VPValue::getDefiningRecipe(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), and llvm::isa().

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

◆ printFinalVPlan()

void printFinalVPlan ( VPlan & )
static

To make RUN_VPLAN_PASS print final VPlan.

Definition at line 932 of file VPlan.cpp.

Referenced by llvm::VPlan::execute().

◆ remapOperands()

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

Variable Documentation

◆ LLVMLoopVectorizeFollowupAll

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

Metadata attribute names

Definition at line 59 of file VPlan.cpp.

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

◆ LLVMLoopVectorizeFollowupEpilogue

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

Definition at line 62 of file VPlan.cpp.

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

◆ LLVMLoopVectorizeFollowupVectorized

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

Definition at line 60 of file VPlan.cpp.

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