LLVM 22.0.0git
llvm::EpilogueVectorizerEpilogueLoop Class Reference
Inheritance diagram for llvm::EpilogueVectorizerEpilogueLoop:
[legend]

Public Member Functions

 EpilogueVectorizerEpilogueLoop (Loop *OrigLoop, PredicatedScalarEvolution &PSE, LoopInfo *LI, DominatorTree *DT, const TargetTransformInfo *TTI, AssumptionCache *AC, EpilogueLoopVectorizationInfo &EPI, LoopVectorizationCostModel *CM, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, GeneratedRTChecks &Checks, VPlan &Plan)
BasicBlockcreateVectorizedLoopSkeleton () final
 Implements the interface for creating a vectorized skeleton using the epilogue loop strategy (i.e., the second pass of VPlan execution).
BasicBlockgetAdditionalBypassBlock () const
 Return the additional bypass block which targets the scalar loop by skipping the epilogue loop after completing the main loop.
Public Member Functions inherited from llvm::InnerLoopAndEpilogueVectorizer
 InnerLoopAndEpilogueVectorizer (Loop *OrigLoop, PredicatedScalarEvolution &PSE, LoopInfo *LI, DominatorTree *DT, const TargetTransformInfo *TTI, AssumptionCache *AC, EpilogueLoopVectorizationInfo &EPI, LoopVectorizationCostModel *CM, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, GeneratedRTChecks &Checks, VPlan &Plan, ElementCount VecWidth, ElementCount MinProfitableTripCount, unsigned UnrollFactor)
Public Member Functions inherited from llvm::InnerLoopVectorizer
 InnerLoopVectorizer (Loop *OrigLoop, PredicatedScalarEvolution &PSE, LoopInfo *LI, DominatorTree *DT, const TargetTransformInfo *TTI, AssumptionCache *AC, ElementCount VecWidth, unsigned UnrollFactor, LoopVectorizationCostModel *CM, BlockFrequencyInfo *BFI, ProfileSummaryInfo *PSI, GeneratedRTChecks &RTChecks, VPlan &Plan)
virtual ~InnerLoopVectorizer ()=default
void fixVectorizedLoop (VPTransformState &State)
 Fix the vectorized code, taking care of header phi's, and more.
void fixNonInductionPHIs (VPTransformState &State)
 Fix the non-induction PHIs in Plan.
ValuegetTripCount () const
 Returns the original loop trip count.
void setTripCount (Value *TC)
 Used to set the trip count after ILV's construction and after the preheader block has been executed.

Protected Member Functions

BasicBlockemitMinimumVectorEpilogueIterCountCheck (BasicBlock *VectorPH, BasicBlock *Bypass, BasicBlock *Insert)
 Emits an iteration count bypass check after the main vector loop has finished to see if there are any iterations left to execute by either the vector epilogue or the scalar epilogue.
void printDebugTracesAtStart () override
 Allow subclasses to override and print debug traces before/after vplan execution, when trace information is requested.
void printDebugTracesAtEnd () override
Protected Member Functions inherited from llvm::InnerLoopVectorizer
BasicBlockcreateScalarPreheader (StringRef Prefix)
 Create and return a new IR basic block for the scalar preheader whose name is prefixed with Prefix.

Additional Inherited Members

Public Attributes inherited from llvm::InnerLoopAndEpilogueVectorizer
EpilogueLoopVectorizationInfoEPI
 Holds and updates state information required to vectorize the main loop and its epilogue in two separate passes.
Protected Attributes inherited from llvm::InnerLoopAndEpilogueVectorizer
ElementCount MinProfitableTripCount
Protected Attributes inherited from llvm::InnerLoopVectorizer
LoopOrigLoop
 The original loop.
PredicatedScalarEvolutionPSE
 A wrapper around ScalarEvolution used to add runtime SCEV checks.
LoopInfoLI
 Loop Info.
DominatorTreeDT
 Dominator Tree.
const TargetTransformInfoTTI
 Target Transform Info.
AssumptionCacheAC
 Assumption Cache.
ElementCount VF
 The vectorization SIMD factor to use.
unsigned UF
 The vectorization unroll factor to use.
IRBuilder Builder
 The builder that we use.
ValueTripCount = nullptr
 Trip count of the original loop.
LoopVectorizationCostModelCost
 The profitablity analysis.
BlockFrequencyInfoBFI
 BFI and PSI are used to check for profile guided size optimizations.
ProfileSummaryInfoPSI
GeneratedRTChecks & RTChecks
 Structure to hold information about generated runtime checks, responsible for cleaning the checks, if vectorization turns out unprofitable.
VPlanPlan
VPBasicBlockVectorPHVPBB
 The vector preheader block of Plan, used as target for check blocks introduced during skeleton creation.

Detailed Description

Definition at line 690 of file LoopVectorize.cpp.

Constructor & Destructor Documentation

◆ EpilogueVectorizerEpilogueLoop()

Member Function Documentation

◆ createVectorizedLoopSkeleton()

◆ emitMinimumVectorEpilogueIterCountCheck()

BasicBlock * EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck ( BasicBlock * VectorPH,
BasicBlock * Bypass,
BasicBlock * Insert )
protected

Emits an iteration count bypass check after the main vector loop has finished to see if there are any iterations left to execute by either the vector epilogue or the scalar epilogue.

Definition at line 7433 of file LoopVectorize.cpp.

References assert(), llvm::InnerLoopVectorizer::Builder, llvm::Count, llvm::BranchInst::Create(), llvm::createStepForVF(), llvm::InnerLoopAndEpilogueVectorizer::EPI, estimateElementCount(), llvm::CmpInst::ICMP_ULE, llvm::CmpInst::ICMP_ULT, P, llvm::InnerLoopVectorizer::Plan, llvm::VPBlockUtils::reassociateBlocks(), llvm::ReplaceInstWithInst(), and llvm::setBranchWeights().

Referenced by createVectorizedLoopSkeleton().

◆ getAdditionalBypassBlock()

BasicBlock * llvm::EpilogueVectorizerEpilogueLoop::getAdditionalBypassBlock ( ) const
inline

Return the additional bypass block which targets the scalar loop by skipping the epilogue loop after completing the main loop.

Definition at line 714 of file LoopVectorize.cpp.

References assert(), and getAdditionalBypassBlock().

Referenced by getAdditionalBypassBlock(), and llvm::LoopVectorizePass::processLoop().

◆ printDebugTracesAtEnd()

void EpilogueVectorizerEpilogueLoop::printDebugTracesAtEnd ( )
overrideprotectedvirtual

◆ printDebugTracesAtStart()

void EpilogueVectorizerEpilogueLoop::printDebugTracesAtStart ( )
overrideprotectedvirtual

Allow subclasses to override and print debug traces before/after vplan execution, when trace information is requested.

Reimplemented from llvm::InnerLoopVectorizer.

Definition at line 7483 of file LoopVectorize.cpp.

References llvm::dbgs(), llvm::InnerLoopAndEpilogueVectorizer::EPI, and LLVM_DEBUG.


The documentation for this class was generated from the following file: