Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Public Types |Public Member Functions |Static Public Member Functions |Protected Member Functions |Friends |List of all members
llvm::LoopBase< BlockT, LoopT > Class Template Reference

Instances of this class are used to represent loops that are detected in the flow graph.More...

#include "llvm/Support/GenericLoopInfo.h"

Inheritance diagram for llvm::LoopBase< BlockT, LoopT >:
Inheritance graph
[legend]

Public Types

typedef std::vector< LoopT * >::const_iterator iterator
 
typedef std::vector< LoopT * >::const_reverse_iterator reverse_iterator
 
typedefArrayRef< BlockT * >::const_iterator block_iterator
 
typedef std::pair< BlockT *, BlockT * > Edge
 Edge type.
 

Public Member Functions

unsigned getLoopDepth ()const
 Return the nesting level of this loop.
 
BlockT * getHeader ()const
 
LoopT * getParentLoop ()const
 Return the parent loop if it exists or nullptr for top level loops.
 
const LoopT * getOutermostLoop ()const
 Get the outermost loop in which this loop is contained.
 
LoopT * getOutermostLoop ()
 
void setParentLoop (LoopT *L)
 This is a raw interface for bypassing addChildLoop.
 
bool contains (const LoopT *L)const
 Return true if the specified loop is contained within in this loop.
 
bool contains (const BlockT *BB)const
 Return true if the specified basic block is in this loop.
 
template<class InstT >
bool contains (const InstT *Inst)const
 Return true if the specified instruction is in this loop.
 
const std::vector< LoopT * > & getSubLoops ()const
 Return the loops contained entirely within this loop.
 
std::vector< LoopT * > & getSubLoopsVector ()
 
iterator begin ()const
 
iterator end ()const
 
reverse_iterator rbegin ()const
 
reverse_iterator rend ()const
 
bool isInnermost ()const
 Return true if the loop does not contain any (natural) loops.
 
bool isOutermost ()const
 Return true if the loop does not have a parent (natural) loop.
 
ArrayRef< BlockT * > getBlocks ()const
 Get a list of the basic blocks which make up this loop.
 
block_iterator block_begin ()const
 
block_iterator block_end ()const
 
iterator_range<block_iteratorblocks ()const
 
unsigned getNumBlocks ()const
 Get the number of blocks in this loop in constant time.
 
std::vector< BlockT * > & getBlocksVector ()
 Return a direct, mutable handle to the blocks vector so that we can mutate it efficiently with techniques likestd::remove.
 
SmallPtrSetImpl<const BlockT * > & getBlocksSet ()
 Return a direct, mutable handle to the blocks set so that we can mutate it efficiently.
 
constSmallPtrSetImpl<const BlockT * > & getBlocksSet ()const
 Return a direct, immutable handle to the blocks set.
 
bool isInvalid ()const
 Return true if this loop is no longer valid.
 
bool isLoopExiting (const BlockT *BB)const
 True if terminator in the block can branch to another block that is outside of the current loop.
 
bool isLoopLatch (const BlockT *BB)const
 
unsigned getNumBackEdges ()const
 Calculate the number of back edges to the loop header.
 
void getExitingBlocks (SmallVectorImpl< BlockT * > &ExitingBlocks)const
 Return all blocks inside the loop that have successors outside of the loop.
 
BlockT * getExitingBlock ()const
 If getExitingBlocks would return exactly one block, return that block.
 
void getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks)const
 Return all of the successor blocks of this loop.
 
BlockT * getExitBlock ()const
 If getExitBlocks would return exactly one block, return that block.
 
bool hasDedicatedExits ()const
 Return true if no exit block for the loop has a predecessor that is outside the loop.
 
void getUniqueExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks)const
 Return all unique successor blocks of this loop.
 
void getUniqueNonLatchExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks)const
 Return all unique successor blocks of this loop except successors from Latch block are not considered.
 
BlockT * getUniqueExitBlock ()const
 If getUniqueExitBlocks would return exactly one block, return that block.
 
BlockT * getUniqueLatchExitBlock ()const
 Return the unique exit block for the latch, or null if there are multiple different exit blocks or the latch is not exiting.
 
bool hasNoExitBlocks ()const
 Return true if this loop does not have any exit blocks.
 
void getExitEdges (SmallVectorImpl<Edge > &ExitEdges)const
 Return all pairs of (inside_block,outside_block).
 
BlockT * getLoopPreheader ()const
 If there is a preheader for this loop, return it.
 
BlockT * getLoopPredecessor ()const
 If the given loop's header has exactly one unique predecessor outside the loop, return it.
 
BlockT * getLoopLatch ()const
 If there is a single latch block for this loop, return it.
 
void getLoopLatches (SmallVectorImpl< BlockT * > &LoopLatches)const
 Return all loop latch blocks of this loop.
 
SmallVector<const LoopT *, 4 > getLoopsInPreorder ()const
 Return all loops in the loop nest rooted by the loop in preorder, with siblings in forward program order.
 
SmallVector< LoopT *, 4 > getLoopsInPreorder ()
 
void addBasicBlockToLoop (BlockT *NewBB,LoopInfoBase< BlockT, LoopT > &LI)
 This method is used by other analyses to update loop information.
 
void replaceChildLoopWith (LoopT *OldChild, LoopT *NewChild)
 This is used when splitting loops up.
 
void addChildLoop (LoopT *NewChild)
 Add the specified loop to be a child of this loop.
 
LoopT * removeChildLoop (iteratorI)
 This removes the specified child from being a subloop of this loop.
 
LoopT * removeChildLoop (LoopT *Child)
 This removes the specified child from being a subloop of this loop.
 
void addBlockEntry (BlockT *BB)
 This adds a basic block directly to the basic block list.
 
void reverseBlock (unsigned from)
 interface to reverse Blocks[from, end of loop] in this loop
 
void reserveBlocks (unsignedsize)
 interface to do reserve() for Blocks
 
void moveToHeader (BlockT *BB)
 This method is used to move BB (which must be part of this loop) to be the loop header of the loop (the block that dominates all others).
 
void removeBlockFromLoop (BlockT *BB)
 This removes the specified basic block from the current loop, updating the Blocks as appropriate.
 
void verifyLoop ()const
 Verify loop structure.
 
void verifyLoopNest (DenseSet<const LoopT * > *Loops)const
 Verify loop structure of this loop and all nested loops.
 
bool isAnnotatedParallel ()const
 Returns true if the loop is annotated parallel.
 
void print (raw_ostream &OS,boolVerbose=false,bool PrintNested=true,unsignedDepth=0)const
 Print loop with all the BBs inside it.
 

Static Public Member Functions

template<classType >
static void getInnerLoopsInPreorder (const LoopT &L,SmallVectorImpl<Type > &PreOrderLoops)
 Return all inner loops in the loop nest rooted by the loop in preorder, with siblings in forward program order.
 

Protected Member Functions

 LoopBase ()
 This creates an empty loop.
 
 LoopBase (BlockT *BB)
 
 ~LoopBase ()
 

Friends

class LoopInfoBase< BlockT, LoopT >
 

Detailed Description

template<class BlockT, class LoopT>
class llvm::LoopBase< BlockT, LoopT >

Instances of this class are used to represent loops that are detected in the flow graph.

Definition at line59 of fileGenericLoopInfo.h.

Member Typedef Documentation

◆ block_iterator

template<class BlockT , class LoopT >
typedefArrayRef<BlockT*>::const_iteratorllvm::LoopBase< BlockT, LoopT >::block_iterator

Definition at line177 of fileGenericLoopInfo.h.

◆ Edge

template<class BlockT , class LoopT >
typedef std::pair<BlockT *, BlockT *>llvm::LoopBase< BlockT, LoopT >::Edge

Edge type.

Definition at line305 of fileGenericLoopInfo.h.

◆ iterator

template<class BlockT , class LoopT >
typedef std::vector<LoopT*>::const_iteratorllvm::LoopBase< BlockT, LoopT >::iterator

Definition at line153 of fileGenericLoopInfo.h.

◆ reverse_iterator

template<class BlockT , class LoopT >
typedef std::vector<LoopT*>::const_reverse_iteratorllvm::LoopBase< BlockT, LoopT >::reverse_iterator

Definition at line155 of fileGenericLoopInfo.h.

Constructor & Destructor Documentation

◆ LoopBase()[1/2]

template<class BlockT , class LoopT >
llvm::LoopBase< BlockT, LoopT >::LoopBase()
inlineprotected

This creates an empty loop.

Definition at line485 of fileGenericLoopInfo.h.

◆ LoopBase()[2/2]

template<class BlockT , class LoopT >
llvm::LoopBase< BlockT, LoopT >::LoopBase(BlockT * BB)
inlineexplicitprotected

Definition at line487 of fileGenericLoopInfo.h.

ReferencesBlocks, andllvm::SmallPtrSetImpl< PtrType >::insert().

◆ ~LoopBase()

template<class BlockT , class LoopT >
llvm::LoopBase< BlockT, LoopT >::~LoopBase()
inlineprotected

Definition at line501 of fileGenericLoopInfo.h.

ReferencesBlocks, andllvm::SmallPtrSetImplBase::clear().

Member Function Documentation

◆ addBasicBlockToLoop()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::addBasicBlockToLoop(BlockT * NewBB,
LoopInfoBase< BlockT, LoopT > & LIB 
)

This method is used by other analyses to update loop information.

addBasicBlockToLoop - This method is used by other analyses to update loop information.

NewBB is set to be a new member of the current loop. Because of this, it is added as a member of all parent loops, and is added to the specifiedLoopInfo object as being in the current basic block. It is not valid to replace the loop header with this method.

Definition at line282 of fileGenericLoopInfoImpl.h.

Referencesassert().

Referenced byllvm::addClonedBlockToLoopInfo(),buildClonedLoops(),cloneLoopBlocks(),llvm::cloneLoopWithPreheader(),llvm::VPBasicBlock::execute(), andUpdateAnalysisInformation().

◆ addBlockEntry()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::addBlockEntry(BlockT * BB)
inline

This adds a basic block directly to the basic block list.

This should only be used by transformations that create new loops. Other transformations should use addBasicBlockToLoop.

Definition at line419 of fileGenericLoopInfo.h.

Referencesassert(),Blocks,llvm::SmallPtrSetImpl< PtrType >::insert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byseparateNestedLoop().

◆ addChildLoop()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::addChildLoop(LoopT * NewChild)
inline

Add the specified loop to be a child of this loop.

This updates the loop depth of the new child.

Definition at line391 of fileGenericLoopInfo.h.

Referencesassert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::addClonedBlockToLoopInfo(),buildClonedLoops(),cloneLoopNest(),llvm::cloneLoopWithPreheader(),llvm::TileInfo::CreateTiledLoops(),llvm::VPRegionBlock::execute(),hoistLoopToNewParent(),rebuildLoopAfterUnswitch(),separateNestedLoop(), andupdateLoopInfo().

◆ begin()

template<class BlockT , class LoopT >
iteratorllvm::LoopBase< BlockT, LoopT >::begin() const
inline

Definition at line156 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getSubLoops().

Referenced byllvm::LoopInfo::erase(),isLoopDead(),llvm::LoopBase< BlockT, LoopT >::removeChildLoop(),llvm::LoopFullUnrollPass::run(), andllvm::simplifyLoop().

◆ block_begin()

template<class BlockT , class LoopT >
block_iteratorllvm::LoopBase< BlockT, LoopT >::block_begin() const
inline

Definition at line178 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getBlocks().

Referenced byllvm::LoopBase< BlockT, LoopT >::blocks(),detectPopcountIdiom(),detectShiftUntilLessThanIdiom(),detectShiftUntilZeroIdiom(), andpartitionOuterLoopBlocks().

◆ block_end()

template<class BlockT , class LoopT >
block_iteratorllvm::LoopBase< BlockT, LoopT >::block_end() const
inline

Definition at line179 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getBlocks().

Referenced byllvm::LoopBase< BlockT, LoopT >::blocks(), andpartitionOuterLoopBlocks().

