clang
8.0.0
|
Concrete subclass of DominatorTreeBase for Clang This class implements the dominators tree functionality given a Clang CFG. More...
#include "clang/Analysis/Analyses/Dominators.h"
Public Member Functions | |
DominatorTree () | |
~DominatorTree () override | |
llvm::DomTreeBase< CFGBlock > & | getBase () |
CFGBlock * | getRoot () const |
This method returns the root CFGBlock of the dominators tree. More... | |
DomTreeNode * | getRootNode () const |
This method returns the root DomTreeNode, which is the wrapper for CFGBlock. More... | |
bool | compare (DominatorTree &Other) const |
This method compares two dominator trees. More... | |
void | buildDominatorTree (AnalysisDeclContext &AC) |
This method builds the dominator tree for a given CFG The CFG information is passed via AnalysisDeclContext. More... | |
void | dump () |
This method dumps immediate dominators for each block, mainly used for debug purposes. More... | |
bool | dominates (const CFGBlock *A, const CFGBlock *B) const |
This method tests if one CFGBlock dominates the other. More... | |
bool | properlyDominates (const CFGBlock *A, const CFGBlock *B) const |
This method tests if one CFGBlock properly dominates the other. More... | |
CFGBlock * | findNearestCommonDominator (CFGBlock *A, CFGBlock *B) |
This method finds the nearest common dominator CFG block for CFG block A and B. More... | |
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. More... | |
bool | isReachableFromEntry (const CFGBlock *A) |
This method tests if the given CFGBlock can be reachable from root. More... | |
virtual void | releaseMemory () |
This method releases the memory held by the dominator tree. More... | |
virtual void | print (raw_ostream &OS, const llvm::Module *M=nullptr) const |
This method converts the dominator tree to human readable form. More... | |
![]() | |
virtual | ~ManagedAnalysis () |
Public Attributes | |
llvm::DomTreeBase< CFGBlock > * | DT |
Additional Inherited Members | |
![]() | |
ManagedAnalysis ()=default | |
Concrete subclass of DominatorTreeBase for Clang This class implements the dominators tree functionality given a Clang CFG.
Definition at line 43 of file Dominators.h.
|
inline |
Definition at line 49 of file Dominators.h.
|
inlineoverride |
Definition at line 53 of file Dominators.h.
|
inline |
This method builds the dominator tree for a given CFG The CFG information is passed via AnalysisDeclContext.
Definition at line 86 of file Dominators.h.
References clang::AnalysisDeclContext::getCFG().
This method is used to update the dominator tree information when a node's immediate dominator changes.
Definition at line 133 of file Dominators.h.
|
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 71 of file Dominators.h.
References getBase(), and getRootNode().
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.
Definition at line 110 of file Dominators.h.
|
inline |
This method dumps immediate dominators for each block, mainly used for debug purposes.
Definition at line 93 of file Dominators.h.
This method finds the nearest common dominator CFG block for CFG block A and B.
If there is no such block then return NULL.
Definition at line 122 of file Dominators.h.
|
inline |
Definition at line 126 of file Dominators.h.
|
inline |
Definition at line 55 of file Dominators.h.
Referenced by compare().
|
inline |
This method returns the root CFGBlock of the dominators tree.
Definition at line 58 of file Dominators.h.
|
inline |
This method returns the root DomTreeNode, which is the wrapper for CFGBlock.
Definition at line 64 of file Dominators.h.
Referenced by compare(), and llvm::GraphTraits< ::clang::DominatorTree *>::getEntryNode().
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.
|
inlinevirtual |
This method converts the dominator tree to human readable form.
Definition at line 149 of file Dominators.h.
|
inline |
This method tests if one CFGBlock properly dominates the other.
The method return true if A properly dominates B, false otherwise.
Definition at line 116 of file Dominators.h.
|
inlinevirtual |
This method releases the memory held by the dominator tree.
Definition at line 144 of file Dominators.h.
llvm::DomTreeBase<CFGBlock>* clang::DominatorTree::DT |
Definition at line 47 of file Dominators.h.