LLVM API Documentation

llvm::LoopInfoBase< BlockT, LoopT > Class Template Reference

#include <LoopInfo.h>

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

List of all members.

Public Types

typedef std::vector< LoopT * >
::const_iterator 
iterator

Public Member Functions

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

Static Public Member Functions

static bool isNotAlreadyContainedIn (const LoopT *SubLoop, const LoopT *ParentLoop)

Friends

class LoopBase< BlockT, LoopT >


Detailed Description

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

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

Definition at line 589 of file LoopInfo.h.


Member Typedef Documentation

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

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

Definition at line 613 of file LoopInfo.h.


Constructor & Destructor Documentation

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

Definition at line 598 of file LoopInfo.h.

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

Definition at line 599 of file LoopInfo.h.


Member Function Documentation

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

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

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

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

Definition at line 616 of file LoopInfo.h.

template<class BlockT, class LoopT>
LoopT* llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor ( const BlockT *  BB  )  const [inline]

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

operator[] - same as getLoopFor...

Definition at line 629 of file LoopInfo.h.

template<class BlockT, class LoopT>
unsigned llvm::LoopInfoBase< BlockT, LoopT >::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 636 of file LoopInfo.h.

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

Definition at line 642 of file LoopInfo.h.

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

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

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

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

Definition at line 669 of file LoopInfo.h.

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

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

Definition at line 681 of file LoopInfo.h.

template<class BlockT, class LoopT>
void llvm::LoopInfoBase< BlockT, LoopT >::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 689 of file LoopInfo.h.

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

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

Definition at line 708 of file LoopInfo.h.

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

template<class BlockT, class LoopT>
void llvm::LoopInfoBase< BlockT, LoopT >::MoveSiblingLoopInto ( LoopT *  NewChild,
LoopT *  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 841 of file LoopInfo.h.

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

template<class BlockT, class LoopT>
void llvm::LoopInfoBase< BlockT, LoopT >::InsertLoopInto ( LoopT *  L,
LoopT *  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 861 of file LoopInfo.h.

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

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


Friends And Related Function Documentation

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

Definition at line 593 of file LoopInfo.h.


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