|
LLVM
4.0.0
|
Instances of this class are used to represent loops that are detected in the flow graph. More...
#include <LoopInfo.h>
Public Types | |
| typedef std::vector< LoopT * > ::const_iterator | iterator |
| typedef std::vector< LoopT * > ::const_reverse_iterator | reverse_iterator |
| typedef std::vector< BlockT * > ::const_iterator | block_iterator |
| typedef std::pair< const BlockT *, const BlockT * > | Edge |
| Edge type. More... | |
Public Member Functions | |
| LoopBase () | |
| This creates an empty loop. More... | |
| ~LoopBase () | |
| unsigned | getLoopDepth () const |
| Return the nesting level of this loop. More... | |
| BlockT * | getHeader () const |
| LoopT * | getParentLoop () const |
| void | setParentLoop (LoopT *L) |
| This is a raw interface for bypassing addChildLoop. More... | |
| bool | contains (const LoopT *L) const |
| Return true if the specified loop is contained within in this loop. More... | |
| bool | contains (const BlockT *BB) const |
| Return true if the specified basic block is in this loop. More... | |
| template<class InstT > | |
| bool | contains (const InstT *Inst) const |
| Return true if the specified instruction is in this loop. More... | |
| const std::vector< LoopT * > & | getSubLoops () const |
| Return the loops contained entirely within this loop. More... | |
| std::vector< LoopT * > & | getSubLoopsVector () |
| iterator | begin () const |
| iterator | end () const |
| reverse_iterator | rbegin () const |
| reverse_iterator | rend () const |
| bool | empty () const |
| const std::vector< BlockT * > & | getBlocks () const |
| Get a list of the basic blocks which make up this loop. More... | |
| block_iterator | block_begin () const |
| block_iterator | block_end () const |
| iterator_range< block_iterator > | blocks () const |
| unsigned | getNumBlocks () const |
| Get the number of blocks in this loop in constant time. More... | |
| void | invalidate () |
| Invalidate the loop, indicating that it is no longer a loop. More... | |
| bool | isInvalid () |
| Return true if this loop is no longer valid. More... | |
| bool | isLoopExiting (const BlockT *BB) const |
| True if terminator in the block can branch to another block that is outside of the current loop. More... | |
| bool | isLoopLatch (const BlockT *BB) const |
| unsigned | getNumBackEdges () const |
| Calculate the number of back edges to the loop header. More... | |
| void | getExitingBlocks (SmallVectorImpl< BlockT * > &ExitingBlocks) const |
| Return all blocks inside the loop that have successors outside of the loop. More... | |
| BlockT * | getExitingBlock () const |
| If getExitingBlocks would return exactly one block, return that block. More... | |
| void | getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const |
| Return all of the successor blocks of this loop. More... | |
| BlockT * | getExitBlock () const |
| If getExitBlocks would return exactly one block, return that block. More... | |
| void | getExitEdges (SmallVectorImpl< Edge > &ExitEdges) const |
| Return all pairs of (inside_block,outside_block). More... | |
| BlockT * | getLoopPreheader () const |
| If there is a preheader for this loop, return it. More... | |
| BlockT * | getLoopPredecessor () const |
| If the given loop's header has exactly one unique predecessor outside the loop, return it. More... | |
| BlockT * | getLoopLatch () const |
| If there is a single latch block for this loop, return it. More... | |
| void | getLoopLatches (SmallVectorImpl< BlockT * > &LoopLatches) const |
| Return all loop latch blocks of this loop. More... | |
| void | addBasicBlockToLoop (BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI) |
| This method is used by other analyses to update loop information. More... | |
| void | replaceChildLoopWith (LoopT *OldChild, LoopT *NewChild) |
| This is used when splitting loops up. More... | |
| void | addChildLoop (LoopT *NewChild) |
| Add the specified loop to be a child of this loop. More... | |
| LoopT * | removeChildLoop (iterator I) |
| This removes the specified child from being a subloop of this loop. More... | |
| void | addBlockEntry (BlockT *BB) |
| This adds a basic block directly to the basic block list. More... | |
| void | reverseBlock (unsigned from) |
| interface to reverse Blocks[from, end of loop] in this loop More... | |
| void | reserveBlocks (unsigned size) |
| interface to do reserve() for Blocks More... | |
| 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). More... | |
| void | removeBlockFromLoop (BlockT *BB) |
| This removes the specified basic block from the current loop, updating the Blocks as appropriate. More... | |
| void | verifyLoop () const |
| Verify loop structure. More... | |
| void | verifyLoopNest (DenseSet< const LoopT * > *Loops) const |
| Verify loop structure of this loop and all nested loops. More... | |
| void | print (raw_ostream &OS, unsigned Depth=0, bool Verbose=false) const |
| Print loop with all the BBs inside it. More... | |
Protected Member Functions | |
| LoopBase (BlockT *BB) | |
Friends | |
| class | LoopInfoBase< BlockT, LoopT > |
Instances of this class are used to represent loops that are detected in the flow graph.
Definition at line 61 of file LoopInfo.h.
| typedef std::vector<BlockT*>::const_iterator llvm::LoopBase< N, M >::block_iterator |
Definition at line 140 of file LoopInfo.h.
| typedef std::pair<const BlockT*, const BlockT*> llvm::LoopBase< N, M >::Edge |
Edge type.
Definition at line 225 of file LoopInfo.h.
| typedef std::vector<LoopT *>::const_iterator llvm::LoopBase< N, M >::iterator |
Definition at line 129 of file LoopInfo.h.
| typedef std::vector<LoopT *>::const_reverse_iterator llvm::LoopBase< N, M >::reverse_iterator |
Definition at line 131 of file LoopInfo.h.
|
inline |
This creates an empty loop.
Definition at line 86 of file LoopInfo.h.
|
inline |
Definition at line 87 of file LoopInfo.h.
|
inlineexplicitprotected |
Definition at line 350 of file LoopInfo.h.
| void llvm::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 specified LoopInfo object as being in the current basic block. It is not valid to replace the loop header with this method.
Definition at line 188 of file LoopInfoImpl.h.
References llvm::LoopBase< N, M >::addBlockEntry(), assert(), contains(), and L.
Referenced by llvm::addClonedBlockToLoopInfo(), CloneLoop(), cloneLoopBlocks(), llvm::cloneLoopWithPreheader(), insertUniqueBackedgeBlock(), llvm::SplitBlock(), llvm::SplitBlockAndInsertIfThen(), and UpdateAnalysisInformation().
|
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 line 299 of file LoopInfo.h.
Referenced by llvm::LoopBase< N, M >::addBasicBlockToLoop(), and separateNestedLoop().
|
inline |
Add the specified loop to be a child of this loop.
This updates the loop depth of the new child.
Definition at line 279 of file LoopInfo.h.
Referenced by llvm::addClonedBlockToLoopInfo(), llvm::LPPassManager::addLoop(), CloneLoopBlocks(), llvm::cloneLoopWithPreheader(), and separateNestedLoop().
|
inline |
Definition at line 132 of file LoopInfo.h.
Referenced by llvm::internal::appendLoopsToWorklist(), llvm::GraphTraits< const MachineLoop * >::child_begin(), llvm::GraphTraits< MachineLoop * >::child_begin(), llvm::GraphTraits< const Loop * >::child_begin(), llvm::GraphTraits< Loop * >::child_begin(), llvm::DWARFDebugLoc::dump(), llvm::DWARFDebugLocDWO::dump(), llvm::LoopInfo::markAsRemoved(), llvm::LoopBase< BasicBlock, Loop >::removeChildLoop(), llvm::LoopDeletionPass::runImpl(), and llvm::simplifyLoop().
|
inline |
Definition at line 141 of file LoopInfo.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::blocks(), CloneLoop(), llvm::computeLoopSafetyInfo(), detectPopcountIdiom(), llvm::PPCTargetLowering::getPrefLoopAlignment(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences(), llvm::LoopInfo::markAsRemoved(), mayLoopAccessLocation(), llvm::LoopDeletionPass::runImpl(), separateNestedLoop(), and simplifyOneLoop().
|
inline |
Definition at line 142 of file LoopInfo.h.
Referenced by llvm::LoopBase< BasicBlock, Loop >::blocks(), CloneLoop(), llvm::computeLoopSafetyInfo(), llvm::PPCTargetLowering::getPrefLoopAlignment(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences(), llvm::LoopInfo::markAsRemoved(), mayLoopAccessLocation(), llvm::LoopDeletionPass::runImpl(), separateNestedLoop(), and simplifyOneLoop().
|
inline |
Definition at line 143 of file LoopInfo.h.
Referenced by ApproximateLoopSize(), llvm::formLCSSA(), llvm::Loop::getLoopID(), llvm::Loop::getUniqueExitBlocks(), llvm::SystemZTTIImpl::getUnrollingPreferences(), llvm::Loop::isAnnotatedParallel(), llvm::Loop::isLCSSAForm(), llvm::Loop::isRecursivelyLCSSAForm(), llvm::Loop::isSafeToClone(), LoopBottom(), llvm::printLoop(), llvm::Loop::setLoopID(), simplifyLoopCFG(), sinkLoopInvariantInstructions(), and llvm::UnrollLoop().
|
inline |
Return true if the specified loop is contained within in this loop.
Definition at line 109 of file LoopInfo.h.
Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), analyzeLoopUnrollCost(), llvm::LoopAccessInfo::blockNeedsPredication(), canConstantEvolve(), cloneLoopBlocks(), llvm::CodeMetrics::collectEphemeralValues(), ConnectEpilog(), ConnectProlog(), llvm::LoopBase< BasicBlock, Loop >::contains(), expandBounds(), llvm::findDefsUsedOutsideOfLoop(), findPHIToPartitionLoops(), llvm::ScalarEvolution::getAddRecExpr(), llvm::Loop::getCanonicalInductionVariable(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), llvm::Loop::getUniqueExitBlocks(), llvm::Loop::hasDedicatedExits(), hasOutsideLoopUser(), hasUsesOutsideLoop(), llvm::hoistRegion(), llvm::InsertPreheaderForLoop(), inSubLoop(), IsAvailableOnEntry(), isBlockInLCSSAForm(), isExitingLoop(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isFPInductionPHI(), isInteresting(), llvm::LoopBase< BasicBlock, Loop >::isLoopExiting(), llvm::Loop::isLoopInvariant(), llvm::LoopBase< BasicBlock, Loop >::isLoopLatch(), isNotUsedInLoop(), isTrivialLoopExitBlockHelper(), IVUseShouldUsePostIncValue(), llvm::LPMUpdater::markLoopAsDeleted(), llvm::LoopInfo::movementPreservesLCSSAForm(), needToInsertPhisForLCSSA(), llvm::LoopBodyTraits::LoopBodyFilter::operator()(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), llvm::peelLoop(), PickMostRelevantLoop(), placeSplitBlockCarefully(), llvm::promoteLoopAccessesToScalars(), llvm::LoopInfo::replacementPreservesLCSSAForm(), rewriteLoopExitBlock(), separateNestedLoop(), shouldSpeculateInstrs(), SimplifyLoopInst(), simplifyOneLoop(), sinkInstruction(), llvm::sinkRegion(), SortBlocks(), llvm::UnrollLoop(), UpdateAnalysisInformation(), and llvm::LoopBlocksTraversal::visitPreorder().
|
inline |
Return true if the specified basic block is in this loop.
Definition at line 116 of file LoopInfo.h.
|
inline |
Return true if the specified instruction is in this loop.
Definition at line 122 of file LoopInfo.h.
|
inline |
Definition at line 136 of file LoopInfo.h.
Referenced by analyzeLoopUnrollCost(), llvm::computePeelCount(), emitBasicBlockLoopComments(), llvm::LoopInfo::markAsRemoved(), and llvm::LoopVectorizePass::processLoop().
|
inline |
Definition at line 133 of file LoopInfo.h.
Referenced by llvm::internal::appendLoopsToWorklist(), llvm::GraphTraits< const MachineLoop * >::child_end(), llvm::GraphTraits< MachineLoop * >::child_end(), llvm::GraphTraits< const Loop * >::child_end(), llvm::GraphTraits< Loop * >::child_end(), llvm::LoopInfo::markAsRemoved(), llvm::LoopDeletionPass::runImpl(), and llvm::simplifyLoop().
|
inline |
Get a list of the basic blocks which make up this loop.
Definition at line 139 of file LoopInfo.h.
Referenced by llvm::cloneLoopWithPreheader(), llvm::findDefsUsedOutsideOfLoop(), llvm::AMDGPUTTIImpl::getUnrollingPreferences(), llvm::PredicatedScalarEvolution::print(), separateNestedLoop(), and llvm::UnrollLoop().
| BlockT * llvm::LoopBase< BlockT, LoopT >::getExitBlock | ( | ) | const |
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 line 79 of file LoopInfoImpl.h.
References llvm::SmallVectorTemplateCommon< T >::size().
Referenced by llvm::LoopVersioning::LoopVersioning(), and llvm::LoopVersioning::versionLoop().
| void llvm::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 blocks outside of the current loop which are branched to.
Definition at line 65 of file LoopInfoImpl.h.
References contains(), E, I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by llvm::formLCSSA(), llvm::formLCSSAForInstructions(), llvm::Loop::hasDedicatedExits(), llvm::isGuaranteedToExecute(), separateNestedLoop(), SimplifyLoopInst(), simplifyOneLoop(), and llvm::UnrollLoop().
| void llvm::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 line 90 of file LoopInfoImpl.h.
References contains(), E, I, and llvm::SmallVectorTemplateBase< T, isPodLike >::push_back().
| BlockT * llvm::LoopBase< BlockT, LoopT >::getExitingBlock | ( | ) | const |
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 line 52 of file LoopInfoImpl.h.
References llvm::SmallVectorTemplateCommon< T >::size().
Referenced by canExpandBackedgeTakenCount(), canPeel(), FindLoopCounter(), genLoopLimit(), llvm::getLoopEstimatedTripCount(), getLoopTest(), llvm::ScalarEvolution::getSmallConstantTripCount(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), shouldSpeculateInstrs(), tryToUnrollLoop(), and llvm::UnrollRuntimeLoopRemainder().
| void llvm::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 blocks inside of the current loop which branch out. The returned list is always unique.
Definition at line 36 of file LoopInfoImpl.h.
References contains(), E, I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().
Referenced by llvm::SCEVExpander::getRelatedExistingExpansion(), llvm::LoopDeletionPass::runImpl(), and simplifyOneLoop().
|
inline |
Definition at line 102 of file LoopInfo.h.
Referenced by llvm::addClonedBlockToLoopInfo(), llvm::RecurrenceDescriptor::AddReductionVar(), llvm::LoopAccessInfo::addRuntimeChecks(), AddRuntimeUnrollDisableMetaData(), llvm::addStringMetadataToLoop(), analyzeLoopUnrollCost(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::LoopBlocksTraversal::begin(), canConstantEvolve(), cloneLoopBlocks(), CloneLoopBlocks(), llvm::cloneLoopWithPreheader(), llvm::computeLoopSafetyInfo(), llvm::computePeelCount(), computeUnrollCount(), createMissedAnalysis(), createStringMetadata(), DisableAllLoopOptsOnLoop(), DoInitialMatch(), llvm::LoopAccessReport::emitAnalysis(), emitBasicBlockLoopComments(), llvm::OptimizationRemarkEmitter::emitOptimizationRemark(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkAnalysis(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkAnalysisAliasing(), llvm::OptimizationRemarkEmitter::emitOptimizationRemarkMissed(), llvm::LoopBlocksTraversal::end(), FindLoopCounter(), llvm::MachineLoopInfo::findLoopPreheader(), findPHIToPartitionLoops(), gatherUnrollingPreferences(), llvm::ScalarEvolution::getAddRecExpr(), llvm::Loop::getCanonicalInductionVariable(), llvm::LoopBodyTraits::getEntryNode(), llvm::Loop::getLocRange(), llvm::getLoopEstimatedTripCount(), llvm::Loop::getLoopID(), llvm::LoopBase< BasicBlock, Loop >::getLoopLatches(), getLoopPhiForCounter(), llvm::LoopBase< BasicBlock, Loop >::getNumBackEdges(), llvm::SCEVExpander::getOrInsertCanonicalInductionVariable(), llvm::getPtrStride(), llvm::InsertPreheaderForLoop(), insertUniqueBackedgeBlock(), isExistingPhi(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isFPInductionPHI(), llvm::isGuaranteedToExecute(), llvm::isGuaranteedToExecuteForEveryIteration(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), isLoopInvariant(), llvm::LoopBase< BasicBlock, Loop >::isLoopLatch(), isProperBackedge(), llvm::RecurrenceDescriptor::isReductionPHI(), isSimplifiedLoopNest(), isTrivialLoopExitBlock(), llvm::IVUsers::IVUsers(), LoopBottom(), llvm::LoopBodyTraits::LoopBodyFilter::operator()(), llvm::peelLoop(), PickMostRelevantLoop(), PlaceLoopMarker(), preheader(), llvm::LoopVersioning::prepareNoAliasMetadata(), llvm::SCEV::print(), llvm::IVUsers::print(), llvm::LoopAccessLegacyAnalysis::print(), PrintParentLoopComment(), llvm::LoopVectorizePass::processLoop(), PushLoopPHIs(), ReduceLoopStrength(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::LoopAccessInfoPrinterPass::run(), llvm::IndVarSimplifyPass::run(), llvm::LoopIdiomRecognizePass::run(), llvm::LoopDeletionPass::runImpl(), llvm::LPPassManager::runOnFunction(), llvm::IVUsersWrapperPass::runOnLoop(), separateNestedLoop(), SetLoopAlreadyUnrolled(), llvm::Loop::setLoopID(), llvm::ScalarEvolution::SimplifyICmpOperands(), simplifyLoopCFG(), SimplifyLoopInst(), llvm::simplifyLoopIVs(), simplifyOneLoop(), llvm::LoopPass::skipLoop(), SortBlocks(), tryToUnrollLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), and llvm::LoopVersioning::versionLoop().
|
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 line 95 of file LoopInfo.h.
Referenced by emitBasicBlockLoopComments(), llvm::ScalarEvolution::getAddRecExpr(), llvm::AArch64TTIImpl::getUnrollingPreferences(), PrintParentLoopComment(), and UpdateAnalysisInformation().
| BlockT * llvm::LoopBase< BlockT, LoopT >::getLoopLatch | ( | ) | const |
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 line 157 of file LoopInfoImpl.h.
References contains(), and N.
Referenced by analyzeLoopUnrollCost(), llvm::LoopAccessInfo::blockNeedsPredication(), cloneLoopBlocks(), CloneLoopBlocks(), ConnectEpilog(), ConnectProlog(), FindLoopCounter(), llvm::MachineLoopInfo::findLoopPreheader(), llvm::getLoopEstimatedTripCount(), llvm::Loop::getLoopID(), getLoopTest(), getReductionValue(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::Loop::isLoopSimplifyForm(), IVUseShouldUsePostIncValue(), needsLFTR(), llvm::peelLoop(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::Loop::setLoopID(), simplifyOneLoop(), tryToUnrollLoop(), llvm::UnrollLoop(), and llvm::UnrollRuntimeLoopRemainder().
|
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 line 250 of file LoopInfo.h.
| BlockT * llvm::LoopBase< BlockT, LoopT >::getLoopPredecessor | ( | ) | const |
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 line 131 of file LoopInfoImpl.h.
References assert(), contains(), and N.
Referenced by llvm::ScalarEvolution::isLoopEntryGuardedByCond(), and LoopIsOuterMostWithPredecessor().
| BlockT * llvm::LoopBase< BlockT, LoopT >::getLoopPreheader | ( | ) | const |
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.
Definition at line 109 of file LoopInfoImpl.h.
References SI.
Referenced by llvm::RecurrenceDescriptor::AddReductionVar(), analyzeLoopUnrollCost(), cloneLoopBlocks(), llvm::cloneLoopWithPreheader(), detectPopcountIdiom(), findBBsToSinkInto(), llvm::MachineLoopInfo::findLoopPreheader(), genLoopLimit(), llvm::Loop::getLocRange(), hoist(), llvm::hoistRegion(), llvm::RecurrenceDescriptor::isFirstOrderRecurrence(), llvm::InductionDescriptor::isInductionPHI(), llvm::Loop::isLoopSimplifyForm(), llvm::Loop::makeLoopInvariant(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), llvm::peelLoop(), preheader(), llvm::LoopVectorizePass::processLoop(), llvm::promoteLoopAccessesToScalars(), llvm::LoopDeletionPass::runImpl(), simplifyOneLoop(), sinkLoopInvariantInstructions(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), and llvm::LoopVersioning::versionLoop().
|
inline |
Calculate the number of back edges to the loop header.
Definition at line 185 of file LoopInfo.h.
Referenced by insertUniqueBackedgeBlock(), and simplifyOneLoop().
|
inline |
Get the number of blocks in this loop in constant time.
Definition at line 148 of file LoopInfo.h.
Referenced by llvm::LoopBlocksTraversal::begin(), and llvm::LoopBlocksDFS::LoopBlocksDFS().
|
inline |
Definition at line 103 of file LoopInfo.h.
Referenced by llvm::addClonedBlockToLoopInfo(), llvm::LPPassManager::addLoop(), cloneLoopBlocks(), CloneLoopBlocks(), llvm::cloneLoopWithPreheader(), emitBasicBlockLoopComments(), getOutermostLoop(), isProperBackedge(), LoopIsOuterMostWithPredecessor(), llvm::LoopInfo::markAsRemoved(), llvm::peelLoop(), llvm::ScalarEvolution::print(), PrintParentLoopComment(), llvm::LoopInfoBase< BasicBlock, Loop >::removeBlock(), llvm::FunctionToLoopPassAdaptor< LoopPassT >::run(), separateNestedLoop(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopRemainder(), and UpdateAnalysisInformation().
|
inline |
Return the loops contained entirely within this loop.
Definition at line 127 of file LoopInfo.h.
Referenced by llvm::cloneLoopWithPreheader(), llvm::formLCSSARecursively(), and separateNestedLoop().
|
inline |
Definition at line 128 of file LoopInfo.h.
|
inline |
Invalidate the loop, indicating that it is no longer a loop.
Definition at line 153 of file LoopInfo.h.
Referenced by llvm::LoopInfo::markAsRemoved().
|
inline |
Return true if this loop is no longer valid.
Definition at line 156 of file LoopInfo.h.
Referenced by llvm::LoopInfo::markAsRemoved(), and llvm::LPPassManager::runOnFunction().
|
inline |
True if terminator in the block can branch to another block that is outside of the current loop.
Definition at line 160 of file LoopInfo.h.
Referenced by llvm::VirtRegAuxInfo::calculateSpillWeightAndHint(), llvm::ScalarEvolution::getSmallConstantTripCount(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), mustBeFiniteCountedLoop(), and tryToUnrollLoop().
|
inline |
Definition at line 175 of file LoopInfo.h.
|
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 line 316 of file LoopInfo.h.
Referenced by separateNestedLoop(), simplifyLoopCFG(), and UpdateAnalysisInformation().
| void llvm::LoopBase< BlockT, LoopT >::print | ( | raw_ostream & | OS, |
| unsigned | Depth = 0, |
||
| bool | Verbose = false |
||
| ) | const |
Print loop with all the BBs inside it.
Definition at line 316 of file LoopInfoImpl.h.
References llvm::sys::path::begin(), E, llvm::sys::path::end(), H, I, i, and llvm::raw_ostream::indent().
Referenced by llvm::Loop::dump(), llvm::Loop::dumpVerbose(), and llvm::operator<<().
|
inline |
Definition at line 134 of file LoopInfo.h.
Referenced by llvm::ScalarEvolution::verify().
|
inline |
This removes the specified basic block from the current loop, updating the Blocks as appropriate.
This does not update the mapping in the LoopInfo class.
Definition at line 331 of file LoopInfo.h.
Referenced by llvm::LoopInfoBase< BasicBlock, Loop >::removeBlock(), and separateNestedLoop().
|
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 line 287 of file LoopInfo.h.
Referenced by llvm::LoopInfo::markAsRemoved(), and separateNestedLoop().
|
inline |
Definition at line 135 of file LoopInfo.h.
Referenced by llvm::ScalarEvolution::verify().
| void llvm::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 line 217 of file LoopInfoImpl.h.
References assert(), llvm::find(), and I.
|
inline |
interface to do reserve() for Blocks
Definition at line 310 of file LoopInfo.h.
|
inline |
interface to reverse Blocks[from, end of loop] in this loop
Definition at line 305 of file LoopInfo.h.
|
inline |
This is a raw interface for bypassing addChildLoop.
Definition at line 106 of file LoopInfo.h.
| void llvm::LoopBase< BlockT, LoopT >::verifyLoop | ( | ) | const |
Verify loop structure.
verifyLoop - Verify loop structure
Definition at line 229 of file LoopInfoImpl.h.
References llvm::any_of(), assert(), B, llvm::sys::path::begin(), contains(), llvm::depth_first(), llvm::df_ext_begin(), llvm::df_ext_end(), E, llvm::SmallVectorBase::empty(), llvm::sys::path::end(), getParent(), I, i, llvm::df_iterator_default_set< NodeRef, SmallSize >::insert(), llvm::is_contained(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by llvm::LPPassManager::runOnFunction().
| void llvm::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 line 305 of file LoopInfoImpl.h.
References llvm::sys::path::begin(), E, llvm::sys::path::end(), I, and llvm::detail::DenseSetImpl< ValueT, DenseMap< ValueT, detail::DenseSetEmpty, ValueInfoT, detail::DenseSetPair< ValueT > >, ValueInfoT >::insert().
|
friend |
Definition at line 349 of file LoopInfo.h.
1.8.6