LLVM API Documentation
#include <LoopInfo.h>
Definition at line 629 of file LoopInfo.h.
typedef LoopInfoBase<BasicBlock, Loop>::iterator llvm::LoopInfo::iterator |
iterator/begin/end - The interface to the top-level loops in the current function.
Definition at line 647 of file LoopInfo.h.
Definition at line 648 of file LoopInfo.h.
llvm::LoopInfo::LoopInfo | ( | ) | [inline] |
Definition at line 638 of file LoopInfo.h.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeLoopInfoPass().
void llvm::LoopInfo::addTopLevelLoop | ( | Loop * | New | ) | [inline] |
addTopLevelLoop - This adds the specified loop to the collection of top-level loops.
Definition at line 712 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::addTopLevelLoop().
Referenced by llvm::LPPassManager::insertLoop().
iterator llvm::LoopInfo::begin | ( | ) | const [inline] |
Definition at line 649 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::begin().
Referenced by verifyAnalysis().
void llvm::LoopInfo::changeLoopFor | ( | BasicBlock * | BB, |
Loop * | L | ||
) | [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 700 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::changeLoopFor().
Referenced by separateNestedLoop().
void llvm::LoopInfo::changeTopLevelLoop | ( | Loop * | OldLoop, |
Loop * | NewLoop | ||
) | [inline] |
changeTopLevelLoop - Replace the specified loop in the top-level loops list with the indicated loop.
Definition at line 706 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::changeTopLevelLoop().
Referenced by separateNestedLoop().
bool llvm::LoopInfo::empty | ( | ) | const [inline] |
Definition at line 653 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::empty().
iterator llvm::LoopInfo::end | ( | ) | const [inline] |
Definition at line 650 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::end().
Referenced by verifyAnalysis().
void LoopInfo::getAnalysisUsage | ( | AnalysisUsage & | ) | const [override, virtual] |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.
Reimplemented from llvm::Pass.
Definition at line 704 of file LoopInfo.cpp.
References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().
LoopInfoBase<BasicBlock, Loop>& llvm::LoopInfo::getBase | ( | ) | [inline] |
Definition at line 642 of file LoopInfo.h.
References LI.
Referenced by CloneLoop(), CloneLoopBlocks(), insertUniqueBackedgeBlock(), llvm::SplitCriticalEdge(), llvm::UnrollLoop(), llvm::UnrollRuntimeLoopProlog(), and UpdateAnalysisInformation().
unsigned llvm::LoopInfo::getLoopDepth | ( | const BasicBlock * | BB | ) | const [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 671 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::getLoopDepth().
Loop* llvm::LoopInfo::getLoopFor | ( | const BasicBlock * | BB | ) | const [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 658 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor().
Referenced by llvm::IVUsers::AddUsersImpl(), CloneLoop(), FoldBlockIntoPredecessor(), getOutermostLoop(), isInteresting(), llvm::isPotentiallyReachable(), isSimplifiedLoopNest(), llvm::simplifyUsersOfIV(), llvm::SplitCriticalEdge(), llvm::UnrollLoop(), UpdateAnalysisInformation(), updateUnloop(), and llvm::LoopBlocksTraversal::visitPreorder().
bool llvm::LoopInfo::isLoopHeader | ( | BasicBlock * | BB | ) | const [inline] |
Definition at line 676 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::isLoopHeader().
const Loop* llvm::LoopInfo::operator[] | ( | const BasicBlock * | BB | ) | const [inline] |
operator[] - same as getLoopFor...
Definition at line 664 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor().
void LoopInfo::print | ( | raw_ostream & | O, |
const Module * | M = nullptr |
||
) | const [override, virtual] |
print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.
Reimplemented from llvm::Pass.
Definition at line 709 of file LoopInfo.cpp.
References llvm::LoopInfoBase< BlockT, LoopT >::print().
reverse_iterator llvm::LoopInfo::rbegin | ( | ) | const [inline] |
Definition at line 651 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::rbegin().
Referenced by llvm::LPPassManager::runOnFunction().
void llvm::LoopInfo::releaseMemory | ( | ) | [inline, override, virtual] |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.
Optionally implement this function to release pass memory when it is no longer used.
Reimplemented from llvm::Pass.
Definition at line 686 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::releaseMemory().
Referenced by runOnFunction().
void llvm::LoopInfo::removeBlock | ( | BasicBlock * | BB | ) | [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 719 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::removeBlock().
Referenced by FoldBlockIntoPredecessor(), and simplifyOneLoop().
Loop* llvm::LoopInfo::removeLoop | ( | iterator | I | ) | [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 695 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::removeLoop().
reverse_iterator llvm::LoopInfo::rend | ( | ) | const [inline] |
Definition at line 652 of file LoopInfo.h.
References llvm::LoopInfoBase< BlockT, LoopT >::rend().
Referenced by llvm::LPPassManager::runOnFunction().
bool llvm::LoopInfo::replacementPreservesLCSSAForm | ( | Instruction * | From, |
Value * | To | ||
) | [inline] |
replacementPreservesLCSSAForm - Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form.
Definition at line 731 of file LoopInfo.h.
References llvm::LoopBase< BlockT, LoopT >::contains(), llvm::dyn_cast(), llvm::Instruction::getParent(), and I.
Referenced by llvm::UnrollLoop().
bool LoopInfo::runOnFunction | ( | Function & | F | ) | [override, virtual] |
runOnFunction - Calculate the natural loop information.
Implements llvm::FunctionPass.
Definition at line 613 of file LoopInfo.cpp.
References llvm::LoopInfoBase< BlockT, LoopT >::Analyze(), and releaseMemory().
void LoopInfo::updateUnloop | ( | Loop * | Unloop | ) |
updateUnloop - Update LoopInfo after removing the last backedge from a loop--now the "unloop". This updates the loop forest and parent loops for each block so that Unloop is no longer referenced, but the caller must actually delete the Unloop object.
updateUnloop - The last backedge has been removed from a loop--now the "unloop". Find a new parent for the blocks contained within unloop and update the loop tree. We don't necessarily have valid dominators at this point, but LoopInfo is still valid except for the removal of this loop.
Note that Unloop may now be an empty loop. Calling Loop::getHeader without checking first is illegal.
Definition at line 626 of file LoopInfo.cpp.
References llvm::LoopInfoBase< BlockT, LoopT >::addTopLevelLoop(), llvm::LoopBase< BlockT, LoopT >::begin(), llvm::LoopInfoBase< BlockT, LoopT >::begin(), llvm::LoopBase< BlockT, LoopT >::block_begin(), llvm::LoopBase< BlockT, LoopT >::block_end(), llvm::LoopInfoBase< BlockT, LoopT >::changeLoopFor(), llvm::LoopBase< BlockT, LoopT >::empty(), llvm::LoopBase< BlockT, LoopT >::end(), llvm::LoopInfoBase< BlockT, LoopT >::end(), getLoopFor(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), I, llvm::LoopBase< BlockT, LoopT >::removeChildLoop(), and llvm::LoopInfoBase< BlockT, LoopT >::removeLoop().
Referenced by llvm::LPPassManager::deleteLoopFromQueue().
void LoopInfo::verifyAnalysis | ( | ) | const [override, virtual] |
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information.
Reimplemented from llvm::Pass.
Definition at line 681 of file LoopInfo.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::begin(), begin(), llvm::DenseSet< ValueT, ValueInfoT >::count(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), end(), I, Loops, and VerifyLoopInfo.
friend class LoopBase< BasicBlock, Loop > [friend] |
Definition at line 631 of file LoopInfo.h.
char LoopInfo::ID = 0 [static] |
Definition at line 636 of file LoopInfo.h.