◆ blocks()

template<class BlockT , class LoopT >
iterator_range<block_iterator >llvm::LoopBase< BlockT, LoopT >::blocks() const
inline

Definition at line180 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::block_begin(),llvm::LoopBase< BlockT, LoopT >::block_end(),llvm::LoopBase< BlockT, LoopT >::isInvalid(), andllvm::make_range().

Referenced bybuildClonedLoops(),llvm::LoopVectorizationLegality::canFoldTailByMasking(),cloneLoopNest(),llvm::LoopVectorizationCostModel::collectElementTypesForWidening(),llvm::LoopVectorizationCostModel::collectInstsToScalarize(),llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(),llvm::ICFLoopSafetyInfo::computeLoopSafetyInfo(),containsDecreasingPointers(),llvm::LoopInfo::erase(),llvm::LoopVectorizationCostModel::expectedCost(),planContainsAdditionalSimplifications(),llvm::AArch64TTIImpl::preferPredicateOverEpilogue(),llvm::LoopVectorizationLegality::prepareToFoldTailByMasking(),llvm::LoopVectorizationCostModel::selectInterleaveCount(),llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(),llvm::LoopVectorizationCostModel::setVectorizedCallDecision(), andllvm::MemorySSA::verifyMemorySSA().

◆ contains()[1/3]

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::contains(const BlockT * BB) const
inline

Return true if the specified basic block is in this loop.

Definition at line134 of fileGenericLoopInfo.h.

