|
LLVM
3.7.0
|
Core dominator tree base class. More...
#include <LoopInfo.h>
Classes | |
| struct | InfoRec |
Public Member Functions | |
| DominatorTreeBase (bool isPostDom) | |
| DominatorTreeBase (DominatorTreeBase &&Arg) | |
| DominatorTreeBase & | operator= (DominatorTreeBase &&RHS) |
| bool | compare (const DominatorTreeBase &Other) const |
| compare - Return false if the other dominator tree base matches this dominator tree base. More... | |
| void | releaseMemory () |
| DomTreeNodeBase< NodeT > * | getNode (NodeT *BB) const |
| getNode - return the (Post)DominatorTree node for the specified basic block. More... | |
| DomTreeNodeBase< NodeT > * | operator[] (NodeT *BB) const |
| DomTreeNodeBase< NodeT > * | getRootNode () |
| getRootNode - This returns the entry node for the CFG of the function. More... | |
| const DomTreeNodeBase< NodeT > * | getRootNode () const |
| void | getDescendants (NodeT *R, SmallVectorImpl< NodeT * > &Result) const |
| Get all nodes dominated by R, including R itself. More... | |
| bool | properlyDominates (const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) const |
| properlyDominates - Returns true iff A dominates B and A != B. More... | |
| bool | properlyDominates (const NodeT *A, const NodeT *B) const |
| bool | isReachableFromEntry (const NodeT *A) const |
| isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it. More... | |
| bool | isReachableFromEntry (const DomTreeNodeBase< NodeT > *A) const |
| bool | dominates (const DomTreeNodeBase< NodeT > *A, const DomTreeNodeBase< NodeT > *B) const |
| dominates - Returns true iff A dominates B. More... | |
| bool | dominates (const NodeT *A, const NodeT *B) const |
| NodeT * | getRoot () const |
| NodeT * | findNearestCommonDominator (NodeT *A, NodeT *B) |
| findNearestCommonDominator - Find nearest common dominator basic block for basic block A and B. More... | |
| const NodeT * | findNearestCommonDominator (const NodeT *A, const NodeT *B) |
| DomTreeNodeBase< NodeT > * | addNewBlock (NodeT *BB, NodeT *DomBB) |
| addNewBlock - Add a new node to the dominator tree information. More... | |
| void | changeImmediateDominator (DomTreeNodeBase< NodeT > *N, DomTreeNodeBase< NodeT > *NewIDom) |
| changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes. More... | |
| void | changeImmediateDominator (NodeT *BB, NodeT *NewBB) |
| void | eraseNode (NodeT *BB) |
| eraseNode - Removes a node from the dominator tree. More... | |
| void | splitBlock (NodeT *NewBB) |
| splitBlock - BB is split and now it has one successor. More... | |
| void | print (raw_ostream &o) const |
| print - Convert to human readable form More... | |
| void | updateDFSNumbers () const |
| updateDFSNumbers - Assign In and Out numbers to the nodes while walking dominator tree in dfs order. More... | |
| template<class FT > | |
| void | recalculate (FT &F) |
| recalculate - compute a dominator tree for the given function More... | |
Public Member Functions inherited from llvm::DominatorBase< NodeT > | |
| const std::vector< NodeT * > & | getRoots () const |
| getRoots - Return the root blocks of the current CFG. More... | |
| bool | isPostDominator () const |
| isPostDominator - Returns true if analysis based of postdoms More... | |
Protected Types | |
| typedef DenseMap< NodeT *, std::unique_ptr < DomTreeNodeBase< NodeT > > > | DomTreeNodeMapType |
Protected Member Functions | |
| void | reset () |
| template<class N , class GraphT > | |
| void | Split (DominatorTreeBase< typename GraphT::NodeType > &DT, typename GraphT::NodeType *NewBB) |
| DomTreeNodeBase< NodeT > * | getNodeForBlock (NodeT *BB) |
| NodeT * | getIDom (NodeT *BB) const |
| void | addRoot (NodeT *BB) |
| template<> | |
| void | addRoot (MachineBasicBlock *MBB) |
Protected Member Functions inherited from llvm::DominatorBase< NodeT > | |
| DominatorBase (bool isPostDom) | |
| DominatorBase (DominatorBase &&Arg) | |
| DominatorBase & | operator= (DominatorBase &&RHS) |
Protected Attributes | |
| DomTreeNodeMapType | DomTreeNodes |
| DomTreeNodeBase< NodeT > * | RootNode |
| bool | DFSInfoValid |
| unsigned int | SlowQueries |
| DenseMap< NodeT *, NodeT * > | IDoms |
| std::vector< NodeT * > | Vertex |
| DenseMap< NodeT *, InfoRec > | Info |
Protected Attributes inherited from llvm::DominatorBase< NodeT > | |
| std::vector< NodeT * > | Roots |
| 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) |
Core dominator tree base class.
This class is a generic template over graph nodes. It is instantiated for various graphs in the LLVM IR or in the code generator.
Definition at line 56 of file LoopInfo.h.
|
protected |
Definition at line 216 of file GenericDomTree.h.
|
inlineexplicit |
Definition at line 316 of file GenericDomTree.h.
|
inline |
Definition at line 319 of file GenericDomTree.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 556 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::addNewBlock(), llvm::cloneLoopWithPreheader(), llvm::SplitBlock(), and llvm::SplitBlockAndInsertIfThen().
|
inlineprotected |
Definition at line 28 of file MachineDominators.h.
|
inlineprotected |
Definition at line 662 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::recalculate().
|
inline |
changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.
Definition at line 568 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::changeImmediateDominator(), llvm::DominatorTreeBase< BasicBlock >::changeImmediateDominator(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), simplifyOneLoop(), llvm::SplitBlock(), llvm::SplitBlockAndInsertIfThen(), and llvm::LoopVersioning::versionLoop().
|
inline |
Definition at line 575 of file GenericDomTree.h.
|
inline |
compare - Return false if the other dominator tree base matches this dominator tree base.
Otherwise return true.
Definition at line 345 of file GenericDomTree.h.
|
inline |
dominates - Returns true iff A dominates B.
Note that this is not a constant time operation!
Definition at line 438 of file GenericDomTree.h.
Referenced by llvm::LoopInfoBase< N, M >::Analyze(), llvm::PostDominatorTree::dominates(), llvm::MachineDominatorTree::dominates(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), and llvm::DominatorTreeBase< BasicBlock >::properlyDominates().
| bool llvm::DominatorTreeBase< NodeT >::dominates | ( | const NodeT * | A, |
| const NodeT * | B | ||
| ) | const |
Definition at line 752 of file GenericDomTree.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 582 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::eraseNode(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), and simplifyOneLoop().
|
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 483 of file GenericDomTree.h.
Referenced by llvm::PostDominatorTree::findNearestCommonDominator(), llvm::MachineDominatorTree::findNearestCommonDominator(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), and getInsertPointForUses().
|
inline |
Definition at line 542 of file GenericDomTree.h.
|
inline |
Get all nodes dominated by R, including R itself.
Definition at line 396 of file GenericDomTree.h.
Referenced by llvm::PostDominatorTree::getDescendants().
|
inlineprotected |
Definition at line 660 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::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 376 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::addNewBlock(), blockDominatesAnExit(), llvm::IDFCalculator::calculate(), llvm::DominatorTreeBase< BasicBlock >::changeImmediateDominator(), llvm::cloneLoopWithPreheader(), containsUnconditionalCallSafepoint(), llvm::DominatorTreeBase< BasicBlock >::eraseNode(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), llvm::DominatorTreeBase< BasicBlock >::getDescendants(), llvm::PostDominatorTree::getNode(), llvm::MachineDominatorTree::getNode(), llvm::DominatorTreeBase< BasicBlock >::getNodeForBlock(), llvm::DominatorTreeBase< BasicBlock >::isReachableFromEntry(), isSimplifiedLoopNest(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), llvm::PostDominatorTree::operator[](), llvm::MachineDominatorTree::operator[](), llvm::DominatorTreeBase< BasicBlock >::operator[](), processInstruction(), simplifyOneLoop(), llvm::SplitBlock(), and llvm::SplitBlockAndInsertIfThen().
|
inlineprotected |
Definition at line 643 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getNodeForBlock().
|
inline |
Definition at line 476 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::getRoot().
|
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 392 of file GenericDomTree.h.
Referenced by llvm::LoopInfoBase< N, M >::Analyze(), llvm::IDFCalculator::calculate(), llvm::DominatorTree::compare(), llvm::GraphTraits< DominatorTree * >::getEntryNode(), llvm::DOTGraphTraits< DominatorTree * >::getNodeLabel(), llvm::PostDominatorTree::getRootNode(), llvm::MachineDominatorTree::getRootNode(), llvm::DominatorTreeBase< BasicBlock >::print(), and llvm::DominatorTreeBase< BasicBlock >::updateDFSNumbers().
|
inline |
Definition at line 393 of file GenericDomTree.h.
|
inline |
isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it.
Definition at line 427 of file GenericDomTree.h.
Referenced by llvm::LoopInfoBase< N, M >::Analyze(), llvm::discoverAndMapSubloop(), llvm::DominatorTreeBase< BasicBlock >::dominates(), llvm::MachineDominatorTree::isReachableFromEntry(), and llvm::DominatorTreeBase< BasicBlock >::isReachableFromEntry().
|
inline |
Definition at line 433 of file GenericDomTree.h.
|
inline |
Definition at line 329 of file GenericDomTree.h.
|
inline |
Definition at line 383 of file GenericDomTree.h.
|
inline |
print - Convert to human readable form
Definition at line 613 of file GenericDomTree.h.
Referenced by llvm::PostDominatorTree::print(), llvm::DominatorTreeWrapperPass::print(), and llvm::DominatorTree::verifyDomTree().
|
inline |
properlyDominates - Returns true iff A dominates B and A != B.
Note that this is not a constant time operation!
Definition at line 414 of file GenericDomTree.h.
Referenced by llvm::ForwardDominanceFrontierBase< BlockT >::calculate(), isLoopInvariant(), llvm::PostDominatorTree::properlyDominates(), and llvm::MachineDominatorTree::properlyDominates().
| bool llvm::DominatorTreeBase< NodeT >::properlyDominates | ( | const NodeT * | A, |
| const NodeT * | B | ||
| ) | const |
Definition at line 763 of file GenericDomTree.h.
|
inline |
recalculate - compute a dominator tree for the given function
Definition at line 717 of file GenericDomTree.h.
Referenced by AddAliasScopeMetadata(), AddAlignmentAssumptions(), llvm::DominatorTreeAnalysis::run(), llvm::UnrollLoop(), and llvm::DominatorTree::verifyDomTree().
|
inline |
Definition at line 371 of file GenericDomTree.h.
Referenced by llvm::PostDominatorTree::releaseMemory(), and llvm::DominatorTreeWrapperPass::releaseMemory().
|
inlineprotected |
Definition at line 240 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::recalculate(), and llvm::DominatorTreeBase< BasicBlock >::releaseMemory().
|
inlineprotected |
Definition at line 253 of file GenericDomTree.h.
|
inline |
splitBlock - BB is split and now it has one successor.
Update dominator tree to reflect this change.
Definition at line 603 of file GenericDomTree.h.
Referenced by insertUniqueBackedgeBlock(), llvm::MachineDominatorTree::splitBlock(), and UpdateAnalysisInformation().
|
inline |
updateDFSNumbers - Assign In and Out numbers to the nodes while walking dominator tree in dfs order.
Definition at line 667 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::dominates().
|
friend |
|
friend |
Definition at line 34 of file GenericDomTreeConstruction.h.
|
friend |
Definition at line 108 of file GenericDomTreeConstruction.h.
|
mutableprotected |
Definition at line 220 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::addNewBlock(), llvm::DominatorTreeBase< BasicBlock >::changeImmediateDominator(), llvm::DominatorTreeBase< BasicBlock >::dominates(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::print(), llvm::DominatorTreeBase< BasicBlock >::reset(), and llvm::DominatorTreeBase< BasicBlock >::updateDFSNumbers().
|
protected |
Definition at line 217 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::addNewBlock(), llvm::DominatorTreeBase< BasicBlock >::compare(), llvm::DominatorTreeBase< BasicBlock >::eraseNode(), llvm::DominatorTreeBase< BasicBlock >::getNode(), llvm::DominatorTreeBase< BasicBlock >::getNodeForBlock(), llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::recalculate(), and llvm::DominatorTreeBase< BasicBlock >::reset().
|
protected |
Definition at line 232 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getIDom(), llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::recalculate(), and llvm::DominatorTreeBase< BasicBlock >::reset().
|
protected |
Definition at line 238 of file GenericDomTree.h.
Referenced by llvm::DFSPass(), llvm::Eval(), and llvm::DominatorTreeBase< BasicBlock >::operator=().
|
protected |
Definition at line 218 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getRootNode(), llvm::DominatorTreeBase< BasicBlock >::operator=(), and llvm::DominatorTreeBase< BasicBlock >::reset().
|
mutableprotected |
Definition at line 221 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::dominates(), llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::print(), llvm::DominatorTreeBase< BasicBlock >::reset(), and llvm::DominatorTreeBase< BasicBlock >::updateDFSNumbers().
|
protected |
Definition at line 235 of file GenericDomTree.h.
Referenced by llvm::DFSPass(), llvm::Eval(), llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::recalculate(), and llvm::DominatorTreeBase< BasicBlock >::reset().
1.8.6