LLVM  3.7.0
Public Member Functions | Friends | List of all members
llvm::MachineLoop Class Reference

#include <MachineLoopInfo.h>

Inheritance diagram for llvm::MachineLoop:
[legend]
Collaboration diagram for llvm::MachineLoop:
[legend]

Public Member Functions

 MachineLoop ()
 
MachineBasicBlockgetTopBlock ()
 getTopBlock - Return the "top" block in the loop, which is the first block in the linear layout, ignoring any parts of the loop not contiguous with the part the contains the header. More...
 
MachineBasicBlockgetBottomBlock ()
 getBottomBlock - Return the "bottom" block in the loop, which is the last block in the linear layout, ignoring any parts of the loop not contiguous with the part the contains the header. More...
 
void dump () const
 
- Public Member Functions inherited from llvm::LoopBase< MachineBasicBlock, MachineLoop >
 LoopBase ()
 Loop ctor - This creates an empty loop. More...
 
 ~LoopBase ()
 
unsigned getLoopDepth () const
 getLoopDepth - Return the nesting level of this loop. More...
 
BlockT * getHeader () const
 
LoopT * getParentLoop () const
 
void setParentLoop (LoopT *L)
 setParentLoop is a raw interface for bypassing addChildLoop. More...
 
bool contains (const LoopT *L) const
 contains - Return true if the specified loop is contained within in this loop. More...
 
bool contains (const BlockT *BB) const
 contains - Return true if the specified basic block is in this loop. More...
 
bool contains (const InstT *Inst) const
 contains - Return true if the specified instruction is in this loop. More...
 
const std::vector< LoopT * > & getSubLoops () const
 iterator/begin/end - Return the loops contained entirely within this loop. More...
 
std::vector< LoopT * > & getSubLoopsVector ()
 
iterator begin () const
 
iterator end () const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 
bool empty () const
 
const std::vector< BlockT * > & getBlocks () const
 getBlocks - Get a list of the basic blocks which make up this loop. More...
 
block_iterator block_begin () const
 
block_iterator block_end () const
 
unsigned getNumBlocks () const
 getNumBlocks - Get the number of blocks in this loop in constant time. More...
 
bool isLoopExiting (const BlockT *BB) const
 isLoopExiting - True if terminator in the block can branch to another block that is outside of the current loop. More...
 
unsigned getNumBackEdges () const
 getNumBackEdges - Calculate the number of back edges to the loop header More...
 
void getExitingBlocks (SmallVectorImpl< BlockT * > &ExitingBlocks) const
 getExitingBlocks - Return all blocks inside the loop that have successors outside of the loop. More...
 
BlockT * getExitingBlock () const
 getExitingBlock - If getExitingBlocks would return exactly one block, return that block. More...
 
void getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const
 getExitBlocks - Return all of the successor blocks of this loop. More...
 
BlockT * getExitBlock () const
 getExitBlock - If getExitBlocks would return exactly one block, return that block. More...
 
void getExitEdges (SmallVectorImpl< Edge > &ExitEdges) const
 getExitEdges - Return all pairs of (inside_block,outside_block). More...
 
BlockT * getLoopPreheader () const
 getLoopPreheader - If there is a preheader for this loop, return it. More...
 
BlockT * getLoopPredecessor () const
 getLoopPredecessor - If the given loop's header has exactly one unique predecessor outside the loop, return it. More...
 
BlockT * getLoopLatch () const
 getLoopLatch - If there is a single latch block for this loop, return it. More...
 
void getLoopLatches (SmallVectorImpl< BlockT * > &LoopLatches) const
 getLoopLatches - Return all loop latch blocks of this loop. More...
 
void addBasicBlockToLoop (BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI)
 addBasicBlockToLoop - This method is used by other analyses to update loop information. More...
 
void replaceChildLoopWith (LoopT *OldChild, LoopT *NewChild)
 replaceChildLoopWith - This is used when splitting loops up. More...
 
void addChildLoop (LoopT *NewChild)
 addChildLoop - Add the specified loop to be a child of this loop. More...
 
LoopT * removeChildLoop (iterator I)
 removeChildLoop - This removes the specified child from being a subloop of this loop. More...
 
void addBlockEntry (BlockT *BB)
 addBlockEntry - This adds a basic block directly to the basic block list. More...
 
void reverseBlock (unsigned from)
 reverseBlocks - interface to reverse Blocks[from, end of loop] in this loop More...
 
void reserveBlocks (unsigned size)
 reserveBlocks- interface to do reserve() for Blocks More...
 
void moveToHeader (BlockT *BB)
 moveToHeader - This method is used to move BB (which must be part of this loop) to be the loop header of the loop (the block that dominates all others). More...
 
void removeBlockFromLoop (BlockT *BB)
 removeBlockFromLoop - This removes the specified basic block from the current loop, updating the Blocks as appropriate. More...
 
void verifyLoop () const
 verifyLoop - Verify loop structure More...
 
void verifyLoopNest (DenseSet< const LoopT * > *Loops) const
 verifyLoop - Verify loop structure of this loop and all nested loops. More...
 
void print (raw_ostream &OS, unsigned Depth=0) const
 

Friends

class LoopInfoBase< MachineBasicBlock, MachineLoop >
 

Additional Inherited Members

- Public Types inherited from llvm::LoopBase< MachineBasicBlock, MachineLoop >
typedef std::vector< LoopT * >
::const_iterator 
iterator
 
typedef std::vector< LoopT * >
::const_reverse_iterator 
reverse_iterator
 
typedef std::vector< BlockT * >
::const_iterator 
block_iterator
 
typedef std::pair< const
BlockT *, const BlockT * > 
Edge
 Edge type. More...
 
- Protected Member Functions inherited from llvm::LoopBase< MachineBasicBlock, MachineLoop >
 LoopBase (BlockT *BB)
 

Detailed Description

Definition at line 43 of file MachineLoopInfo.h.

Constructor & Destructor Documentation

llvm::MachineLoop::MachineLoop ( )

Member Function Documentation

void MachineLoop::dump ( ) const
MachineBasicBlock * MachineLoop::getBottomBlock ( )

getBottomBlock - Return the "bottom" block in the loop, which is the last block in the linear layout, ignoring any parts of the loop not contiguous with the part the contains the header.

Definition at line 64 of file MachineLoopInfo.cpp.

References llvm::LoopBase< MachineBasicBlock, MachineLoop >::contains(), llvm::MachineFunction::end(), llvm::LoopBase< MachineBasicBlock, MachineLoop >::getHeader(), and llvm::MachineBasicBlock::getParent().

MachineBasicBlock * MachineLoop::getTopBlock ( )

getTopBlock - Return the "top" block in the loop, which is the first block in the linear layout, ignoring any parts of the loop not contiguous with the part the contains the header.

Definition at line 50 of file MachineLoopInfo.cpp.

References llvm::MachineFunction::begin(), llvm::LoopBase< MachineBasicBlock, MachineLoop >::contains(), llvm::LoopBase< MachineBasicBlock, MachineLoop >::getHeader(), and llvm::MachineBasicBlock::getParent().

Friends And Related Function Documentation

friend class LoopInfoBase< MachineBasicBlock, MachineLoop >
friend

Definition at line 60 of file MachineLoopInfo.h.


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