Referencesassert(),llvm::SmallPtrSetImpl< PtrType >::count(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ contains()[2/3]

template<class BlockT , class LoopT >
template<class InstT >
boolllvm::LoopBase< BlockT, LoopT >::contains(const InstT * Inst) const
inline

Return true if the specified instruction is in this loop.

Definition at line140 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::contains().

◆ contains()[3/3]

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::contains(const LoopT * L) const
inline

Return true if the specified loop is contained within in this loop.

Definition at line124 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::contains(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::RecurrenceDescriptor::AddReductionVar(),llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(),llvm::LoopAccessInfo::blockNeedsPredication(),buildClonedLoops(),llvm::LoopVectorizationCostModel::calculateRegisterUsage(),llvm::LoopVectorizationLegality::canFoldTailByMasking(),CanProveNotTakenFirstIteration(),llvm::canSinkOrHoistInst(),collectCastInstrs(),llvm::collectChildrenInLoop(),collectTransitivePredecessors(),llvm::LoopVectorizationCostModel::collectValuesToIgnore(),ConnectProlog(),llvm::LoopBase< BlockT, LoopT >::contains(),llvm::VPRecipeBuilder::createBlockInMask(),llvm::ICFLoopSafetyInfo::doesNotWriteMemoryBefore(),llvm::ScalarEvolution::getAddRecExpr(),getInnermostLoopFor(),llvm::LoopVectorizationCostModel::getInstructionCost(),llvm::getLoopConvergenceHeart(),llvm::LoopBase< BlockT, LoopT >::getLoopLatches(),llvm::LoopBase< BlockT, LoopT >::getNumBackEdges(),getSingleSchedPred(),llvm::VPlanTransforms::handleUncountableEarlyExit(),llvm::hasOutsideLoopUser(),hoistLoopToNewParent(),inSubLoop(),llvm::RecurrenceDescriptor::isFixedOrderRecurrence(),isFoldableInLoop(),llvm::InductionDescriptor::isFPInductionPHI(),llvm::HardwareLoopInfo::isHardwareLoopCandidate(),llvm::LoopBase< BlockT, LoopT >::isLoopExiting(),llvm::LoopBase< BlockT, LoopT >::isLoopLatch(),isNotUsedOrFoldableInLoop(),llvm::isSafeToUnrollAndJam(),llvm::isUniformLoop(),llvm::LPPassManager::markLoopAsDeleted(),llvm::LPMUpdater::markLoopAsDeleted(),needToInsertPhisForLCSSA(),partitionLoopBlocks(),pointerInvalidatedByLoop(),llvm::promoteLoopAccessesToScalars(),rebuildLoopAfterUnswitch(),removeBlockFromLoops(),llvm::LoopInfo::replacementPreservesLCSSAForm(),llvm::LoopVectorizationCostModel::setCostBasedWideningDecision(),llvm::LoopVectorizationCostModel::shouldConsiderInvariant(),sink(),splitPredecessorsOfLoopExit(),llvm::UnrollAndJamLoop(),llvm::UnrollLoop(),unswitchNontrivialInvariants(),unswitchTrivialSwitch(),visitPointers(), andllvm::LoopBlocksTraversal::visitPreorder().

◆ end()

template<class BlockT , class LoopT >
iteratorllvm::LoopBase< BlockT, LoopT >::end() const
inline

Definition at line157 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getSubLoops().

Referenced byllvm::LoopInfo::erase(),isLoopDead(),llvm::LoopFullUnrollPass::run(), andllvm::simplifyLoop().

◆ getBlocks()

template<class BlockT , class LoopT >
ArrayRef< BlockT * >llvm::LoopBase< BlockT, LoopT >::getBlocks() const
inline

Get a list of the basic blocks which make up this loop.

Definition at line173 of fileGenericLoopInfo.h.

Referencesassert(),Blocks, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::LoopBase< BlockT, LoopT >::block_begin(),llvm::LoopBase< BlockT, LoopT >::block_end(),llvm::canSinkOrHoistInst(),llvm::cloneLoopWithPreheader(),llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(),computeUnrollAndJamCount(),llvm::LoopBase< BlockT, LoopT >::getHeader(),pointerInvalidatedByLoop(), andllvm::UnrollRuntimeLoopRemainder().

◆ getBlocksSet()[1/2]

template<class BlockT , class LoopT >
SmallPtrSetImpl<const BlockT * > &llvm::LoopBase< BlockT, LoopT >::getBlocksSet()
inline

Return a direct, mutable handle to the blocks set so that we can mutate it efficiently.

Definition at line200 of fileGenericLoopInfo.h.

Referencesassert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ getBlocksSet()[2/2]

template<class BlockT , class LoopT >
constSmallPtrSetImpl<const BlockT * > &llvm::LoopBase< BlockT, LoopT >::getBlocksSet() const
inline

Return a direct, immutable handle to the blocks set.

Definition at line206 of fileGenericLoopInfo.h.

Referencesassert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ getBlocksVector()

template<class BlockT , class LoopT >
std::vector< BlockT * > &llvm::LoopBase< BlockT, LoopT >::getBlocksVector()
inline

Return a direct, mutable handle to the blocks vector so that we can mutate it efficiently with techniques likestd::remove.

Definition at line194 of fileGenericLoopInfo.h.

Referencesassert(),Blocks, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ getExitBlock()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getExitBlock

If getExitBlocks would return exactly one block, return that block.

getExitBlock - If getExitBlocks would return exactly one block, return that block.

Otherwise return null.

Definition at line107 of fileGenericLoopInfoImpl.h.

Referencesllvm::getExitBlockHelper().

Referenced bycheckLoopsStructure(),llvm::ModuloScheduleExpanderMVE::expand(),llvm::LoopNest::getInterveningInstructions(),llvm::splitLoopBound(),llvm::UnrollAndJamLoop(), andllvm::LoopVersioning::versionLoop().

◆ getExitBlocks()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::getExitBlocks(SmallVectorImpl< BlockT * > & ExitBlocks) const

Return all of the successor blocks of this loop.

getExitBlocks - Return all of the successor blocks of this loop.

These are the blocksoutside of the current loop which are branched to.

Definition at line64 of fileGenericLoopInfoImpl.h.

Referencesassert(),blocks,contains(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced byllvm::InnerLoopVectorizer::fixVectorizedLoop().

◆ getExitEdges()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::getExitEdges(SmallVectorImpl<Edge > & ExitEdges) const

Return all pairs of (inside_block,outside_block).

getExitEdges - Return all pairs of (inside_block,outside_block).

Definition at line175 of fileGenericLoopInfoImpl.h.

Referencesassert(),blocks,contains(), andllvm::SmallVectorImpl< T >::emplace_back().

◆ getExitingBlock()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getExitingBlock

If getExitingBlocks would return exactly one block, return that block.

getExitingBlock - If getExitingBlocks would return exactly one block, return that block.

Otherwise return null.

Definition at line48 of fileGenericLoopInfoImpl.h.

Referencesllvm::any_of(),assert(),blocks,contains(), andisExitBlock().

Referenced byllvm::LoopVectorizationLegality::canVectorize(),checkLoopsStructure(),llvm::LoopVectorizationCostModel::computeMaxVF(),llvm::LoopVectorizationCostModel::requiresScalarEpilogue(),llvm::splitLoopBound(), andllvm::UnrollAndJamLoop().

◆ getExitingBlocks()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::getExitingBlocks(SmallVectorImpl< BlockT * > & ExitingBlocks) const

Return all blocks inside the loop that have successors outside of the loop.

getExitingBlocks - Return all blocks inside the loop that have successors outside of the loop.

These are the blocksinside of the current loop which branch out. The returned list is always unique.

Definition at line33 of fileGenericLoopInfoImpl.h.

Referencesassert(),blocks,contains(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced byllvm::HardwareLoopInfo::isHardwareLoopCandidate().

◆ getHeader()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getHeader() const
inline

Definition at line90 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getBlocks().

Referenced byllvm::addClonedBlockToLoopInfo(),llvm::BlockFrequencyInfoImplBase::addLoopSuccessorsToDist(),llvm::RecurrenceDescriptor::AddReductionVar(),llvm::addStringMetadataToLoop(),llvm::LoopSafetyInfo::allLoopPathsLeadToBlock(),llvm::LoopVersioning::annotateInstWithNoAlias(),llvm::LoopBlocksTraversal::begin(),buildClonedLoops(),CanProveNotTakenFirstIteration(),llvm::LoopVectorizationLegality::canVectorize(),checkLoopsStructure(),llvm::cloneLoopWithPreheader(),collectTransitivePredecessors(),llvm::LoopVectorizationCostModel::collectValuesToIgnore(),CompareSCEVComplexity(),llvm::LoopSafetyInfo::computeBlockColors(),llvm::SimpleLoopSafetyInfo::computeLoopSafetyInfo(),llvm::VPRecipeBuilder::createBlockInMask(),llvm::VPRecipeBuilder::createHeaderMask(),createStringMetadata(),llvm::VPRecipeBuilder::createSwitchEdgeMasks(),detectShiftUntilBitTestIdiom(),detectShiftUntilZeroIdiom(),llvm::ICFLoopSafetyInfo::doesNotWriteMemoryBefore(),emitBasicBlockLoopComments(),llvm::InnerLoopVectorizer::emitMemRuntimeChecks(),llvm::LoopVectorizeHints::emitRemarkWithHints(),llvm::LoopBlocksTraversal::end(),llvm::SystemZPostRASchedStrategy::enterMBB(),llvm::VPReductionPHIRecipe::execute(),llvm::LoopVectorizationPlanner::executePlan(),llvm::ScalarEvolution::getAddExpr(),llvm::ScalarEvolution::getAddRecExpr(),llvm::LoopVectorizationCostModel::getInstructionCost(),llvm::LoopNest::getInterveningInstructions(),llvm::getLoopConvergenceHeart(),llvm::LoopBase< BlockT, LoopT >::getLoopLatches(),llvm::BlockFrequencyInfoImplBase::getLoopName(),llvm::LoopBase< BlockT, LoopT >::getNumBackEdges(),llvm::getPtrStride(),getSingleSchedPred(),llvm::getStartAndEndForAccess(),llvm::HardwareLoopInfo::HardwareLoopInfo(),llvm::InnerLoopVectorizer::InnerLoopVectorizer(),llvm::ScalarEvolution::isBasicBlockEntryGuardedByCond(),llvm::LoopVectorizationLegality::isConsecutivePtr(),isExistingPhi(),isExplicitVecOuterLoop(),llvm::RecurrenceDescriptor::isFixedOrderRecurrence(),llvm::InductionDescriptor::isFPInductionPHI(),llvm::SimpleLoopSafetyInfo::isGuaranteedToExecute(),llvm::HardwareLoopInfo::isHardwareLoopCandidate(),llvm::InductionDescriptor::isInductionPHI(),llvm::ScalarEvolution::isKnownViaInduction(),isLoadInvariantInLoop(),llvm::LoopBase< BlockT, LoopT >::isLoopLatch(),llvm::RecurrenceDescriptor::isReductionPHI(),llvm::LoopVectorizationPlanner::plan(),pointerInvalidatedByLoop(),llvm::LoopVersioning::prepareNoAliasMetadata(),llvm::MemorySSA::print(),llvm::SCEV::print(),llvm::IVUsers::print(),llvm::EpilogueVectorizerMainLoop::printDebugTracesAtEnd(),llvm::EpilogueVectorizerEpilogueLoop::printDebugTracesAtEnd(),PrintParentLoopComment(),removeBlockFromLoops(),llvm::reportVectorization(),llvm::LPPassManager::runOnFunction(),llvm::SwingSchedulerDAG::schedule(),llvm::LoopVectorizationPlanner::selectEpilogueVectorizationFactor(),llvm::LoopVectorizeHints::setAlreadyVectorized(),llvm::LoopVectorizationCostModel::shouldConsiderInvariant(),llvm::splitLoopBound(),llvm::VPRecipeBuilder::tryToCreateWidenRecipe(),llvm::UnrollAndJamLoop(),updateLoopInfo(),llvm::MachineTraceMetrics::Ensemble::verify(),llvm::LoopVersioning::versionLoop(), andvisitPointers().

◆ getInnerLoopsInPreorder()

template<class BlockT , class LoopT >
template<classType >
static voidllvm::LoopBase< BlockT, LoopT >::getInnerLoopsInPreorder(const LoopT & L,
SmallVectorImpl<Type > & PreOrderLoops 
)
inlinestatic

Return all inner loops in the loop nest rooted by the loop in preorder, with siblings in forward program order.

Definition at line341 of fileGenericLoopInfo.h.

Referencesllvm::SmallVectorImpl< T >::append(),llvm::SmallVectorBase< Size_T >::empty(),llvm::SmallVectorImpl< T >::pop_back_val(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced byllvm::LoopBase< BlockT, LoopT >::getLoopsInPreorder().

◆ getLoopDepth()

template<class BlockT , class LoopT >
unsignedllvm::LoopBase< BlockT, LoopT >::getLoopDepth() const
inline

Return the nesting level of this loop.

An outer-most loop has depth 1, for consistency with loop depth values used for basic blocks, where depth 0 is used for blocks not inside any loops.

Definition at line82 of fileGenericLoopInfo.h.

Referencesassert(),D, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced bycheckDependencies(),doesContainLoop(),emitBasicBlockLoopComments(),llvm::ScalarEvolution::getAddRecExpr(),llvm::LoopNest::getInnermostLoop(),getInnerMostLoop(),getInnermostLoopFor(),PrintParentLoopComment(),llvm::LoopVectorizationCostModel::selectInterleaveCount(), andUpdateAnalysisInformation().

◆ getLoopLatch()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getLoopLatch

If there is a single latch block for this loop, return it.

getLoopLatch - If there is a single latch block for this loop, return it.

A latch block is a block that contains a branch back to the header.

Definition at line256 of fileGenericLoopInfoImpl.h.

Referencesassert(), andcontains().

Referenced byareInnerLoopLatchPHIsSupported(),areOuterLoopExitPHIsSupported(),llvm::LoopVectorizationLegality::blockNeedsPredication(),llvm::LoopAccessInfo::blockNeedsPredication(),checkLoopsStructure(),collectUsersInExitBlocks(),llvm::LoopVectorizationCostModel::computeMaxVF(),llvm::VPlan::createInitialVPlan(),llvm::InnerLoopVectorizer::emitIterationCountCheck(),llvm::EpilogueVectorizerMainLoop::emitIterationCountCheck(),llvm::EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(),llvm::LoopVectorizationPlanner::executePlan(),expandBounds(),llvm::VPRecipeBuilder::fixHeaderPhis(),llvm::LoopVectorizationCostModel::getInstructionCost(),llvm::LoopNest::getInterveningInstructions(),getOuterLoopLatchCmp(),getReductionInstr(),llvm::VPlanTransforms::handleUncountableEarlyExit(),llvm::hasIterationCountInvariantInParent(),llvm::RecurrenceDescriptor::isFixedOrderRecurrence(),llvm::InductionDescriptor::isInductionPHI(),llvm::isUniformLoop(),partitionLoopBlocks(),llvm::LoopVectorizationCostModel::requiresScalarEpilogue(),SplitBlockPredecessorsImpl(),tryToUnrollAndJamLoop(),llvm::UnrollAndJamLoop(), andllvm::UnrollRuntimeLoopRemainder().

◆ getLoopLatches()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::getLoopLatches(SmallVectorImpl< BlockT * > & LoopLatches) const
inline

Return all loop latch blocks of this loop.

A latch block is a block that contains a branch back to the header.

Definition at line330 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::contains(),llvm::LoopBase< BlockT, LoopT >::getHeader(),H,llvm::LoopBase< BlockT, LoopT >::isInvalid(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

◆ getLoopPredecessor()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getLoopPredecessor

If the given loop's header has exactly one unique predecessor outside the loop, return it.

getLoopPredecessor - If the given loop's header has exactly one unique predecessor outside the loop, return it.

Otherwise return null. This is less strict that the loop "preheader" concept, which requires the predecessor to have exactly one successor.

Definition at line235 of fileGenericLoopInfoImpl.h.

Referencesassert(), andcontains().

Referenced byllvm::ScalarEvolution::isBasicBlockEntryGuardedByCond().

◆ getLoopPreheader()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getLoopPreheader

If there is a preheader for this loop, return it.

getLoopPreheader - If there is a preheader for this loop, return it.

A loop has a preheader if there is only one edge to the header of the loop from outside of the loop. If this is the case, the block branching to the header of the loop is the preheader node.

This method returns null if there is no preheader for the loop.

A loop has a preheader if there is only one edge to the header of the loop from outside of the loop and it is legal to hoist instructions into the predecessor. If this is the case, the block branching to the header of the loop is the preheader node.

This method returns null if there is no preheader for the loop.

Definition at line210 of fileGenericLoopInfoImpl.h.

Referencesassert(),llvm::hasSingleElement(), andllvm::detail::isLegalToHoistInto().

Referenced byllvm::RecurrenceDescriptor::AddReductionVar(),buildClonedLoops(),CanProveNotTakenFirstIteration(),checkLoopsStructure(),llvm::cloneLoopWithPreheader(),llvm::InnerLoopVectorizer::createVectorLoopSkeleton(),createWidenInductionRecipes(),detectPopcountIdiom(),detectShiftUntilBitTestIdiom(),detectShiftUntilLessThanIdiom(),detectShiftUntilZeroIdiom(),llvm::LoopVectorizationPlanner::executePlan(),llvm::PeelingModuloScheduleExpander::expand(),llvm::ModuloScheduleExpanderMVE::expand(),llvm::LoopNest::getInterveningInstructions(),llvm::hoistRegion(),llvm::RecurrenceDescriptor::isFixedOrderRecurrence(),llvm::InductionDescriptor::isInductionPHI(),partitionLoopBlocks(),llvm::promoteLoopAccessesToScalars(),llvm::LoopConstrainer::run(),llvm::splitLoopBound(),llvm::VPRecipeBuilder::tryToCreateWidenRecipe(),llvm::UnrollAndJamLoop(),llvm::PeelingModuloScheduleExpander::validateAgainstModuloScheduleExpander(), andllvm::LoopVersioning::versionLoop().

◆ getLoopsInPreorder()[1/2]

template<class BlockT , class LoopT >
SmallVector< LoopT *, 4 >llvm::LoopBase< BlockT, LoopT >::getLoopsInPreorder()
inline

Definition at line364 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getInnerLoopsInPreorder(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

◆ getLoopsInPreorder()[2/2]

template<class BlockT , class LoopT >
SmallVector<const LoopT *, 4 >llvm::LoopBase< BlockT, LoopT >::getLoopsInPreorder() const
inline

Return all loops in the loop nest rooted by the loop in preorder, with siblings in forward program order.

Definition at line357 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getInnerLoopsInPreorder(), andllvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced bycheckDependencies(),llvm::cloneLoopWithPreheader(), andpartitionOuterLoopBlocks().

◆ getNumBackEdges()

template<class BlockT , class LoopT >
unsignedllvm::LoopBase< BlockT, LoopT >::getNumBackEdges() const
inline

Calculate the number of back edges to the loop header.

Definition at line248 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::contains(),llvm::count_if(),llvm::LoopBase< BlockT, LoopT >::getHeader(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced bydetectShiftUntilBitTestIdiom(), anddetectShiftUntilZeroIdiom().

◆ getNumBlocks()

template<class BlockT , class LoopT >
unsignedllvm::LoopBase< BlockT, LoopT >::getNumBlocks() const
inline

Get the number of blocks in this loop in constant time.

Invalidate the loop, indicating that it is no longer a loop.

Definition at line187 of fileGenericLoopInfo.h.

Referencesassert(),Blocks, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::LoopBlocksTraversal::begin(),llvm::LoopVectorizationLegality::canVectorize(),cloneLoopNest(),detectShiftUntilBitTestIdiom(),detectShiftUntilZeroIdiom(), andllvm::LoopBlocksDFS::LoopBlocksDFS().

◆ getOutermostLoop()[1/2]

template<class BlockT , class LoopT >
LoopT *llvm::LoopBase< BlockT, LoopT >::getOutermostLoop()
inline

Definition at line110 of fileGenericLoopInfo.h.

◆ getOutermostLoop()[2/2]

template<class BlockT , class LoopT >
const LoopT *llvm::LoopBase< BlockT, LoopT >::getOutermostLoop() const
inline

Get the outermost loop in which this loop is contained.

This may be the loop itself, if it already is the outermost loop.

Definition at line103 of fileGenericLoopInfo.h.

◆ getParentLoop()

template<class BlockT , class LoopT >
LoopT *llvm::LoopBase< BlockT, LoopT >::getParentLoop() const
inline

Return the parent loop if it exists or nullptr for top level loops.

A loop is either top-level in a function (that is, it is not contained in any other loop) or it is entirely enclosed in some other loop. If a loop is top-level, it has no parent, otherwise its parent is the innermost loop in which it is enclosed.

Definition at line99 of fileGenericLoopInfo.h.

Referenced byllvm::addClonedBlockToLoopInfo(),buildClonedLoops(),checkLoopsStructure(),llvm::cloneLoopWithPreheader(),emitBasicBlockLoopComments(),llvm::LoopInfo::erase(),llvm::LoopVectorizationPlanner::executePlan(),expandBounds(),getInnerMostLoop(),getInnermostLoopFor(),getTopMostExitingLoop(),llvm::hasIterationCountInvariantInParent(),hoistLoopToNewParent(),llvm::LoopBase< BlockT, LoopT >::isOutermost(),PrintParentLoopComment(),rebuildLoopAfterUnswitch(),removeBlockFromLoops(),llvm::LoopConstrainer::run(),llvm::LoopFlattenPass::run(),llvm::PassManager< Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & >::runWithLoopNestPasses(),llvm::UnrollAndJamLoop(),llvm::UnrollLoop(),unswitchNontrivialInvariants(),UpdateAnalysisInformation(), andupdateLoopInfo().

◆ getSubLoops()

template<class BlockT , class LoopT >
const std::vector< LoopT * > &llvm::LoopBase< BlockT, LoopT >::getSubLoops() const
inline

Return the loops contained entirely within this loop.

Definition at line145 of fileGenericLoopInfo.h.

Referencesassert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byareInnerLoopLatchPHIsSupported(),llvm::LoopBase< BlockT, LoopT >::begin(),checkLoopsStructure(),llvm::LoopBase< BlockT, LoopT >::end(),llvm::LoopNest::getMaxPerfectDepth(),isEligibleLoopForm(),llvm::LoopBase< BlockT, LoopT >::isInnermost(),populateWorklist(),llvm::LoopBase< BlockT, LoopT >::rbegin(), andllvm::LoopBase< BlockT, LoopT >::rend().

◆ getSubLoopsVector()

template<class BlockT , class LoopT >
std::vector< LoopT * > &llvm::LoopBase< BlockT, LoopT >::getSubLoopsVector()
inline

Definition at line149 of fileGenericLoopInfo.h.

Referencesassert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ getUniqueExitBlock()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getUniqueExitBlock

If getUniqueExitBlocks would return exactly one block, return that block.

Otherwise return null.

Definition at line158 of fileGenericLoopInfoImpl.h.

Referencesllvm::getExitBlockHelper().

Referenced byareInnerLoopExitPHIsSupported(),areOuterLoopExitPHIsSupported(),llvm::VPlanTransforms::handleUncountableEarlyExit(), andllvm::LoopVersioning::versionLoop().

◆ getUniqueExitBlocks()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::getUniqueExitBlocks(SmallVectorImpl< BlockT * > & ExitBlocks) const

Return all unique successor blocks of this loop.

These are the blocksoutside of the current loop which are branched to.

Definition at line142 of fileGenericLoopInfoImpl.h.

Referencesllvm::getUniqueExitBlocksHelper().

Referenced bysink(), andsplitPredecessorsOfLoopExit().

◆ getUniqueLatchExitBlock()

template<class BlockT , class LoopT >
BlockT *llvm::LoopBase< BlockT, LoopT >::getUniqueLatchExitBlock

Return the unique exit block for the latch, or null if there are multiple different exit blocks or the latch is not exiting.

Definition at line163 of fileGenericLoopInfoImpl.h.

Referencesassert(), andcontains().

Referenced byllvm::VPlan::createInitialVPlan(), andllvm::InnerLoopVectorizer::createVectorLoopSkeleton().

◆ getUniqueNonLatchExitBlocks()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::getUniqueNonLatchExitBlocks(SmallVectorImpl< BlockT * > & ExitBlocks) const

Return all unique successor blocks of this loop except successors from Latch block are not considered.

If the exit comes from Latch has also non Latch predecessor in a loop it will be added to ExitBlocks. These are the blocksoutside of the current loop which are branched to.

Definition at line149 of fileGenericLoopInfoImpl.h.

Referencesassert(), andllvm::getUniqueExitBlocksHelper().

◆ hasDedicatedExits()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::hasDedicatedExits

Return true if no exit block for the loop has a predecessor that is outside the loop.

Definition at line112 of fileGenericLoopInfoImpl.h.

Referencescontains().

◆ hasNoExitBlocks()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::hasNoExitBlocks

Return true if this loop does not have any exit blocks.

Definition at line95 of fileGenericLoopInfoImpl.h.

Referencesllvm::getExitBlockHelper().

◆ isAnnotatedParallel()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::isAnnotatedParallel() const
inline

Returns true if the loop is annotated parallel.

Derived classes can override this method using static template polymorphism.

Definition at line475 of fileGenericLoopInfo.h.

◆ isInnermost()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::isInnermost() const
inline

Return true if the loop does not contain any (natural) loops.

Definition at line167 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getSubLoops().

Referenced byllvm::LoopVectorizationLegality::canVectorize(),cloneLoopNest(),emitBasicBlockLoopComments(),llvm::LoopInfo::erase(),llvm::LoopVectorizationCostModel::getWideningDecision(),isExplicitVecOuterLoop(),llvm::LoopVectorizationCostModel::isProfitableToScalarize(),llvm::LoopVectorizationCostModel::isScalarAfterVectorization(),llvm::LoopVectorizationCostModel::isUniformAfterVectorization(),llvm::LoopVectorizationPlanner::plan(),llvm::LoopVectorizationPlanner::planInVPlanNativePath(), andllvm::reportVectorization().

◆ isInvalid()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::isInvalid() const
inline

Return true if this loop is no longer valid.

The only valid use of this helper is "assert(L.isInvalid())" or equivalent, since IsInvalid is set to true by the destructor. In other words, if this accessor returns true, the caller has already triggered UB by calling this accessor; and so it can only be called in a context where a return value of true indicates a programmer error.

Definition at line217 of fileGenericLoopInfo.h.

Referenced byllvm::LoopBase< BlockT, LoopT >::addBlockEntry(),llvm::LoopBase< BlockT, LoopT >::addChildLoop(),llvm::LoopBase< BlockT, LoopT >::blocks(),llvm::LoopBase< BlockT, LoopT >::contains(),llvm::LoopInfo::erase(),llvm::LoopBase< BlockT, LoopT >::getBlocks(),llvm::LoopBase< BlockT, LoopT >::getBlocksSet(),llvm::LoopBase< BlockT, LoopT >::getBlocksVector(),llvm::LoopBase< BlockT, LoopT >::getLoopDepth(),llvm::LoopBase< BlockT, LoopT >::getLoopLatches(),llvm::LoopBase< BlockT, LoopT >::getNumBackEdges(),llvm::LoopBase< BlockT, LoopT >::getNumBlocks(),llvm::LoopBase< BlockT, LoopT >::getSubLoops(),llvm::LoopBase< BlockT, LoopT >::getSubLoopsVector(),llvm::LoopBase< BlockT, LoopT >::isLoopExiting(),llvm::LoopBase< BlockT, LoopT >::isLoopLatch(),llvm::LoopBase< BlockT, LoopT >::moveToHeader(),llvm::LoopBase< BlockT, LoopT >::removeBlockFromLoop(),llvm::LoopBase< BlockT, LoopT >::removeChildLoop(),llvm::LoopBase< BlockT, LoopT >::reserveBlocks(),llvm::LoopBase< BlockT, LoopT >::reverseBlock(), andllvm::LoopBase< BlockT, LoopT >::setParentLoop().

◆ isLoopExiting()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::isLoopExiting(const BlockT * BB) const
inline

True if terminator in the block can branch to another block that is outside of the current loop.

BB must be inside the loop.

Definition at line227 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::contains(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::VPRecipeBuilder::createEdgeMask(),llvm::VPRecipeBuilder::createSwitchEdgeMasks(),getTopMostExitingLoop(), andllvm::VirtRegAuxInfo::weightCalcHelper().

◆ isLoopLatch()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::isLoopLatch(const BlockT * BB) const
inline

Definition at line241 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::contains(),llvm::LoopBase< BlockT, LoopT >::getHeader(),llvm::is_contained(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::HardwareLoopInfo::isHardwareLoopCandidate().

◆ isOutermost()

template<class BlockT , class LoopT >
boolllvm::LoopBase< BlockT, LoopT >::isOutermost() const
inline

Return true if the loop does not have a parent (natural) loop.

Definition at line170 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getParentLoop().

Referenced byllvm::LoopInfo::erase(), andllvm::CacheCost::getCacheCost().

◆ moveToHeader()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::moveToHeader(BlockT * BB)
inline

This method is used to move BB (which must be part of this loop) to be the loop header of the loop (the block that dominates all others).

Definition at line439 of fileGenericLoopInfo.h.

Referencesassert(),Blocks, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ print()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::print(raw_ostreamOS,
bool Verbose =false,
bool PrintNested =true,
unsigned Depth =0 
) const

Print loop with all the BBs inside it.

Definition at line414 of fileGenericLoopInfoImpl.h.

Referencesllvm::Depth,E,H,I,llvm::raw_ostream::indent(),OS, andllvm::Verbose.

Referenced byllvm::operator<<(), andupdateLoopInfo().

◆ rbegin()

template<class BlockT , class LoopT >
reverse_iteratorllvm::LoopBase< BlockT, LoopT >::rbegin() const
inline

Definition at line158 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getSubLoops().

◆ removeBlockFromLoop()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::removeBlockFromLoop(BlockT * BB)
inline

This removes the specified basic block from the current loop, updating the Blocks as appropriate.

This does not update the mapping in theLoopInfo class.

Definition at line456 of fileGenericLoopInfo.h.

Referencesassert(),Blocks,llvm::SmallPtrSetImpl< PtrType >::erase(),llvm::find(),I, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ removeChildLoop()[1/2]

template<class BlockT , class LoopT >
LoopT *llvm::LoopBase< BlockT, LoopT >::removeChildLoop(iterator I)
inline

This removes the specified child from being a subloop of this loop.

The loop is not deleted, as it will presumably be inserted into another loop.

Definition at line400 of fileGenericLoopInfo.h.

Referencesassert(),llvm::LoopBase< BlockT, LoopT >::begin(),I, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

Referenced byllvm::LoopInfo::erase(),hoistLoopToNewParent(),rebuildLoopAfterUnswitch(), andllvm::LoopBase< BlockT, LoopT >::removeChildLoop().

◆ removeChildLoop()[2/2]

template<class BlockT , class LoopT >
LoopT *llvm::LoopBase< BlockT, LoopT >::removeChildLoop(LoopT * Child)
inline

This removes the specified child from being a subloop of this loop.

The loop is not deleted, as it will presumably be inserted into another loop.

Definition at line412 of fileGenericLoopInfo.h.

Referencesllvm::find(), andllvm::LoopBase< BlockT, LoopT >::removeChildLoop().

◆ rend()

template<class BlockT , class LoopT >
reverse_iteratorllvm::LoopBase< BlockT, LoopT >::rend() const
inline

Definition at line159 of fileGenericLoopInfo.h.

Referencesllvm::LoopBase< BlockT, LoopT >::getSubLoops().

◆ replaceChildLoopWith()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::replaceChildLoopWith(LoopT * OldChild,
LoopT * NewChild 
)

This is used when splitting loops up.

replaceChildLoopWith - This is used when splitting loops up.

It replaces the OldChild entry in our children list with NewChild, and updates the parent pointer of OldChild to be null and the NewChild to be this loop. This updates the loop depth of the new child.

Definition at line312 of fileGenericLoopInfoImpl.h.

Referencesassert().

Referenced byseparateNestedLoop().

◆ reserveBlocks()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::reserveBlocks(unsigned size)
inline

interface to do reserve() for Blocks

Definition at line432 of fileGenericLoopInfo.h.

Referencesassert(),Blocks,llvm::LoopBase< BlockT, LoopT >::isInvalid(), andllvm::size().

Referenced bybuildClonedLoops().

◆ reverseBlock()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::reverseBlock(unsigned from)
inline

interface to reverse Blocks[from, end of loop] in this loop

Definition at line426 of fileGenericLoopInfo.h.

Referencesassert(),Blocks, andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ setParentLoop()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::setParentLoop(LoopT * L)
inline

This is a raw interface for bypassing addChildLoop.

Definition at line118 of fileGenericLoopInfo.h.

Referencesassert(), andllvm::LoopBase< BlockT, LoopT >::isInvalid().

◆ verifyLoop()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::verifyLoop

Verify loop structure.

verifyLoop - Verify loop structure

Definition at line326 of fileGenericLoopInfoImpl.h.

Referenced byllvm::LoopUnrollPass::run(),llvm::LoopFullUnrollPass::run(),llvm::LPPassManager::runOnFunction(), andupdateLoopInfo().

◆ verifyLoopNest()

template<class BlockT , class LoopT >
voidllvm::LoopBase< BlockT, LoopT >::verifyLoopNest(DenseSet<const LoopT * > * Loops) const

Verify loop structure of this loop and all nested loops.

verifyLoop - Verify loop structure of this loop and all nested loops.

Definition at line402 of fileGenericLoopInfoImpl.h.

Referencesassert(),E,I, andLoops.

Friends And Related Function Documentation

◆ LoopInfoBase< BlockT, LoopT >

template<class BlockT , class LoopT >
friend classLoopInfoBase< BlockT, LoopT >
friend

Definition at line478 of fileGenericLoopInfo.h.


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

Generated on Sun Jul 20 2025 19:09:39 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp