#include <LoopInfo.h>
Public Types | |
|
typedef std::vector< LoopT * > ::const_iterator | iterator |
|
typedef std::vector< BlockT * > ::const_iterator | block_iterator |
|
typedef std::pair< const BlockT *, const BlockT * > | Edge |
| getExitEdges - Return all pairs of (_inside_block_,_outside_block_). | |
Public Member Functions | |
| LoopBase () | |
| Loop ctor - This creates an empty loop. | |
| unsigned | getLoopDepth () const |
| BlockT * | getHeader () const |
| LoopT * | getParentLoop () const |
| bool | contains (const LoopT *L) const |
| bool | contains (const BlockT *BB) const |
| template<class InstT > | |
| bool | contains (const InstT *Inst) const |
| const std::vector< LoopT * > & | getSubLoops () const |
| iterator | begin () const |
| iterator | end () const |
| bool | empty () const |
| const std::vector< BlockT * > & | getBlocks () const |
| block_iterator | block_begin () const |
| block_iterator | block_end () const |
| bool | isLoopExiting (const BlockT *BB) const |
| unsigned | getNumBackEdges () const |
| void | getExitingBlocks (SmallVectorImpl< BlockT * > &ExitingBlocks) const |
| BlockT * | getExitingBlock () const |
| void | getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const |
| BlockT * | getExitBlock () const |
| void | getExitEdges (SmallVectorImpl< Edge > &ExitEdges) const |
| BlockT * | getLoopPreheader () const |
| BlockT * | getLoopLatch () const |
| void | addBasicBlockToLoop (BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI) |
| void | replaceChildLoopWith (LoopT *OldChild, LoopT *NewChild) |
| void | addChildLoop (LoopT *NewChild) |
| LoopT * | removeChildLoop (iterator I) |
| void | addBlockEntry (BlockT *BB) |
| void | moveToHeader (BlockT *BB) |
| void | removeBlockFromLoop (BlockT *BB) |
| void | verifyLoop () const |
| verifyLoop - Verify loop structure | |
| void | verifyLoopNest () const |
| verifyLoop - Verify loop structure of this loop and all nested loops. | |
| void | print (raw_ostream &OS, unsigned Depth=0) const |
Protected Member Functions | |
| LoopBase (BlockT *BB) | |
Friends | |
| class | LoopInfoBase< BlockT, LoopT > |
| void llvm::LoopBase< BlockT, LoopT >::addBasicBlockToLoop | ( | BlockT * | NewBB, | |
| LoopInfoBase< BlockT, LoopT > & | LI | |||
| ) | [inline] |
addBasicBlockToLoop - This method is used by other analyses to update loop information. NewBB is set to be a new member of the current loop. Because of this, it is added as a member of all parent loops, and is added to the specified LoopInfo object as being in the current basic block. It is not valid to replace the loop header with this method.
| void llvm::LoopBase< BlockT, LoopT >::addBlockEntry | ( | BlockT * | BB | ) | [inline] |
addBlockEntry - This adds a basic block directly to the basic block list. This should only be used by transformations that create new loops. Other transformations should use addBasicBlockToLoop.
| void llvm::LoopBase< BlockT, LoopT >::addChildLoop | ( | LoopT * | NewChild | ) | [inline] |
addChildLoop - Add the specified loop to be a child of this loop. This updates the loop depth of the new child.
| bool llvm::LoopBase< BlockT, LoopT >::contains | ( | const InstT * | Inst | ) | const [inline] |
contains - Return true if the specified instruction is in this loop.
| bool llvm::LoopBase< BlockT, LoopT >::contains | ( | const BlockT * | BB | ) | const [inline] |
contains - Return true if the specified basic block is in this loop.
| bool llvm::LoopBase< BlockT, LoopT >::contains | ( | const LoopT * | L | ) | const [inline] |
contains - Return true if the specified loop is contained within in this loop.
| const std::vector<BlockT*>& llvm::LoopBase< BlockT, LoopT >::getBlocks | ( | ) | const [inline] |
getBlocks - Get a list of the basic blocks which make up this loop.
| BlockT* llvm::LoopBase< BlockT, LoopT >::getExitBlock | ( | ) | const [inline] |
getExitBlock - If getExitBlocks would return exactly one block, return that block. Otherwise return null.
| void llvm::LoopBase< BlockT, LoopT >::getExitBlocks | ( | SmallVectorImpl< BlockT * > & | ExitBlocks | ) | const [inline] |
getExitBlocks - Return all of the successor blocks of this loop. These are the blocks _outside of the current loop_ which are branched to.
| BlockT* llvm::LoopBase< BlockT, LoopT >::getExitingBlock | ( | ) | const [inline] |
getExitingBlock - If getExitingBlocks would return exactly one block, return that block. Otherwise return null.
| void llvm::LoopBase< BlockT, LoopT >::getExitingBlocks | ( | SmallVectorImpl< BlockT * > & | ExitingBlocks | ) | const [inline] |
getExitingBlocks - Return all blocks inside the loop that have successors outside of the loop. These are the blocks _inside of the current loop_ which branch out. The returned list is always unique.
| unsigned llvm::LoopBase< BlockT, LoopT >::getLoopDepth | ( | ) | const [inline] |
getLoopDepth - Return the nesting level of this loop. An outer-most loop has depth 1, for consistency with loop depth values used for basic blocks, where depth 0 is used for blocks not inside any loops.
| BlockT* llvm::LoopBase< BlockT, LoopT >::getLoopLatch | ( | ) | const [inline] |
getLoopLatch - If there is a single latch block for this loop, return it. A latch block is a block that contains a branch back to the header.
| BlockT* llvm::LoopBase< BlockT, LoopT >::getLoopPreheader | ( | ) | const [inline] |
getLoopPreheader - If there is a preheader for this loop, return it. A loop has a preheader if there is only one edge to the header of the loop from outside of the loop. If this is the case, the block branching to the header of the loop is the preheader node.
This method returns null if there is no preheader for the loop.
| unsigned llvm::LoopBase< BlockT, LoopT >::getNumBackEdges | ( | ) | const [inline] |
getNumBackEdges - Calculate the number of back edges to the loop header
| const std::vector<LoopT *>& llvm::LoopBase< BlockT, LoopT >::getSubLoops | ( | ) | const [inline] |
iterator/begin/end - Return the loops contained entirely within this loop.
| bool llvm::LoopBase< BlockT, LoopT >::isLoopExiting | ( | const BlockT * | BB | ) | const [inline] |
isLoopExiting - True if terminator in the block can branch to another block that is outside of the current loop.
| void llvm::LoopBase< BlockT, LoopT >::moveToHeader | ( | BlockT * | BB | ) | [inline] |
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).
| void llvm::LoopBase< BlockT, LoopT >::removeBlockFromLoop | ( | BlockT * | BB | ) | [inline] |
removeBlockFromLoop - This removes the specified basic block from the current loop, updating the Blocks as appropriate. This does not update the mapping in the LoopInfo class.
| LoopT* llvm::LoopBase< BlockT, LoopT >::removeChildLoop | ( | iterator | I | ) | [inline] |
removeChildLoop - This removes the specified child from being a subloop of this loop. The loop is not deleted, as it will presumably be inserted into another loop.
| void llvm::LoopBase< BlockT, LoopT >::replaceChildLoopWith | ( | LoopT * | OldChild, | |
| LoopT * | NewChild | |||
| ) | [inline] |
replaceChildLoopWith - This is used when splitting loops up. It replaces the OldChild entry in our children list with NewChild, and updates the parent pointer of OldChild to be null and the NewChild to be this loop. This updates the loop depth of the new child.
1.5.8