LLVM API Documentation

llvm::LoopInfoBase< BlockT > Class Template Reference

#include <LoopInfo.h>

Inheritance diagram for llvm::LoopInfoBase< BlockT >:
[legend]
Collaboration diagram for llvm::LoopInfoBase< BlockT >:
[legend]

List of all members.

Public Types

typedef std::vector< LoopBase
< BlockT > * >::const_iterator 
iterator

Public Member Functions

 LoopInfoBase ()
 ~LoopInfoBase ()
void releaseMemory ()
iterator begin () const
iterator end () const
bool empty () const
LoopBase< BlockT > * getLoopFor (const BlockT *BB) const
const LoopBase< BlockT > * operator[] (const BlockT *BB) const
unsigned getLoopDepth (const BlockT *BB) const
bool isLoopHeader (BlockT *BB) const
LoopBase< BlockT > * removeLoop (iterator I)
void changeLoopFor (BlockT *BB, LoopBase< BlockT > *L)
void changeTopLevelLoop (LoopBase< BlockT > *OldLoop, LoopBase< BlockT > *NewLoop)
void addTopLevelLoop (LoopBase< BlockT > *New)
void removeBlock (BlockT *BB)
void Calculate (DominatorTreeBase< BlockT > &DT)
LoopBase< BlockT > * ConsiderForLoop (BlockT *BB, DominatorTreeBase< BlockT > &DT)
void MoveSiblingLoopInto (LoopBase< BlockT > *NewChild, LoopBase< BlockT > *NewParent)
void InsertLoopInto (LoopBase< BlockT > *L, LoopBase< BlockT > *Parent)
void print (std::ostream &OS, const Module *) const

Static Public Member Functions

static bool isNotAlreadyContainedIn (const LoopBase< BlockT > *SubLoop, const LoopBase< BlockT > *ParentLoop)

Friends

class LoopBase< BlockT >


Detailed Description

template<class BlockT>
class llvm::LoopInfoBase< BlockT >

LoopInfo - This class builds and contains all of the top level loop structures in the specified function.

Definition at line 623 of file LoopInfo.h.


Member Typedef Documentation

template<class BlockT>
typedef std::vector<LoopBase<BlockT>*>::const_iterator llvm::LoopInfoBase< BlockT >::iterator

iterator/begin/end - The interface to the top-level loops in the current function.

Definition at line 645 of file LoopInfo.h.


Constructor & Destructor Documentation

template<class BlockT>
llvm::LoopInfoBase< BlockT >::LoopInfoBase (  )  [inline]

Definition at line 630 of file LoopInfo.h.

template<class BlockT>
llvm::LoopInfoBase< BlockT >::~LoopInfoBase (  )  [inline]

Definition at line 631 of file LoopInfo.h.


Member Function Documentation

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::releaseMemory (  )  [inline]

template<class BlockT>
iterator llvm::LoopInfoBase< BlockT >::begin (  )  const [inline]

template<class BlockT>
iterator llvm::LoopInfoBase< BlockT >::end (  )  const [inline]

template<class BlockT>
bool llvm::LoopInfoBase< BlockT >::empty (  )  const [inline]

Definition at line 648 of file LoopInfo.h.

template<class BlockT>
LoopBase<BlockT>* llvm::LoopInfoBase< BlockT >::getLoopFor ( const BlockT *  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 653 of file LoopInfo.h.

Referenced by llvm::LoopInfoBase< llvm::MachineBasicBlock >::ConsiderForLoop(), llvm::LoopInfoBase< llvm::MachineBasicBlock >::getLoopDepth(), llvm::LoopInfoBase< llvm::MachineBasicBlock >::isLoopHeader(), and llvm::LoopInfoBase< llvm::MachineBasicBlock >::operator[]().

template<class BlockT>
const LoopBase<BlockT>* llvm::LoopInfoBase< BlockT >::operator[] ( const BlockT *  BB  )  const [inline]

operator[] - same as getLoopFor...

Definition at line 661 of file LoopInfo.h.

template<class BlockT>
unsigned llvm::LoopInfoBase< BlockT >::getLoopDepth ( const BlockT *  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 668 of file LoopInfo.h.

template<class BlockT>
bool llvm::LoopInfoBase< BlockT >::isLoopHeader ( BlockT *  BB  )  const [inline]

Definition at line 674 of file LoopInfo.h.

template<class BlockT>
LoopBase<BlockT>* llvm::LoopInfoBase< BlockT >::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 682 of file LoopInfo.h.

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::changeLoopFor ( BlockT *  BB,
LoopBase< BlockT > *  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 693 of file LoopInfo.h.

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::changeTopLevelLoop ( LoopBase< BlockT > *  OldLoop,
LoopBase< BlockT > *  NewLoop 
) [inline]

changeTopLevelLoop - Replace the specified loop in the top-level loops list with the indicated loop.

Definition at line 701 of file LoopInfo.h.

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::addTopLevelLoop ( LoopBase< BlockT > *  New  )  [inline]

addTopLevelLoop - This adds the specified loop to the collection of top-level loops.

Definition at line 713 of file LoopInfo.h.

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::removeBlock ( BlockT *  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 721 of file LoopInfo.h.

template<class BlockT>
static bool llvm::LoopInfoBase< BlockT >::isNotAlreadyContainedIn ( const LoopBase< BlockT > *  SubLoop,
const LoopBase< BlockT > *  ParentLoop 
) [inline, static]

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::Calculate ( DominatorTreeBase< BlockT > &  DT  )  [inline]

Definition at line 740 of file LoopInfo.h.

template<class BlockT>
LoopBase<BlockT>* llvm::LoopInfoBase< BlockT >::ConsiderForLoop ( BlockT *  BB,
DominatorTreeBase< BlockT > &  DT 
) [inline]

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::MoveSiblingLoopInto ( LoopBase< BlockT > *  NewChild,
LoopBase< BlockT > *  NewParent 
) [inline]

MoveSiblingLoopInto - This method moves the NewChild loop to live inside of the NewParent Loop, instead of being a sibling of it.

Definition at line 875 of file LoopInfo.h.

Referenced by llvm::LoopInfoBase< llvm::MachineBasicBlock >::ConsiderForLoop().

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::InsertLoopInto ( LoopBase< BlockT > *  L,
LoopBase< BlockT > *  Parent 
) [inline]

InsertLoopInto - This inserts loop L into the specified parent loop. If the parent loop contains a loop which should contain L, the loop gets inserted into L instead.

Definition at line 895 of file LoopInfo.h.

Referenced by llvm::LoopInfoBase< llvm::MachineBasicBlock >::InsertLoopInto(), and llvm::LoopInfoBase< llvm::MachineBasicBlock >::MoveSiblingLoopInto().

template<class BlockT>
void llvm::LoopInfoBase< BlockT >::print ( std::ostream &  OS,
const Module *   
) const [inline]

Definition at line 915 of file LoopInfo.h.

Referenced by llvm::LoopInfoBase< llvm::MachineBasicBlock >::print().


Friends And Related Function Documentation

template<class BlockT>
friend class LoopBase< BlockT > [friend]

Definition at line 627 of file LoopInfo.h.


The documentation for this class was generated from the following file: