|
LLVM
5.0.0
|
#include "llvm/Analysis/LoopInfo.h"
Public Member Functions | |
| LoopInfo () | |
| LoopInfo (const DominatorTreeBase< BasicBlock, false > &DomTree) | |
| LoopInfo (LoopInfo &&Arg) | |
| LoopInfo & | operator= (LoopInfo &&RHS) |
| bool | invalidate (Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &) |
| Handle invalidation explicitly. More... | |
| 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 |
| SmallVector< LoopT *, 4 > | getLoopsInPreorder () |
| Return all of the loops in the function in preorder across the loop nests, with siblings in forward program order. More... | |
| SmallVector< LoopT *, 4 > | getLoopsInReverseSiblingPreorder () |
| Return all of the loops in the function in preorder across the loop nests, with siblings in reverse program order. More... | |
| 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, false > &DomTree) |
| Create the loop forest using a stable algorithm. More... | |
| void | print (raw_ostream &OS) const |
| void | verify (const DominatorTreeBase< BlockT, false > &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 678 of file LoopInfo.h.
|
inline |
Definition at line 686 of file LoopInfo.h.
|
explicit |
|
inline |
Definition at line 689 of file LoopInfo.h.
| bool LoopInfo::invalidate | ( | Function & | F, |
| const PreservedAnalyses & | PA, | ||
| FunctionAnalysisManager::Invalidator & | |||
| ) |
Handle invalidation explicitly.
Definition at line 616 of file LoopInfo.cpp.
References llvm::PreservedAnalyses::getChecker().
| 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 625 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 deleteDeadLoop(), 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 733 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 690 of file LoopInfo.h.
|
inline |
Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form.
Definition at line 709 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 681 of file LoopInfo.h.
1.8.6