|
LLVM
4.0.0
|
#include <LoopInfo.h>
Public Member Functions | |
| LoopInfo () | |
| LoopInfo (const DominatorTreeBase< BasicBlock > &DomTree) | |
| LoopInfo (LoopInfo &&Arg) | |
| LoopInfo & | operator= (LoopInfo &&RHS) |
| void | markAsRemoved (Loop *L) |
| Update LoopInfo after removing the last backedge from a loop. More... | |
| bool | replacementPreservesLCSSAForm (Instruction *From, Value *To) |
| Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form. More... | |
| bool | movementPreservesLCSSAForm (Instruction *Inst, Instruction *NewLoc) |
| Checks if moving a specific instruction can break LCSSA in any loop. More... | |
Public Member Functions inherited from llvm::LoopInfoBase< BasicBlock, Loop > | |
| LoopInfoBase & | operator= (LoopInfoBase &&RHS) |
| LoopInfoBase () | |
| LoopInfoBase (LoopInfoBase &&Arg) | |
| ~LoopInfoBase () | |
| 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 |
| Return the inner most loop that BB lives in. More... | |
| const LoopT * | operator[] (const BlockT *BB) const |
| Same as getLoopFor. More... | |
| unsigned | getLoopDepth (const BlockT *BB) const |
| Return the loop nesting level of the specified block. More... | |
| bool | isLoopHeader (const BlockT *BB) const |
| LoopT * | removeLoop (iterator I) |
| This removes the specified top-level loop from this loop info object. More... | |
| void | changeLoopFor (BlockT *BB, LoopT *L) |
| Change the top-level loop that contains BB to the specified loop. More... | |
| void | changeTopLevelLoop (LoopT *OldLoop, LoopT *NewLoop) |
| Replace the specified loop in the top-level loops list with the indicated loop. More... | |
| void | addTopLevelLoop (LoopT *New) |
| This adds the specified loop to the collection of top-level loops. More... | |
| void | removeBlock (BlockT *BB) |
| 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 (const DominatorTreeBase< BlockT > &DomTree) |
| Create the loop forest using a stable algorithm. More... | |
| void | print (raw_ostream &OS) const |
| void | verify (const DominatorTreeBase< BlockT > &DomTree) const |
Friends | |
| class | LoopBase< BasicBlock, Loop > |
Additional Inherited Members | |
Public Types inherited from llvm::LoopInfoBase< BasicBlock, Loop > | |
| 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 |
Static Public Member Functions inherited from llvm::LoopInfoBase< BasicBlock, Loop > | |
| static bool | isNotAlreadyContainedIn (const LoopT *SubLoop, const LoopT *ParentLoop) |
Definition at line 668 of file LoopInfo.h.
|
inline |
Definition at line 676 of file LoopInfo.h.
|
explicit |
Definition at line 609 of file LoopInfo.cpp.
References llvm::LoopInfoBase< BasicBlock, Loop >::analyze().
|
inline |
Definition at line 679 of file LoopInfo.h.
| void LoopInfo::markAsRemoved | ( | Loop * | L | ) |
Update LoopInfo after removing the last backedge from a loop.
This updates the loop forest and parent loops for each block so that L is no longer referenced, but does not actually delete L immediately. The pointer will remain valid until this LoopInfo's memory is released.
Definition at line 613 of file LoopInfo.cpp.
References llvm::LoopInfoBase< BasicBlock, Loop >::addTopLevelLoop(), assert(), llvm::LoopBase< N, M >::begin(), llvm::LoopInfoBase< BasicBlock, Loop >::begin(), llvm::LoopBase< N, M >::block_begin(), llvm::LoopBase< N, M >::block_end(), llvm::LoopInfoBase< BasicBlock, Loop >::changeLoopFor(), E, llvm::LoopBase< N, M >::empty(), llvm::LoopBase< N, M >::end(), llvm::LoopInfoBase< BasicBlock, Loop >::end(), llvm::LoopInfoBase< BasicBlock, Loop >::getLoopFor(), llvm::LoopBase< N, M >::getParentLoop(), I, llvm::LoopBase< N, M >::invalidate(), llvm::LoopBase< N, M >::isInvalid(), llvm::LoopBase< N, M >::removeChildLoop(), and llvm::LoopInfoBase< BasicBlock, Loop >::removeLoop().
Referenced by llvm::LoopDeletionPass::runImpl(), and llvm::UnrollLoop().
|
inline |
Checks if moving a specific instruction can break LCSSA in any loop.
Return true if moving Inst to before NewLoc will break LCSSA, assuming that the function containing Inst and NewLoc is currently in LCSSA form.
Definition at line 719 of file LoopInfo.h.
References assert(), llvm::LoopBase< N, M >::contains(), llvm::dyn_cast(), llvm::Instruction::getFunction(), llvm::Instruction::getParent(), llvm::User::operands(), and llvm::Value::uses().
Definition at line 680 of file LoopInfo.h.
|
inline |
Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form.
Definition at line 695 of file LoopInfo.h.
References llvm::LoopBase< N, M >::contains(), llvm::dyn_cast(), llvm::Instruction::getParent(), and I.
Referenced by SimplifyLoopInst(), simplifyOneLoop(), and llvm::UnrollLoop().
|
friend |
Definition at line 671 of file LoopInfo.h.
1.8.6