LLVM 24.0.0git
LoopVectorizationPlanner.cpp File Reference

This file implements VFSelectionContext methods for loop vectorization VF selection, independent of cost-modeling decisions. More...

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "loop-vectorize"

Functions

static void debugVectorizationMessage (const StringRef Prefix, const StringRef DebugMsg, Instruction *I)
 Write a DebugMsg about vectorization to the debug output stream.
static OptimizationRemarkAnalysis createLVAnalysis (StringRef RemarkName, const Loop *TheLoop, Instruction *I, DebugLoc DL={})
 Create an analysis remark that explains why vectorization failed RemarkName is the identifier for the remark.
static bool hasUnsupportedHeaderPhiRecipe (VPlan &Plan)

Detailed Description

This file implements VFSelectionContext methods for loop vectorization VF selection, independent of cost-modeling decisions.

Definition in file LoopVectorizationPlanner.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "loop-vectorize"

Definition at line 30 of file LoopVectorizationPlanner.cpp.

Function Documentation

◆ createLVAnalysis()

OptimizationRemarkAnalysis createLVAnalysis ( StringRef RemarkName,
const Loop * TheLoop,
Instruction * I,
DebugLoc DL = {} )
static

Create an analysis remark that explains why vectorization failed RemarkName is the identifier for the remark.

If I is passed it is an instruction that prevents vectorization. Otherwise TheLoop is used for the location of the remark. If DL is passed, use it as debug location for the remark.

Returns
the remark object that can be streamed to.

Definition at line 52 of file LoopVectorizationPlanner.cpp.

References DL, and I.

Referenced by llvm::LoopVectorizationUtils::reportVectorizationFailure(), and llvm::LoopVectorizationUtils::reportVectorizationInfo().

◆ debugVectorizationMessage()

void debugVectorizationMessage ( const StringRef Prefix,
const StringRef DebugMsg,
Instruction * I )
static

Write a DebugMsg about vectorization to the debug output stream.

If I is passed, the message relates to that particular instruction.

Definition at line 35 of file LoopVectorizationPlanner.cpp.

References llvm::dbgs(), and I.

Referenced by llvm::LoopVectorizationUtils::reportVectorization(), llvm::LoopVectorizationUtils::reportVectorizationFailure(), and llvm::LoopVectorizationUtils::reportVectorizationInfo().

◆ hasUnsupportedHeaderPhiRecipe()

bool hasUnsupportedHeaderPhiRecipe ( VPlan & Plan)
static
Returns
true if the VPlan contains header phi recipes that are not currently supported for epilogue vectorization.

Definition at line 816 of file LoopVectorizationPlanner.cpp.

References llvm::any_of(), llvm::VPBlockBase::getEntryBasicBlock(), llvm::VPlan::getVectorLoopRegion(), and llvm::VPBasicBlock::phis().