LLVM 20.0.0git
|
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient output IR, including which branches, basic-blocks and output IR instructions to generate, and their cost. More...
#include "Transforms/Vectorize/VPlan.h"
Public Member Functions | |
VPlan (Loop *L) | |
Construct a VPlan for L . | |
VPlan (BasicBlock *ScalarHeaderBB, VPValue *TC) | |
Construct a VPlan with a new VPBasicBlock as entry, a VPIRBasicBlock wrapping ScalarHeaderBB and a trip count of TC . | |
~VPlan () | |
void | setEntry (VPBasicBlock *VPBB) |
void | prepareToExecute (Value *TripCount, Value *VectorTripCount, VPTransformState &State) |
Prepare the plan for execution, setting up the required live-in values. | |
void | execute (VPTransformState *State) |
Generate the IR code for this VPlan. | |
InstructionCost | cost (ElementCount VF, VPCostContext &Ctx) |
Return the cost of this plan. | |
VPBasicBlock * | getEntry () |
const VPBasicBlock * | getEntry () const |
VPBasicBlock * | getVectorPreheader () |
Returns the preheader of the vector loop region. | |
VPRegionBlock * | getVectorLoopRegion () |
Returns the VPRegionBlock of the vector loop. | |
const VPRegionBlock * | getVectorLoopRegion () const |
const VPBasicBlock * | getMiddleBlock () const |
Returns the 'middle' block of the plan, that is the block that selects whether to execute the scalar tail loop or the exit block from the loop latch. | |
VPBasicBlock * | getMiddleBlock () |
VPBasicBlock * | getScalarPreheader () const |
Return the VPBasicBlock for the preheader of the scalar loop. | |
VPIRBasicBlock * | getScalarHeader () const |
Return the VPIRBasicBlock wrapping the header of the scalar loop. | |
auto | getExitBlocks () |
Return an iterator range over the VPIRBasicBlock wrapping the exit blocks of the VPlan, that is leaf nodes except the scalar header. | |
VPValue * | getTripCount () const |
The trip count of the original loop. | |
void | resetTripCount (VPValue *NewTripCount) |
Resets the trip count for the VPlan. | |
VPValue * | getOrCreateBackedgeTakenCount () |
The backedge taken count of the original loop. | |
VPValue & | getVectorTripCount () |
The vector trip count. | |
VPValue & | getVF () |
Returns the VF of the vector loop region. | |
VPValue & | getVFxUF () |
Returns VF * UF of the vector loop region. | |
void | addVF (ElementCount VF) |
void | setVF (ElementCount VF) |
bool | hasVF (ElementCount VF) |
bool | hasScalableVF () |
iterator_range< SmallSetVector< ElementCount, 2 >::iterator > | vectorFactors () const |
Returns an iterator range over all VFs of the plan. | |
bool | hasScalarVFOnly () const |
bool | hasUF (unsigned UF) const |
unsigned | getUF () const |
void | setUF (unsigned UF) |
std::string | getName () const |
Return a string with the name of the plan and the applicable VFs and UFs. | |
void | setName (const Twine &newName) |
VPValue * | getOrAddLiveIn (Value *V) |
Gets the live-in VPValue for V or adds a new live-in (if none exists yet) for V . | |
VPValue * | getLiveIn (Value *V) const |
Return the live-in VPValue for V , if there is one or nullptr otherwise. | |
void | printLiveIns (raw_ostream &O) const |
Print the live-ins of this VPlan to O . | |
void | print (raw_ostream &O) const |
Print this VPlan to O . | |
void | printDOT (raw_ostream &O) const |
Print this VPlan in DOT format to O . | |
LLVM_DUMP_METHOD void | dump () const |
Dump the plan to stderr (for debugging). | |
VPCanonicalIVPHIRecipe * | getCanonicalIV () |
Returns the canonical induction recipe of the vector loop. | |
VPValue * | getSCEVExpansion (const SCEV *S) const |
void | addSCEVExpansion (const SCEV *S, VPValue *V) |
VPlan * | duplicate () |
Clone the current VPlan, update all VPValues of the new VPlan and cloned recipes to refer to the clones, and return it. | |
VPBasicBlock * | createVPBasicBlock (const Twine &Name, VPRecipeBase *Recipe=nullptr) |
Create a new VPBasicBlock with Name and containing Recipe if present. | |
VPRegionBlock * | createVPRegionBlock (VPBlockBase *Entry, VPBlockBase *Exiting, const std::string &Name="", bool IsReplicator=false) |
Create a new VPRegionBlock with Entry , Exiting and Name . | |
VPRegionBlock * | createVPRegionBlock (const std::string &Name="", bool IsReplicator=false) |
Create a new VPRegionBlock with Name and entry and exiting blocks set to nullptr. | |
VPIRBasicBlock * | createEmptyVPIRBasicBlock (BasicBlock *IRBB) |
Create a VPIRBasicBlock wrapping IRBB , but do not create VPIRInstructions wrapping the instructions in tIRBB . | |
VPIRBasicBlock * | createVPIRBasicBlock (BasicBlock *IRBB) |
Create a VPIRBasicBlock from IRBB containing VPIRInstructions for all instructions in IRBB , except its terminator which is managed by the successors of the block in VPlan. | |
Static Public Member Functions | |
static VPlanPtr | createInitialVPlan (Type *InductionTy, PredicatedScalarEvolution &PSE, bool RequiresScalarEpilogueCheck, bool TailFolded, Loop *TheLoop) |
Create initial VPlan, having an "entry" VPBasicBlock (wrapping original scalar pre-header) which contains SCEV expansions that need to happen before the CFG is modified (when executing a VPlan for the epilogue vector loop, the original entry needs to be replaced by a new one); a VPBasicBlock for the vector pre-header, followed by a region for the vector loop, followed by the middle VPBasicBlock. | |
Friends | |
class | VPlanPrinter |
class | VPSlotTracker |
VPlan models a candidate for vectorization, encoding various decisions take to produce efficient output IR, including which branches, basic-blocks and output IR instructions to generate, and their cost.
VPlan holds a Hierarchical-CFG of VPBasicBlocks and VPRegionBlocks rooted at an Entry VPBasicBlock.
VPlan::VPlan | ( | Loop * | L | ) |
|
inline |
Construct a VPlan with a new VPBasicBlock as entry, a VPIRBasicBlock wrapping ScalarHeaderBB
and a trip count of TC
.
Definition at line 3806 of file VPlan.h.
References createVPBasicBlock(), createVPIRBasicBlock(), and setEntry().
Definition at line 3998 of file VPlan.h.
References assert(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains().
Referenced by llvm::vputils::getOrCreateVPValueForSCEVExpr().
|
inline |
Definition at line 3910 of file VPlan.h.
References llvm::SetVector< T, Vector, Set, N >::insert().
InstructionCost VPlan::cost | ( | ElementCount | VF, |
VPCostContext & | Ctx | ||
) |
Return the cost of this plan.
Definition at line 1041 of file VPlan.cpp.
References llvm::VPTransformState::VF.
VPIRBasicBlock * VPlan::createEmptyVPIRBasicBlock | ( | BasicBlock * | IRBB | ) |
Create a VPIRBasicBlock wrapping IRBB
, but do not create VPIRInstructions wrapping the instructions in tIRBB
.
The returned block is owned by the VPlan and deleted once the VPlan is destroyed.
|
static |
Create initial VPlan, having an "entry" VPBasicBlock (wrapping original scalar pre-header) which contains SCEV expansions that need to happen before the CFG is modified (when executing a VPlan for the epilogue vector loop, the original entry needs to be replaced by a new one); a VPBasicBlock for the vector pre-header, followed by a region for the vector loop, followed by the middle VPBasicBlock.
If a check is needed to guard executing the scalar epilogue loop, it will be added to the middle block, together with VPBasicBlocks for the scalar preheader and exit blocks. InductionTy
is the type of the canonical induction and used for related values, like the trip count expression.
Definition at line 845 of file VPlan.cpp.
References assert(), llvm::VPInstruction::BranchOnCond, llvm::VPTransformState::Builder, llvm::VPBlockUtils::connectBlocks(), createVPBasicBlock(), createVPIRBasicBlock(), createVPRegionBlock(), llvm::Type::getContext(), getEntry(), llvm::Type::getInt1Ty(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), getOrAddLiveIn(), llvm::vputils::getOrCreateVPValueForSCEVExpr(), getScalarHeader(), llvm::PredicatedScalarEvolution::getSE(), llvm::PredicatedScalarEvolution::getSymbolicMaxBackedgeTakenCount(), llvm::BasicBlock::getTerminator(), getTripCount(), llvm::ScalarEvolution::getTripCountFromExitCount(), llvm::ConstantInt::getTrue(), llvm::SCEV::getType(), llvm::LoopBase< BlockT, LoopT >::getUniqueLatchExitBlock(), getVectorTripCount(), llvm::CmpInst::ICMP_EQ, llvm::VPBlockUtils::insertBlockAfter(), and llvm::VPTransformState::Plan.
|
inline |
Create a new VPBasicBlock with Name
and containing Recipe
if present.
The returned block is owned by the VPlan and deleted once the VPlan is destroyed.
Definition at line 4010 of file VPlan.h.
References Name, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by createInitialVPlan(), createReplicateRegion(), llvm::VPlanTransforms::handleUncountableEarlyExit(), and VPlan().
VPIRBasicBlock * VPlan::createVPIRBasicBlock | ( | BasicBlock * | IRBB | ) |
Create a VPIRBasicBlock from IRBB
containing VPIRInstructions for all instructions in IRBB
, except its terminator which is managed by the successors of the block in VPlan.
The returned block is owned by the VPlan and deleted once the VPlan is destroyed.
Definition at line 1247 of file VPlan.cpp.
References llvm::BasicBlock::begin(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::BasicBlock::getTerminator(), I, and llvm::make_range().
Referenced by createInitialVPlan(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::VPlanTransforms::handleUncountableEarlyExit(), llvm::InnerLoopVectorizer::introduceCheckBlockInVPlan(), replaceVPBBWithIRVPBB(), and VPlan().
|
inline |
Create a new VPRegionBlock with Name
and entry and exiting blocks set to nullptr.
If IsReplicator
is true, the region is a replicate region. The returned block is owned by the VPlan and deleted once the VPlan is destroyed.
Definition at line 4032 of file VPlan.h.
References Name, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
inline |
Create a new VPRegionBlock with Entry
, Exiting
and Name
.
If IsReplicator
is true, the region is a replicate region. The returned block is owned by the VPlan and deleted once the VPlan is destroyed.
Definition at line 4020 of file VPlan.h.
References Name, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by createInitialVPlan(), and createReplicateRegion().
LLVM_DUMP_METHOD void VPlan::dump | ( | ) | const |
Dump the plan to stderr (for debugging).
Definition at line 1146 of file VPlan.cpp.
References llvm::dbgs(), and llvm::print().
VPlan * VPlan::duplicate | ( | ) |
Clone the current VPlan, update all VPValues of the new VPlan and cloned recipes to refer to the clones, and return it.
Definition at line 1187 of file VPlan.cpp.
References assert(), cloneFrom(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(), llvm::find_if(), I, Name, remapOperands(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::VPTransformState::VF, and llvm::vp_depth_first_shallow().
Referenced by llvm::LoopVectorizePass::processLoop().
void VPlan::execute | ( | VPTransformState * | State | ) |
Generate the IR code for this VPlan.
Generate the code inside the preheader and body of the vectorized loop.
Assumes a single pre-header basic-block was created for this. Introduce additional basic-blocks as needed, and fill them all.
Definition at line 955 of file VPlan.cpp.
References llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::applyUpdates(), assert(), llvm::Block, llvm::VPTransformState::CFG, llvm::dbgs(), llvm::DominatorTreeBase< BasicBlock, false >::Delete, llvm::VPTransformState::CFGState::DTU, llvm::dump(), llvm::Instruction::eraseFromParent(), llvm::VPTransformState::CFGState::ExitBB, llvm::GenericDomTreeUpdater< DerivedT, DomTreeT, PostDomTreeT >::flush(), GEP, llvm::VPTransformState::get(), llvm::BasicBlock::getContext(), llvm::VPBlockBase::getExitingBasicBlock(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode(), llvm::BasicBlock::getSingleSuccessor(), llvm::BasicBlock::getTerminator(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable(), IV, LLVM_DEBUG, llvm::Instruction::moveBefore(), llvm::VPTransformState::CFGState::PrevBB, llvm::VPTransformState::CFGState::PrevVPBB, llvm::User::setOperand(), llvm::VPTransformState::VF, and llvm::VPTransformState::CFGState::VPBB2IRBB.
Referenced by llvm::LoopVectorizationPlanner::executePlan().
|
inline |
Returns the canonical induction recipe of the vector loop.
Definition at line 3985 of file VPlan.h.
References llvm::VPBasicBlock::begin(), llvm::VPBasicBlock::empty(), llvm::VPBlockBase::getEntryBasicBlock(), llvm::VPBlockBase::getSingleSuccessor(), and getVectorLoopRegion().
Referenced by llvm::VPlanTransforms::addActiveLaneMask(), addExitUsersForFirstOrderRecurrences(), addScalarResumePhis(), addVPLaneMaskPhiAndUpdateExitBranch(), collectAllHeaderMasks(), llvm::VPRecipeBuilder::createHeaderMask(), createScalarIVSteps(), preparePlanForMainVectorLoop(), removeRedundantCanonicalIVs(), simplifyRecipes(), transformRecipestoEVLRecipes(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::VPlanTransforms::tryAddExplicitVectorLength(), and willGenerateVectors().
|
inline |
Definition at line 3844 of file VPlan.h.
Referenced by addReplicateRegions(), llvm::VPlanTransforms::convertToConcreteRecipes(), createInitialVPlan(), llvm::VPlanPrinter::dump(), llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), llvm::LoopVectorizationPlanner::executePlan(), llvm::InnerLoopVectorizer::fixNonInductionPHIs(), llvm::DomTreeNodeTraits< VPBlockBase >::getEntryNode(), llvm::vputils::getOrCreateVPValueForSCEVExpr(), mergeBlocksIntoPredecessors(), mergeReplicateRegionsIntoSuccessors(), preparePlanForEpilogueVectorLoop(), llvm::VPlanTransforms::removeDeadRecipes(), removeRedundantExpandSCEVRecipes(), llvm::VPBlockBase::setPlan(), simplifyRecipes(), sinkScalarOperands(), and llvm::VPlanTransforms::unrollByUF().
|
inline |
|
inline |
Return an iterator range over the VPIRBasicBlock wrapping the exit blocks of the VPlan, that is leaf nodes except the scalar header.
Defined in VPlanHCFG, as the definition of the type needs access to the definitions of VPBlockShallowTraversalWrapper.
Definition at line 309 of file VPlanCFG.h.
References llvm::VPBlockBase::getNumSuccessors(), getScalarHeader(), getVectorLoopRegion(), llvm::make_filter_range(), and llvm::vp_depth_first_shallow().
Referenced by collectUsersInExitBlocks().
Return the live-in VPValue for V
, if there is one or nullptr otherwise.
Definition at line 3968 of file VPlan.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
|
inline |
Definition at line 3862 of file VPlan.h.
References getScalarPreheader().
|
inline |
Returns the 'middle' block of the plan, that is the block that selects whether to execute the scalar tail loop or the exit block from the loop latch.
Definition at line 3859 of file VPlan.h.
References getScalarPreheader().
Referenced by addExitUsersForFirstOrderRecurrences(), addUsersInExitBlocks(), collectUsersInExitBlocks(), llvm::InnerLoopVectorizer::createVectorLoopSkeleton(), llvm::LoopVectorizationPlanner::executePlan(), and llvm::VPlanTransforms::handleUncountableEarlyExit().
std::string VPlan::getName | ( | ) | const |
Return a string with the name of the plan and the applicable VFs and UFs.
Definition at line 1116 of file VPlan.cpp.
References llvm::drop_begin(), Name, and llvm::VPTransformState::VF.
Referenced by llvm::VPlanPrinter::dump().
Gets the live-in VPValue for V
or adds a new live-in (if none exists yet) for V
.
Definition at line 3951 of file VPlan.h.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::VPValue::isLiveIn(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by addCanonicalIVRecipes(), addExitUsersForFirstOrderRecurrences(), addScalarResumePhis(), addUsersInExitBlocks(), createInitialVPlan(), llvm::VPlanTransforms::createInterleaveGroups(), llvm::vputils::getOrCreateVPValueForSCEVExpr(), llvm::VPRecipeBuilder::getVPValueOrAddLiveIn(), legalizeAndOptimizeInductions(), llvm::VPlanTransforms::optimizeForVFAndUF(), preparePlanForEpilogueVectorLoop(), transformRecipestoEVLRecipes(), and llvm::VPlanTransforms::tryAddExplicitVectorLength().
|
inline |
The backedge taken count of the original loop.
Definition at line 3895 of file VPlan.h.
Referenced by llvm::VPRecipeBuilder::createHeaderMask(), and llvm::vputils::isHeaderMask().
|
inline |
Return the VPIRBasicBlock wrapping the header of the scalar loop.
Definition at line 3872 of file VPlan.h.
Referenced by addScalarResumePhis(), createInitialVPlan(), getExitBlocks(), getScalarPreheader(), and preparePlanForMainVectorLoop().
|
inline |
Return the VPBasicBlock for the preheader of the scalar loop.
Definition at line 3867 of file VPlan.h.
References getScalarHeader().
Referenced by addExitUsersForFirstOrderRecurrences(), addScalarResumePhis(), llvm::InnerLoopVectorizer::createVectorLoopSkeleton(), getMiddleBlock(), llvm::InnerLoopVectorizer::introduceCheckBlockInVPlan(), and preparePlanForMainVectorLoop().
Definition at line 3994 of file VPlan.h.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup().
Referenced by llvm::InnerLoopVectorizer::fixupIVUsers(), and llvm::vputils::getOrCreateVPValueForSCEVExpr().
|
inline |
The trip count of the original loop.
Definition at line 3881 of file VPlan.h.
References assert().
Referenced by llvm::VPlanTransforms::addActiveLaneMask(), addVPLaneMaskPhiAndUpdateExitBranch(), createInitialVPlan(), llvm::LoopVectorizationPlanner::executePlan(), llvm::vputils::isHeaderMask(), llvm::VPlanTransforms::optimizeForVFAndUF(), preparePlanForEpilogueVectorLoop(), llvm::LoopVectorizationPlanner::selectEpilogueVectorizationFactor(), and llvm::VPlanTransforms::tryAddExplicitVectorLength().
|
inline |
Definition at line 3933 of file VPlan.h.
References assert(), and llvm::SetVector< T, Vector, Set, N >::size().
Referenced by llvm::VPWidenPointerInductionRecipe::execute(), llvm::LoopVectorizationPlanner::executePlan(), and llvm::VPTransformState::setDebugLocFrom().
VPRegionBlock * VPlan::getVectorLoopRegion | ( | ) |
Returns the VPRegionBlock of the vector loop.
Definition at line 1047 of file VPlan.cpp.
References B, and llvm::vp_depth_first_shallow().
Referenced by addCanonicalIVRecipes(), addExitUsersForFirstOrderRecurrences(), addScalarResumePhis(), addVPLaneMaskPhiAndUpdateExitBranch(), llvm::VPlanTransforms::adjustFixedOrderRecurrences(), llvm::VPlanTransforms::clearReductionWrapFlags(), collectAllHeaderMasks(), llvm::collectEphemeralRecipesForVPlan(), llvm::VPRecipeBuilder::createHeaderMask(), createScalarIVSteps(), llvm::LoopVectorizationPlanner::executePlan(), llvm::InnerLoopVectorizer::fixVectorizedLoop(), getCanonicalIV(), getExitBlocks(), getVectorPreheader(), llvm::VPlanTransforms::handleUncountableEarlyExit(), legalizeAndOptimizeInductions(), licm(), llvm::VPlanTransforms::optimizeForVFAndUF(), planContainsAdditionalSimplifications(), preparePlanForEpilogueVectorLoop(), preparePlanForMainVectorLoop(), removeRedundantCanonicalIVs(), removeRedundantInductionCasts(), llvm::VPlanTransforms::truncateToMinimalBitwidths(), llvm::VPlanTransforms::tryAddExplicitVectorLength(), llvm::VPlanTransforms::unrollByUF(), llvm::VPInterleavedAccessInfo::VPInterleavedAccessInfo(), and willGenerateVectors().
const VPRegionBlock * VPlan::getVectorLoopRegion | ( | ) | const |
Definition at line 1055 of file VPlan.cpp.
References B, and llvm::vp_depth_first_shallow().
|
inline |
Returns the preheader of the vector loop region.
Definition at line 3848 of file VPlan.h.
References getVectorLoopRegion().
Referenced by addVPLaneMaskPhiAndUpdateExitBranch(), llvm::LoopVectorizationPlanner::executePlan(), llvm::VPTransformState::get(), licm(), and llvm::VPlanTransforms::truncateToMinimalBitwidths().
|
inline |
The vector trip count.
Definition at line 3902 of file VPlan.h.
Referenced by addCanonicalIVRecipes(), addScalarResumePhis(), createInitialVPlan(), and preparePlanForMainVectorLoop().
|
inline |
Returns the VF of the vector loop region.
Definition at line 3905 of file VPlan.h.
Referenced by createWidenInductionRecipes(), and transformRecipestoEVLRecipes().
|
inline |
Returns VF * UF of the vector loop region.
Definition at line 3908 of file VPlan.h.
Referenced by addCanonicalIVRecipes().
|
inline |
Definition at line 3919 of file VPlan.h.
References llvm::any_of(), and llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::isScalable().
Referenced by legalizeAndOptimizeInductions().
|
inline |
Definition at line 3929 of file VPlan.h.
References llvm::SetVector< T, Vector, Set, N >::size().
Referenced by sinkScalarOperands().
Definition at line 3931 of file VPlan.h.
References llvm::SetVector< T, Vector, Set, N >::contains(), and llvm::SetVector< T, Vector, Set, N >::empty().
Referenced by llvm::LoopVectorizationPlanner::executePlan(), llvm::VPlanTransforms::optimizeForVFAndUF(), and setUF().
|
inline |
Definition at line 3918 of file VPlan.h.
References llvm::SetVector< T, Vector, Set, N >::count().
Referenced by llvm::LoopVectorizationPlanner::executePlan(), llvm::LoopVectorizationPlanner::getPlanFor(), legalizeAndOptimizeInductions(), llvm::VPlanTransforms::optimizeForVFAndUF(), and setVF().
void VPlan::prepareToExecute | ( | Value * | TripCount, |
Value * | VectorTripCount, | ||
VPTransformState & | State | ||
) |
Prepare the plan for execution, setting up the required live-in values.
Definition at line 924 of file VPlan.cpp.
References assert(), llvm::VPTransformState::Builder, llvm::VPTransformState::CFG, llvm::IRBuilderBase::CreateMul(), llvm::createStepForVF(), llvm::IRBuilderBase::CreateSub(), llvm::getRuntimeVF(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), llvm::VPTransformState::CFGState::PrevBB, and llvm::VPTransformState::VF.
Referenced by llvm::LoopVectorizationPlanner::executePlan().
LLVM_DUMP_METHOD void VPlan::print | ( | raw_ostream & | O | ) | const |
Print this VPlan to O
.
Definition at line 1099 of file VPlan.cpp.
References llvm::Block, and getName().
Referenced by llvm::operator<<(), and llvm::LoopVectorizationPlanner::printPlans().
LLVM_DUMP_METHOD void VPlan::printDOT | ( | raw_ostream & | O | ) | const |
Print this VPlan in DOT format to O
.
Definition at line 1140 of file VPlan.cpp.
References llvm::Metadata::dump(), and Printer.
Referenced by llvm::LoopVectorizationPlanner::printPlans().
void VPlan::printLiveIns | ( | raw_ostream & | O | ) | const |
Print the live-ins of this VPlan to O
.
Definition at line 1063 of file VPlan.cpp.
References llvm::VPTransformState::VF.
Referenced by llvm::VPlanPrinter::dump().
|
inline |
Resets the trip count for the VPlan.
The caller must make sure all uses of the original trip count have been replaced.
Definition at line 3888 of file VPlan.h.
References assert(), and llvm::VPValue::getNumUsers().
Referenced by preparePlanForEpilogueVectorLoop().
|
inline |
Definition at line 3814 of file VPlan.h.
References llvm::VPBlockBase::setPlan().
Referenced by llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(), and VPlan().
Definition at line 3947 of file VPlan.h.
References Name, and llvm::Twine::str().
Referenced by llvm::VPlanHCFGBuilder::buildHierarchicalCFG().
|
inline |
Definition at line 3938 of file VPlan.h.
References assert(), llvm::SetVector< T, Vector, Set, N >::clear(), hasUF(), and llvm::SetVector< T, Vector, Set, N >::insert().
Referenced by llvm::VPlanTransforms::optimizeForVFAndUF(), llvm::VPlanTransforms::tryAddExplicitVectorLength(), and llvm::VPlanTransforms::unrollByUF().
|
inline |
Definition at line 3912 of file VPlan.h.
References assert(), llvm::SetVector< T, Vector, Set, N >::clear(), hasVF(), and llvm::SetVector< T, Vector, Set, N >::insert().
Referenced by llvm::VPlanTransforms::optimizeForVFAndUF().
|
inline |
Returns an iterator range over all VFs of the plan.
Definition at line 3925 of file VPlan.h.
References llvm::SetVector< T, Vector, Set, N >::begin(), and llvm::SetVector< T, Vector, Set, N >::end().
Referenced by llvm::LoopVectorizationPlanner::computeBestVF().
|
friend |
|
friend |