|
LLVM
3.7.0
|
LoopInfo - This class builds and contains all of the top level loop structures in the specified function. More...
#include <LoopInfo.h>
Public Types | |
| typedef std::vector< LoopT * > ::const_iterator | iterator |
| iterator/begin/end - The interface to the top-level loops in the current function. More... | |
| typedef std::vector< LoopT * > ::const_reverse_iterator | reverse_iterator |
Public Member Functions | |
| LoopInfoBase () | |
| ~LoopInfoBase () | |
| LoopInfoBase (LoopInfoBase &&Arg) | |
| LoopInfoBase & | operator= (LoopInfoBase &&RHS) |
| void | releaseMemory () |
| iterator | begin () const |
| iterator | end () const |
| reverse_iterator | rbegin () const |
| reverse_iterator | rend () const |
| bool | empty () const |
| LoopT * | getLoopFor (const BlockT *BB) const |
| getLoopFor - Return the inner most loop that BB lives in. More... | |
| const LoopT * | operator[] (const BlockT *BB) const |
| operator[] - same as getLoopFor... More... | |
| unsigned | getLoopDepth (const BlockT *BB) const |
| getLoopDepth - Return the loop nesting level of the specified block. More... | |
| bool | isLoopHeader (const BlockT *BB) const |
| LoopT * | removeLoop (iterator I) |
| removeLoop - This removes the specified top-level loop from this loop info object. More... | |
| void | changeLoopFor (BlockT *BB, LoopT *L) |
| changeLoopFor - Change the top-level loop that contains BB to the specified loop. More... | |
| void | changeTopLevelLoop (LoopT *OldLoop, LoopT *NewLoop) |
| changeTopLevelLoop - Replace the specified loop in the top-level loops list with the indicated loop. More... | |
| void | addTopLevelLoop (LoopT *New) |
| addTopLevelLoop - This adds the specified loop to the collection of top-level loops. More... | |
| void | removeBlock (BlockT *BB) |
| removeBlock - This method completely removes BB from all data structures, including all of the Loop objects it is nested in and our mapping from BasicBlocks to loops. More... | |
| void | Analyze (DominatorTreeBase< BlockT > &DomTree) |
| Create the loop forest using a stable algorithm. More... | |
| void | print (raw_ostream &OS) const |
| void | verify () const |
Static Public Member Functions | |
| static bool | isNotAlreadyContainedIn (const LoopT *SubLoop, const LoopT *ParentLoop) |
Friends | |
| class | LoopBase< BlockT, LoopT > |
| class | LoopInfo |
LoopInfo - This class builds and contains all of the top level loop structures in the specified function.
Definition at line 57 of file LoopInfo.h.
| typedef std::vector<LoopT *>::const_iterator llvm::LoopInfoBase< N, M >::iterator |
iterator/begin/end - The interface to the top-level loops in the current function.
Definition at line 528 of file LoopInfo.h.
| typedef std::vector<LoopT *>::const_reverse_iterator llvm::LoopInfoBase< N, M >::reverse_iterator |
Definition at line 530 of file LoopInfo.h.
|
inline |
Definition at line 498 of file LoopInfo.h.
|
inline |
Definition at line 499 of file LoopInfo.h.
|
inline |
Definition at line 501 of file LoopInfo.h.
|
inline |
addTopLevelLoop - This adds the specified loop to the collection of top-level loops.
Definition at line 597 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::addTopLevelLoop(), CloneLoopBlocks(), llvm::cloneLoopWithPreheader(), and llvm::LPPassManager::insertLoop().
| void llvm::LoopInfoBase< BlockT, LoopT >::Analyze | ( | DominatorTreeBase< BlockT > & | DomTree | ) |
Create the loop forest using a stable algorithm.
Analyze LoopInfo discovers loops during a postorder DominatorTree traversal interleaved with backward CFG traversals within each subloop (discoverAndMapSubloop).
The backward traversal skips inner subloops, so this part of the algorithm is linear in the number of CFG edges. Subloop and Block vectors are then populated during a single forward CFG traversal (PopulateLoopDFS).
During the two CFG traversals each block is seen three times: 1) Discovered and mapped by a reverse CFG traversal. 2) Visited during a forward DFS CFG traversal. 3) Reverse-inserted in the loop in postorder following forward DFS.
The Block vectors are inclusive, so step 3 requires loop-depth number of insertions per block.
Definition at line 471 of file LoopInfoImpl.h.
References llvm::discoverAndMapSubloop(), llvm::DominatorTreeBase< N >::dominates(), llvm::SmallVectorBase::empty(), llvm::DomTreeNodeBase< T >::getBlock(), llvm::DominatorTreeBase< N >::getRootNode(), llvm::DominatorTreeBase< N >::isReachableFromEntry(), llvm::post_order(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::PopulateLoopsDFS< BlockT, LoopT >::traverse().
Referenced by llvm::LoopAnalysis::run().
|
inline |
Definition at line 531 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::begin().
|
inline |
changeLoopFor - Change the top-level loop that contains BB to the specified loop.
This should be used by transformations that restructure the loop hierarchy tree.
Definition at line 576 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::changeLoopFor(), llvm::discoverAndMapSubloop(), and separateNestedLoop().
|
inline |
changeTopLevelLoop - Replace the specified loop in the top-level loops list with the indicated loop.
Definition at line 586 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::changeTopLevelLoop(), and separateNestedLoop().
|
inline |
Definition at line 535 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::empty().
|
inline |
Definition at line 532 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::end().
|
inline |
getLoopDepth - Return the loop nesting level of the specified block.
A depth of 0 means the block is not inside any loop.
Definition at line 551 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::getLoopDepth().
|
inline |
getLoopFor - Return the inner most loop that BB lives in.
If a basic block is in no loop (for example the entry node), null is returned.
Definition at line 540 of file LoopInfo.h.
Referenced by llvm::IVUsers::AddUsersImpl(), CloneInstructionInExitBlock(), CloneLoop(), llvm::DependenceAnalysis::depends(), llvm::discoverAndMapSubloop(), FoldBlockIntoPredecessor(), llvm::MachineLoopInfo::getLoopFor(), getOutermostLoop(), llvm::DependenceAnalysis::getSplitIteration(), inSubLoop(), isInteresting(), llvm::isPotentiallyReachable(), isSameUnderlyingObjectInLoop(), isSimplifiedLoopNest(), llvm::MachineLoopInfo::operator[](), processInstruction(), llvm::simplifyUsersOfIV(), llvm::SplitBlock(), llvm::UnrollLoop(), UpdateAnalysisInformation(), and llvm::LoopBlocksTraversal::visitPreorder().
|
inline |
Definition at line 557 of file LoopInfo.h.
Referenced by llvm::GetUnderlyingObjects(), and llvm::MachineLoopInfo::isLoopHeader().
|
inlinestatic |
Definition at line 617 of file LoopInfo.h.
|
inline |
Definition at line 507 of file LoopInfo.h.
|
inline |
operator[] - same as getLoopFor...
Definition at line 544 of file LoopInfo.h.
| void llvm::LoopInfoBase< BlockT, LoopT >::print | ( | raw_ostream & | OS | ) | const |
Definition at line 508 of file LoopInfoImpl.h.
References I.
Referenced by llvm::LoopInfoWrapperPass::print().
|
inline |
Definition at line 533 of file LoopInfo.h.
|
inline |
Definition at line 517 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::releaseMemory(), and llvm::LoopInfoWrapperPass::releaseMemory().
|
inline |
removeBlock - This method completely removes BB from all data structures, including all of the Loop objects it is nested in and our mapping from BasicBlocks to loops.
Definition at line 605 of file LoopInfo.h.
Referenced by FoldBlockIntoPredecessor(), llvm::MergeBlockIntoPredecessor(), llvm::MachineLoopInfo::removeBlock(), and simplifyOneLoop().
|
inline |
removeLoop - This removes the specified top-level loop from this loop info object.
The loop is not deleted, as it will presumably be inserted into another loop.
Definition at line 565 of file LoopInfo.h.
Referenced by llvm::MachineLoopInfo::removeLoop().
|
inline |
Definition at line 534 of file LoopInfo.h.
| void llvm::LoopInfoBase< BlockT, LoopT >::verify | ( | ) | const |
Definition at line 520 of file LoopInfoImpl.h.
References llvm::sys::path::begin(), llvm::DenseSet< ValueT, ValueInfoT >::count(), llvm::sys::path::end(), I, and Loops.
Referenced by llvm::LoopInfoWrapperPass::verifyAnalysis().
|
friend |
Definition at line 492 of file LoopInfo.h.
|
friend |
Definition at line 493 of file LoopInfo.h.
1.8.6