class LoopInfoBase
Declaration
template <class BlockT, class LoopT>
class LoopInfoBase { /* full declaration omitted */ };
Description
This class builds and contains all of the top-level loop structures in the specified function.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:909
Templates
- BlockT
- LoopT
Member Variables
- private DenseMap<const BlockT*, LoopT*> BBMap
- private std::vector<LoopT*> TopLevelLoops
- private llvm::BumpPtrAllocator LoopAllocator
Method Overview
- public template <typename... ArgsTy>LoopT * AllocateLoop(ArgsTy &&... Args)
- public LoopInfoBase<N, M>()
- public LoopInfoBase<N, M>(LoopInfoBase<N, M> && Arg)
- private LoopInfoBase<N, M>(const LoopInfoBase<N, M> &)
- public void addTopLevelLoop(LoopT * New)
- public void analyze(const DominatorTreeBase<BlockT, false> & DomTree)
- public llvm::LoopInfoBase::iterator begin() const
- public void changeLoopFor(BlockT * BB, LoopT * L)
- public void changeTopLevelLoop(LoopT * OldLoop, LoopT * NewLoop)
- public void destroy(LoopT * L)
- public bool empty() const
- public llvm::LoopInfoBase::iterator end() const
- public unsigned int getLoopDepth(const BlockT * BB) const
- public LoopT * getLoopFor(const BlockT * BB) const
- public SmallVector<LoopT *, 4> getLoopsInPreorder() const
- public SmallVector<LoopT *, 4> getLoopsInReverseSiblingPreorder() const
- public const std::vector<LoopT *> & getTopLevelLoops() const
- public std::vector<LoopT *> & getTopLevelLoopsVector()
- public bool isLoopHeader(const BlockT * BB) const
- public static bool isNotAlreadyContainedIn(const LoopT * SubLoop, const LoopT * ParentLoop)
- public void print(llvm::raw_ostream & OS) const
- public llvm::LoopInfoBase::reverse_iterator rbegin() const
- public void releaseMemory()
- public void removeBlock(BlockT * BB)
- public LoopT * removeLoop(llvm::LoopInfoBase::iterator I)
- public llvm::LoopInfoBase::reverse_iterator rend() const
- public void verify(const DominatorTreeBase<BlockT, false> & DomTree) const
- public ~LoopInfoBase<N, M>()
Methods
¶template <typename... ArgsTy>
LoopT* AllocateLoop(ArgsTy&&... Args)
template <typename... ArgsTy>
LoopT* AllocateLoop(ArgsTy&&... Args)
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:953
Templates
- ArgsTy
Parameters
- ArgsTy&&... Args
¶LoopInfoBase<N, M>()
LoopInfoBase<N, M>()
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:922
¶LoopInfoBase<N, M>(LoopInfoBase<N, M>&& Arg)
LoopInfoBase<N, M>(LoopInfoBase<N, M>&& Arg)
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:925
Parameters
- LoopInfoBase<N, M>&& Arg
¶LoopInfoBase<N, M>(const LoopInfoBase<N, M>&)
LoopInfoBase<N, M>(const LoopInfoBase<N, M>&)
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:919
Parameters
- const LoopInfoBase<N, M>&
¶void addTopLevelLoop(LoopT* New)
void addTopLevelLoop(LoopT* New)
Description
This adds the specified loop to the collection of top-level loops.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1046
Parameters
- LoopT* New
¶void analyze(
const DominatorTreeBase<BlockT, false>&
DomTree)
void analyze(
const DominatorTreeBase<BlockT, false>&
DomTree)
Description
Create the loop forest using a stable algorithm.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1076
Parameters
- const DominatorTreeBase<BlockT, false>& DomTree
¶llvm::LoopInfoBase::iterator begin() const
llvm::LoopInfoBase::iterator begin() const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:964
¶void changeLoopFor(BlockT* BB, LoopT* L)
void changeLoopFor(BlockT* BB, LoopT* L)
Description
Change the top-level loop that contains BB to the specified loop. This should be used by transformations that restructure the loop hierarchy tree.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1027
Parameters
- BlockT* BB
- LoopT* L
¶void changeTopLevelLoop(LoopT* OldLoop,
LoopT* NewLoop)
void changeTopLevelLoop(LoopT* OldLoop,
LoopT* NewLoop)
Description
Replace the specified loop in the top-level loops list with the indicated loop.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1037
Parameters
- LoopT* OldLoop
- LoopT* NewLoop
¶void destroy(LoopT* L)
void destroy(LoopT* L)
Description
Destroy a loop that has been removed from the `LoopInfo` nest. This runs the destructor of the loop object making it invalid to reference afterward. The memory is retained so that the *pointer* to the loop remains valid. The caller is responsible for removing this loop from the loop nest and otherwise disconnecting it from the broader `LoopInfo` data structures. Callers that don't naturally handle this themselves should probably call `erase' instead.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1093
Parameters
- LoopT* L
¶bool empty() const
bool empty() const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:968
¶llvm::LoopInfoBase::iterator end() const
llvm::LoopInfoBase::iterator end() const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:965
¶unsigned int getLoopDepth(const BlockT* BB) const
unsigned int getLoopDepth(const BlockT* BB) const
Description
Return the loop nesting level of the specified block. A depth of 0 means the block is not inside any loop.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:996
Parameters
- const BlockT* BB
¶LoopT* getLoopFor(const BlockT* BB) const
LoopT* getLoopFor(const BlockT* BB) const
Description
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.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:989
Parameters
- const BlockT* BB
¶SmallVector<LoopT*, 4> getLoopsInPreorder() const
SmallVector<LoopT*, 4> getLoopsInPreorder() const
Description
Return all of the loops in the function in preorder across the loop nests, with siblings in forward program order. Note that because loops form a forest of trees, preorder is equivalent to reverse postorder.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:975
¶SmallVector<LoopT*, 4>
getLoopsInReverseSiblingPreorder() const
SmallVector<LoopT*, 4>
getLoopsInReverseSiblingPreorder() const
Description
Return all of the loops in the function in preorder across the loop nests, with siblings in *reverse* program order. Note that because loops form a forest of trees, preorder is equivalent to reverse postorder. Also note that this is *not* a reverse preorder. Only the siblings are in reverse program order.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:985
¶const std::vector<LoopT*>& getTopLevelLoops()
const
const std::vector<LoopT*>& getTopLevelLoops()
const
Description
Return the top-level loops.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1008
¶std::vector<LoopT*>& getTopLevelLoopsVector()
std::vector<LoopT*>& getTopLevelLoopsVector()
Description
Return the top-level loops.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1011
¶bool isLoopHeader(const BlockT* BB) const
bool isLoopHeader(const BlockT* BB) const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1002
Parameters
- const BlockT* BB
¶static bool isNotAlreadyContainedIn(
const LoopT* SubLoop,
const LoopT* ParentLoop)
static bool isNotAlreadyContainedIn(
const LoopT* SubLoop,
const LoopT* ParentLoop)
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1066
Parameters
- const LoopT* SubLoop
- const LoopT* ParentLoop
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1079
Parameters
¶llvm::LoopInfoBase::reverse_iterator rbegin()
const
llvm::LoopInfoBase::reverse_iterator rbegin()
const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:966
¶void releaseMemory()
void releaseMemory()
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:944
¶void removeBlock(BlockT* BB)
void removeBlock(BlockT* BB)
Description
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.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1054
Parameters
- BlockT* BB
¶LoopT* removeLoop(llvm::LoopInfoBase::iterator I)
LoopT* removeLoop(llvm::LoopInfoBase::iterator I)
Description
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.
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1016
Parameters
- llvm::LoopInfoBase::iterator I
¶llvm::LoopInfoBase::reverse_iterator rend() const
llvm::LoopInfoBase::reverse_iterator rend() const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:967
¶void verify(
const DominatorTreeBase<BlockT, false>&
DomTree) const
void verify(
const DominatorTreeBase<BlockT, false>&
DomTree) const
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:1081
Parameters
- const DominatorTreeBase<BlockT, false>& DomTree
¶~LoopInfoBase<N, M>()
~LoopInfoBase<N, M>()
Declared at: llvm/include/llvm/Analysis/LoopInfo.h:923