LLVM API Documentation
#include <Dominators.h>
Classes | |
struct | InfoRec |
Public Member Functions | |
DominatorTreeBase (bool isPostDom) | |
virtual | ~DominatorTreeBase () |
bool | compare (DominatorTreeBase &Other) const |
virtual void | releaseMemory () |
DomTreeNodeBase< NodeT > * | getNode (NodeT *BB) const |
DomTreeNodeBase< NodeT > * | getRootNode () |
const DomTreeNodeBase< NodeT > * | getRootNode () const |
void | getDescendants (NodeT *R, SmallVectorImpl< NodeT * > &Result) const |
Get all nodes dominated by R, including R itself. Return true on success. More... | |
bool | properlyDominates (const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) |
bool | properlyDominates (const NodeT *A, const NodeT *B) |
bool | isReachableFromEntry (const NodeT *A) const |
bool | isReachableFromEntry (const DomTreeNodeBase< NodeT > *A) const |
bool | dominates (const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) |
bool | dominates (const NodeT *A, const NodeT *B) |
NodeT * | getRoot () const |
NodeT * | findNearestCommonDominator (NodeT *A, NodeT *B) |
const NodeT * | findNearestCommonDominator (const NodeT *A, const NodeT *B) |
DomTreeNodeBase< NodeT > * | addNewBlock (NodeT *BB, NodeT *DomBB) |
void | changeImmediateDominator (DomTreeNodeBase< NodeT > *N, DomTreeNodeBase< NodeT > *NewIDom) |
void | changeImmediateDominator (NodeT *BB, NodeT *NewBB) |
void | eraseNode (NodeT *BB) |
void | removeNode (NodeT *BB) |
void | splitBlock (NodeT *NewBB) |
void | print (raw_ostream &o) const |
template<class FT > | |
void | recalculate (FT &F) |
recalculate - compute a dominator tree for the given function More... | |
![]() | |
const std::vector< NodeT * > & | getRoots () const |
bool | isPostDominator () const |
Protected Types | |
typedef DenseMap< NodeT *, DomTreeNodeBase< NodeT > * > | DomTreeNodeMapType |
Protected Member Functions | |
void | reset () |
template<class N , class GraphT > | |
void | Split (DominatorTreeBase< typename GraphT::NodeType > &DT, typename GraphT::NodeType *NewBB) |
void | updateDFSNumbers () |
DomTreeNodeBase< NodeT > * | getNodeForBlock (NodeT *BB) |
NodeT * | getIDom (NodeT *BB) const |
void | addRoot (NodeT *BB) |
template<> | |
void | addRoot (MachineBasicBlock *MBB) |
![]() | |
DominatorBase (bool isPostDom) | |
Protected Attributes | |
DomTreeNodeMapType | DomTreeNodes |
DomTreeNodeBase< NodeT > * | RootNode |
bool | DFSInfoValid |
unsigned int | SlowQueries |
DenseMap< NodeT *, NodeT * > | IDoms |
std::vector< NodeT * > | Vertex |
DenseMap< NodeT *, InfoRec > | Info |
![]() | |
std::vector< NodeT * > | Roots |
const bool | IsPostDominators |
Friends | |
template<class GraphT > | |
GraphT::NodeType * | Eval (DominatorTreeBase< typename GraphT::NodeType > &DT, typename GraphT::NodeType *V, unsigned LastLinked) |
template<class GraphT > | |
unsigned | DFSPass (DominatorTreeBase< typename GraphT::NodeType > &DT, typename GraphT::NodeType *V, unsigned N) |
template<class FuncT , class N > | |
void | Calculate (DominatorTreeBase< typename GraphTraits< N >::NodeType > &DT, FuncT &F) |
Definition at line 59 of file Dominators.h.
|
protected |
Definition at line 201 of file Dominators.h.
|
inlineexplicit |
Definition at line 300 of file Dominators.h.
|
inlinevirtual |
Definition at line 302 of file Dominators.h.
|
inline |
addNewBlock - Add a new node to the dominator tree information. This creates a new node as a child of DomBB dominator node,linking it into the children list of the immediate dominator.
Definition at line 495 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::Split().
|
inlineprotected |
Definition at line 27 of file MachineDominators.h.
|
inlineprotected |
Definition at line 656 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::recalculate().
|
inline |
changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.
Definition at line 507 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::changeImmediateDominator(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::Split().
|
inline |
Definition at line 514 of file Dominators.h.
|
inline |
compare - Return false if the other dominator tree base matches this dominator tree base. Otherwise return true.
Definition at line 306 of file Dominators.h.
|
inline |
dominates - Returns true iff A dominates B. Note that this is not a constant time operation!
Definition at line 392 of file Dominators.h.
Referenced by llvm::LoopInfoBase< N, M >::Analyze(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::findNearestCommonDominator(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::properlyDominates(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::Split().
bool llvm::DominatorTreeBase< NodeT >::dominates | ( | const NodeT * | A, |
const NodeT * | B | ||
) |
Definition at line 696 of file Dominators.h.
|
inline |
eraseNode - Removes a node from the dominator tree. Block must not dominate any other blocks. Removes node from its immediate dominator's children list. Deletes dominator node associated with basic block BB.
Definition at line 521 of file Dominators.h.
|
inline |
findNearestCommonDominator - Find nearest common dominator basic block for basic block A and B. If there is no such block then return NULL.
Definition at line 437 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::findNearestCommonDominator(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::Split().
|
inline |
Definition at line 481 of file Dominators.h.
|
inline |
Get all nodes dominated by R, including R itself. Return true on success.
Definition at line 350 of file Dominators.h.
|
inlineprotected |
Definition at line 652 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getNodeForBlock().
|
inline |
getNode - return the (Post)DominatorTree node for the specified basic block. This is the same as using operator[] on this class.
Definition at line 335 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::addNewBlock(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::changeImmediateDominator(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::eraseNode(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::findNearestCommonDominator(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getDescendants(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getNodeForBlock(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::isReachableFromEntry(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::removeNode(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::Split().
|
inlineprotected |
Definition at line 635 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getNodeForBlock().
|
inline |
Definition at line 430 of file Dominators.h.
|
inline |
getRootNode - This returns the entry node for the CFG of the function. If this tree represents the post-dominance relations for a function, however, this root may be a node with the block == NULL. This is the case when there are multiple exit nodes from a particular function. Consumers of post-dominance information must be capable of dealing with this possibility.
Definition at line 346 of file Dominators.h.
Referenced by llvm::LoopInfoBase< N, M >::Analyze(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::print(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::updateDFSNumbers().
|
inline |
Definition at line 347 of file Dominators.h.
|
inline |
isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it.
Definition at line 379 of file Dominators.h.
Referenced by llvm::LoopInfoBase< N, M >::Analyze(), llvm::discoverAndMapSubloop(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::dominates(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::isReachableFromEntry(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::Split().
|
inline |
Definition at line 385 of file Dominators.h.
|
inline |
print - Convert to human readable form
Definition at line 560 of file Dominators.h.
|
inline |
properlyDominates - Returns true iff A dominates B and A != B. Note that this is not a constant time operation!
Definition at line 366 of file Dominators.h.
bool llvm::DominatorTreeBase< NodeT >::properlyDominates | ( | const NodeT * | A, |
const NodeT * | B | ||
) |
Definition at line 708 of file Dominators.h.
|
inline |
recalculate - compute a dominator tree for the given function
Definition at line 663 of file Dominators.h.
|
inlinevirtual |
Definition at line 330 of file Dominators.h.
|
inline |
removeNode - Removes a node from the dominator tree. Block must not dominate any other blocks. Invalidates any node pointing to removed block.
Definition at line 544 of file Dominators.h.
|
inlineprotected |
|
inlineprotected |
Definition at line 239 of file Dominators.h.
|
inline |
splitBlock - BB is split and now it has one successor. Update dominator tree to reflect this change.
Definition at line 551 of file Dominators.h.
|
inlineprotected |
updateDFSNumbers - Assign In and Out numbers to the nodes while walking dominator tree in dfs order.
Definition at line 593 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::dominates().
|
friend |
DominatorTree - Calculate the immediate dominator tree for a function.
|
friend |
Definition at line 34 of file DominatorInternals.h.
|
friend |
Definition at line 108 of file DominatorInternals.h.
|
protected |
Definition at line 205 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::addNewBlock(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::changeImmediateDominator(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::dominates(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::print(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::updateDFSNumbers().
|
protected |
Definition at line 202 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::addNewBlock(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::compare(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::eraseNode(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getNode(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getNodeForBlock(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::recalculate(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::removeNode(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::reset().
|
protected |
Definition at line 217 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getIDom(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::recalculate(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::reset().
|
protected |
Definition at line 223 of file Dominators.h.
Referenced by llvm::DFSPass(), and llvm::Eval().
|
protected |
Definition at line 203 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::getRootNode(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::reset().
|
protected |
Definition at line 206 of file Dominators.h.
Referenced by llvm::DominatorTreeBase< llvm::MachineBasicBlock >::dominates(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::print(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::updateDFSNumbers().
|
protected |
Definition at line 220 of file Dominators.h.
Referenced by llvm::DFSPass(), llvm::Eval(), llvm::DominatorTreeBase< llvm::MachineBasicBlock >::recalculate(), and llvm::DominatorTreeBase< llvm::MachineBasicBlock >::reset().