|
LLVM
4.0.0
|
#include <MachineLoopInfo.h>
Public Member Functions | |
| MachineLoop () | |
| MachineBasicBlock * | 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 that contains the header. More... | |
| MachineBasicBlock * | 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 that contains the header. More... | |
| MachineBasicBlock * | findLoopControlBlock () |
| Find the block that contains the loop control variable and the loop test. More... | |
| void | dump () const |
Public Member Functions inherited from llvm::LoopBase< MachineBasicBlock, MachineLoop > | |
| LoopBase () | |
| This creates an empty loop. More... | |
| ~LoopBase () | |
| unsigned | getLoopDepth () const |
| Return the nesting level of this loop. More... | |
| BlockT * | getHeader () const |
| LoopT * | getParentLoop () const |
| void | setParentLoop (LoopT *L) |
| This is a raw interface for bypassing addChildLoop. More... | |
| bool | contains (const LoopT *L) const |
| Return true if the specified loop is contained within in this loop. More... | |
| bool | contains (const BlockT *BB) const |
| Return true if the specified basic block is in this loop. More... | |
| bool | contains (const InstT *Inst) const |
| Return true if the specified instruction is in this loop. More... | |
| const std::vector< LoopT * > & | getSubLoops () const |
| 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 |
| Get a list of the basic blocks which make up this loop. More... | |
| block_iterator | block_begin () const |
| block_iterator | block_end () const |
| iterator_range< block_iterator > | blocks () const |
| unsigned | getNumBlocks () const |
| Get the number of blocks in this loop in constant time. More... | |
| void | invalidate () |
| Invalidate the loop, indicating that it is no longer a loop. More... | |
| bool | isInvalid () |
| Return true if this loop is no longer valid. More... | |
| bool | isLoopExiting (const BlockT *BB) const |
| True if terminator in the block can branch to another block that is outside of the current loop. More... | |
| bool | isLoopLatch (const BlockT *BB) const |
| unsigned | getNumBackEdges () const |
| Calculate the number of back edges to the loop header. More... | |
| void | getExitingBlocks (SmallVectorImpl< BlockT * > &ExitingBlocks) const |
| Return all blocks inside the loop that have successors outside of the loop. More... | |
| BlockT * | getExitingBlock () const |
| If getExitingBlocks would return exactly one block, return that block. More... | |
| void | getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const |
| Return all of the successor blocks of this loop. More... | |
| BlockT * | getExitBlock () const |
| If getExitBlocks would return exactly one block, return that block. More... | |
| void | getExitEdges (SmallVectorImpl< Edge > &ExitEdges) const |
| Return all pairs of (inside_block,outside_block). More... | |
| BlockT * | getLoopPreheader () const |
| If there is a preheader for this loop, return it. More... | |
| BlockT * | getLoopPredecessor () const |
| If the given loop's header has exactly one unique predecessor outside the loop, return it. More... | |
| BlockT * | getLoopLatch () const |
| If there is a single latch block for this loop, return it. More... | |
| void | getLoopLatches (SmallVectorImpl< BlockT * > &LoopLatches) const |
| Return all loop latch blocks of this loop. More... | |
| void | addBasicBlockToLoop (BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI) |
| This method is used by other analyses to update loop information. More... | |
| void | replaceChildLoopWith (LoopT *OldChild, LoopT *NewChild) |
| This is used when splitting loops up. More... | |
| void | addChildLoop (LoopT *NewChild) |
| Add the specified loop to be a child of this loop. More... | |
| LoopT * | removeChildLoop (iterator I) |
| This removes the specified child from being a subloop of this loop. More... | |
| void | addBlockEntry (BlockT *BB) |
| This adds a basic block directly to the basic block list. More... | |
| void | reverseBlock (unsigned from) |
| interface to reverse Blocks[from, end of loop] in this loop More... | |
| void | reserveBlocks (unsigned size) |
| interface to do reserve() for Blocks More... | |
| void | moveToHeader (BlockT *BB) |
| 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) |
| This removes the specified basic block from the current loop, updating the Blocks as appropriate. More... | |
| void | verifyLoop () const |
| Verify loop structure. More... | |
| void | verifyLoopNest (DenseSet< const LoopT * > *Loops) const |
| Verify loop structure of this loop and all nested loops. More... | |
| void | print (raw_ostream &OS, unsigned Depth=0, bool Verbose=false) const |
| Print loop with all the BBs inside it. More... | |
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) | |
Definition at line 43 of file MachineLoopInfo.h.
| llvm::MachineLoop::MachineLoop | ( | ) |
| LLVM_DUMP_METHOD void MachineLoop::dump | ( | ) | const |
Definition at line 126 of file MachineLoopInfo.cpp.
References llvm::dbgs(), and llvm::LoopBase< MachineBasicBlock, MachineLoop >::print().
| MachineBasicBlock * MachineLoop::findLoopControlBlock | ( | ) |
Find the block that contains the loop control variable and the loop test.
This will return the latch block if it's one of the exiting blocks. Otherwise, return the exiting block. Return 'null' when multiple exiting blocks are present.
Definition at line 80 of file MachineLoopInfo.cpp.
References llvm::LoopBase< MachineBasicBlock, MachineLoop >::getExitingBlock(), llvm::LoopBase< MachineBasicBlock, MachineLoop >::getLoopLatch(), and llvm::LoopBase< MachineBasicBlock, MachineLoop >::isLoopExiting().
| MachineBasicBlock * MachineLoop::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 that contains the header.
Definition at line 65 of file MachineLoopInfo.cpp.
References llvm::LoopBase< MachineBasicBlock, MachineLoop >::contains(), llvm::WebAssembly::End, llvm::MachineFunction::end(), llvm::LoopBase< MachineBasicBlock, MachineLoop >::getHeader(), llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::MachineBasicBlock::getParent().
Referenced by llvm::HexagonInstrInfo::analyzeLoop().
| MachineBasicBlock * MachineLoop::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 that 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(), llvm::ilist_node_impl< OptionsT >::getIterator(), and llvm::MachineBasicBlock::getParent().
|
friend |
Definition at line 66 of file MachineLoopInfo.h.
1.8.6