LLVM: llvm::LoopBlocksDFS Class Reference (original) (raw)

Store the result of a depth first search within basic blocks contained by a single loop. More...

#include "[llvm/Analysis/LoopIterator.h](LoopIterator%5F8h%5Fsource.html)"

Public Types
typedef std::vector< BasicBlock * >::const_iterator POIterator
Postorder list iterators.
typedef std::vector< BasicBlock * >::const_reverse_iterator RPOIterator
Public Member Functions
LoopBlocksDFS (Loop *Container)
Loop * getLoop () const
void perform (const LoopInfo *LI)
Traverse the loop blocks and store the DFS result.
bool isComplete () const
Return true if postorder numbers are assigned to all loop blocks.
POIterator beginPostorder () const
Iterate over the cached postorder blocks.
POIterator endPostorder () const
RPOIterator beginRPO () const
Reverse iterate over the cached postorder blocks.
RPOIterator endRPO () const
bool hasPreorder (BasicBlock *BB) const
Return true if this block has been preorder visited.
bool hasPostorder (BasicBlock *BB) const
Return true if this block has a postorder number.
unsigned getPostorder (BasicBlock *BB) const
Get a block's postorder number.
unsigned getRPO (BasicBlock *BB) const
Get a block's reverse postorder number.
void clear ()

Store the result of a depth first search within basic blocks contained by a single loop.

TODO: This could be generalized for any CFG region, or the entire CFG.

Definition at line 97 of file LoopIterator.h.

POIterator

RPOIterator

llvm::LoopBlocksDFS::LoopBlocksDFS ( Loop * Container) inline

beginPostorder()

POIterator llvm::LoopBlocksDFS::beginPostorder ( ) const inline

beginRPO()

RPOIterator llvm::LoopBlocksDFS::beginRPO ( ) const inline

clear()

void llvm::LoopBlocksDFS::clear ( ) inline

endPostorder()

POIterator llvm::LoopBlocksDFS::endPostorder ( ) const inline

endRPO()

RPOIterator llvm::LoopBlocksDFS::endRPO ( ) const inline

getLoop()

Loop * llvm::LoopBlocksDFS::getLoop ( ) const inline

getPostorder()

Get a block's postorder number.

Definition at line 152 of file LoopIterator.h.

References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and I.

Referenced by getRPO().

getRPO()

hasPostorder()

bool llvm::LoopBlocksDFS::hasPostorder ( BasicBlock * BB) const inline

Return true if this block has a postorder number.

Definition at line 146 of file LoopIterator.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and I.

hasPreorder()

isComplete()

bool llvm::LoopBlocksDFS::isComplete ( ) const inline

perform()

LoopBlocksTraversal


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