clang API Documentation
Concrete subclass of DominatorTreeBase for Clang This class implements the dominators tree functionality given a Clang CFG. More...
#include <Dominators.h>


Public Member Functions | |
| DominatorTree () | |
| ~DominatorTree () | |
| llvm::DominatorTreeBase < CFGBlock > & | getBase () |
| CFGBlock * | getRoot () const |
| This method returns the root CFGBlock of the dominators tree. | |
| DomTreeNode * | getRootNode () const |
| This method returns the root DomTreeNode, which is the wrapper for CFGBlock. | |
| bool | compare (DominatorTree &Other) const |
| This method compares two dominator trees. The method returns false if the other dominator tree matches this dominator tree, otherwise returns true. | |
| void | buildDominatorTree (AnalysisDeclContext &AC) |
| This method builds the dominator tree for a given CFG The CFG information is passed via AnalysisDeclContext. | |
| void | dump () |
| This method dumps immediate dominators for each block, mainly used for debug purposes. | |
| bool | dominates (const CFGBlock *A, const CFGBlock *B) const |
| This method tests if one CFGBlock dominates the other. The method return true if A dominates B, false otherwise. Note a block always dominates itself. | |
| bool | properlyDominates (const CFGBlock *A, const CFGBlock *B) const |
| This method tests if one CFGBlock properly dominates the other. The method return true if A properly dominates B, false otherwise. | |
| CFGBlock * | findNearestCommonDominator (CFGBlock *A, CFGBlock *B) |
| This method finds the nearest common dominator CFG block for CFG block A and B. If there is no such block then return NULL. | |
| const CFGBlock * | findNearestCommonDominator (const CFGBlock *A, const CFGBlock *B) |
| void | changeImmediateDominator (CFGBlock *N, CFGBlock *NewIDom) |
| This method is used to update the dominator tree information when a node's immediate dominator changes. | |
| bool | isReachableFromEntry (const CFGBlock *A) |
| This method tests if the given CFGBlock can be reachable from root. Returns true if reachable, false otherwise. | |
| virtual void | releaseMemory () |
| This method releases the memory held by the dominator tree. | |
| virtual void | print (raw_ostream &OS, const llvm::Module *M=0) const |
| This method converts the dominator tree to human readable form. | |
Public Attributes | |
| llvm::DominatorTreeBase < CFGBlock > * | DT |
Concrete subclass of DominatorTreeBase for Clang This class implements the dominators tree functionality given a Clang CFG.
Definition at line 33 of file Dominators.h.
| clang::DominatorTree::DominatorTree | ( | ) | [inline] |
Definition at line 38 of file Dominators.h.
References DT.
| clang::DominatorTree::~DominatorTree | ( | ) | [inline] |
Definition at line 42 of file Dominators.h.
References DT.
| void clang::DominatorTree::buildDominatorTree | ( | AnalysisDeclContext & | AC | ) | [inline] |
This method builds the dominator tree for a given CFG The CFG information is passed via AnalysisDeclContext.
Definition at line 80 of file Dominators.h.
References DT, and clang::AnalysisDeclContext::getCFG().
This method is used to update the dominator tree information when a node's immediate dominator changes.
Definition at line 132 of file Dominators.h.
References DT.
| bool clang::DominatorTree::compare | ( | DominatorTree & | Other | ) | const [inline] |
This method compares two dominator trees. The method returns false if the other dominator tree matches this dominator tree, otherwise returns true.
Definition at line 64 of file Dominators.h.
References DT, getBase(), and getRootNode().
| void clang::DominatorTree::dump | ( | ) | [inline] |
This method dumps immediate dominators for each block, mainly used for debug purposes.
Definition at line 88 of file Dominators.h.
References clang::CFG::begin(), DT, and clang::CFG::end().
| const CFGBlock* clang::DominatorTree::findNearestCommonDominator | ( | const CFGBlock * | A, |
| const CFGBlock * | B | ||
| ) | [inline] |
Definition at line 124 of file Dominators.h.
References DT.
| llvm::DominatorTreeBase<CFGBlock>& clang::DominatorTree::getBase | ( | ) | [inline] |
| CFGBlock* clang::DominatorTree::getRoot | ( | ) | const [inline] |
This method returns the root CFGBlock of the dominators tree.
Definition at line 50 of file Dominators.h.
References DT.
| DomTreeNode* clang::DominatorTree::getRootNode | ( | ) | const [inline] |
This method returns the root DomTreeNode, which is the wrapper for CFGBlock.
Definition at line 56 of file Dominators.h.
References DT.
Referenced by compare(), and llvm::GraphTraits< ::clang::DominatorTree * >::getEntryNode().
| bool clang::DominatorTree::isReachableFromEntry | ( | const CFGBlock * | A | ) | [inline] |
This method tests if the given CFGBlock can be reachable from root. Returns true if reachable, false otherwise.
Definition at line 139 of file Dominators.h.
References DT.
| virtual void clang::DominatorTree::print | ( | raw_ostream & | OS, |
| const llvm::Module * | M = 0 |
||
| ) | const [inline, virtual] |
This method converts the dominator tree to human readable form.
Definition at line 151 of file Dominators.h.
References DT.
| virtual void clang::DominatorTree::releaseMemory | ( | ) | [inline, virtual] |
This method releases the memory held by the dominator tree.
Definition at line 145 of file Dominators.h.
References DT.
| llvm::DominatorTreeBase<CFGBlock>* clang::DominatorTree::DT |
Definition at line 36 of file Dominators.h.
Referenced by buildDominatorTree(), changeImmediateDominator(), compare(), dominates(), DominatorTree(), dump(), findNearestCommonDominator(), getBase(), getRoot(), getRootNode(), isReachableFromEntry(), print(), properlyDominates(), releaseMemory(), and ~DominatorTree().