|
LLVM
4.0.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 |
| See getNode. More... | |
| 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) |
| Add a new node to the dominator tree information. More... | |
| DomTreeNodeBase< NodeT > * | setNewRoot (NodeT *BB) |
| Add a new node to the forward dominator tree and make it a new root. 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 (DominatorTreeBaseByGraphTraits< GraphT > &DT, typename GraphT::NodeRef 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::NodeRef | Eval (DominatorTreeBaseByGraphTraits< GraphT > &DT, typename GraphT::NodeRef V, unsigned LastLinked) |
| template<class GraphT > | |
| unsigned | DFSPass (DominatorTreeBaseByGraphTraits< GraphT > &DT, typename GraphT::NodeRef V, unsigned N) |
| template<class FuncT , class N > | |
| void | Calculate (DominatorTreeBaseByGraphTraits< GraphTraits< N >> &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 59 of file LoopInfo.h.
|
protected |
Definition at line 238 of file GenericDomTree.h.
|
inlineexplicit |
Definition at line 338 of file GenericDomTree.h.
|
inline |
Definition at line 341 of file GenericDomTree.h.
|
inline |
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.
| BB | New node in CFG. |
| DomBB | CFG node that is dominator for BB. |
Definition at line 583 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::addNewBlock(), llvm::cloneLoopWithPreheader(), llvm::SplitBlock(), llvm::SplitBlockAndInsertIfThen(), and llvm::UnrollLoop().
|
inlineprotected |
Definition at line 28 of file MachineDominators.h.
|
inlineprotected |
Definition at line 713 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::recalculate(), and llvm::DominatorTreeBase< BasicBlock >::setNewRoot().
|
inline |
changeImmediateDominator - This method is used to update the dominator tree information when a node's immediate dominator changes.
Definition at line 620 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::changeImmediateDominator(), llvm::DominatorTreeBase< BasicBlock >::changeImmediateDominator(), llvm::cloneLoopWithPreheader(), foldBlockIntoPredecessor(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), llvm::LoopDeletionPass::runImpl(), simplifyOneLoop(), llvm::SplitBlock(), llvm::SplitBlockAndInsertIfThen(), llvm::UnrollLoop(), and llvm::LoopVersioning::versionLoop().
|
inline |
Definition at line 627 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 367 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::compare().
|
inline |
dominates - Returns true iff A dominates B.
Note that this is not a constant time operation!
Definition at line 459 of file GenericDomTree.h.
Referenced by llvm::LoopInfoBase< N, M >::analyze(), llvm::MachineDominatorTree::dominates(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), isFullPostDominator(), and llvm::DominatorTreeBase< BasicBlock >::properlyDominates().
| bool llvm::DominatorTreeBase< NodeT >::dominates | ( | const NodeT * | A, |
| const NodeT * | B | ||
| ) | const |
Definition at line 795 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 634 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::eraseNode(), foldBlockIntoPredecessor(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), llvm::LoopDeletionPass::runImpl(), 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 504 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::findNearestCommonDominator(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), getInsertPointForUses(), nearest_common_dominator(), and llvm::UnrollLoop().
|
inline |
Definition at line 563 of file GenericDomTree.h.
|
inline |
Get all nodes dominated by R, including R itself.
Definition at line 417 of file GenericDomTree.h.
|
inlineprotected |
Definition at line 711 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getNodeForBlock(), and llvm::ScalarEvolution::isLoopBackedgeGuardedByCond().
|
inline |
getNode - return the (Post)DominatorTree node for the specified basic block.
This is the same as using operator[] on this class. The result may (but is not required to) be null for a forward (backwards) statically unreachable block.
Definition at line 396 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::addNewBlock(), blockDominatesAnExit(), llvm::DominatorTreeBase< BasicBlock >::changeImmediateDominator(), llvm::cloneLoopWithPreheader(), containsUnconditionalCallSafepoint(), llvm::DominatorTreeBase< BasicBlock >::eraseNode(), llvm::DominatorTreeBase< BasicBlock >::findNearestCommonDominator(), foldBlockIntoPredecessor(), llvm::formLCSSAForInstructions(), llvm::DominatorTreeBase< BasicBlock >::getDescendants(), llvm::MachineDominatorTree::getNode(), llvm::DominatorTreeBase< BasicBlock >::getNodeForBlock(), llvm::DominatorTreeBase< BasicBlock >::isReachableFromEntry(), isSimplifiedLoopNest(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), llvm::MachineDominatorTree::operator[](), llvm::DominatorTreeBase< BasicBlock >::operator[](), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), preheader(), llvm::DominatorTreeBase< BasicBlock >::setNewRoot(), simplifyOneLoop(), SinkInstruction(), llvm::SplitBlock(), llvm::SplitBlockAndInsertIfThen(), and llvm::UnrollLoop().
|
inlineprotected |
Definition at line 694 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getNodeForBlock().
|
inline |
Definition at line 497 of file GenericDomTree.h.
Referenced by llvm::MachineDominatorTree::getRoot(), and nearest_common_dominatee().
|
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 413 of file GenericDomTree.h.
Referenced by llvm::LoopInfoBase< N, M >::analyze(), llvm::DominatorTree::compare(), llvm::GraphTraits< PostDominatorTree * >::getEntryNode(), llvm::GraphTraits< DominatorTree * >::getEntryNode(), llvm::DOTGraphTraits< DominatorTree * >::getNodeLabel(), llvm::DOTGraphTraits< PostDominatorTree * >::getNodeLabel(), llvm::MachineDominatorTree::getRootNode(), llvm::MemorySSA::OptimizeUses::optimizeUses(), llvm::DominatorTreeBase< BasicBlock >::print(), and llvm::DominatorTreeBase< BasicBlock >::updateDFSNumbers().
|
inline |
Definition at line 414 of file GenericDomTree.h.
|
inline |
isReachableFromEntry - Return true if A is dominated by the entry block of the function containing it.
Definition at line 448 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 454 of file GenericDomTree.h.
|
inline |
Definition at line 351 of file GenericDomTree.h.
|
inline |
See getNode.
Definition at line 404 of file GenericDomTree.h.
|
inline |
print - Convert to human readable form
Definition at line 665 of file GenericDomTree.h.
Referenced by llvm::PostDominatorTreeWrapperPass::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 435 of file GenericDomTree.h.
Referenced by llvm::ForwardDominanceFrontierBase< BlockT >::calculate(), ConstructSSAForLoadSet(), isLoopInvariant(), llvm::slpvectorizer::BoUpSLP::optimizeGatherSequence(), llvm::MachineDominatorTree::properlyDominates(), and llvm::replaceDominatedUsesWith().
| bool llvm::DominatorTreeBase< NodeT >::properlyDominates | ( | const NodeT * | A, |
| const NodeT * | B | ||
| ) | const |
Definition at line 806 of file GenericDomTree.h.
|
inline |
recalculate - compute a dominator tree for the given function
Definition at line 768 of file GenericDomTree.h.
Referenced by AddAliasScopeMetadata(), AddAlignmentAssumptions(), llvm::OptimizationRemarkEmitter::OptimizationRemarkEmitter(), llvm::PostDominatorTreeAnalysis::run(), llvm::DominatorTreeAnalysis::run(), llvm::UnrollLoop(), and llvm::DominatorTree::verifyDomTree().
|
inline |
Definition at line 390 of file GenericDomTree.h.
Referenced by llvm::PostDominatorTreeWrapperPass::releaseMemory(), and llvm::DominatorTreeWrapperPass::releaseMemory().
|
inlineprotected |
Definition at line 262 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::recalculate(), llvm::DominatorTreeBase< BasicBlock >::releaseMemory(), and llvm::JumpThreadingPass::run().
|
inline |
Add a new node to the forward dominator tree and make it a new root.
| BB | New node in CFG. |
Definition at line 597 of file GenericDomTree.h.
|
inlineprotected |
Definition at line 275 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 655 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 718 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::dominates().
|
friend |
|
friend |
Definition at line 33 of file GenericDomTreeConstruction.h.
|
friend |
Definition at line 106 of file GenericDomTreeConstruction.h.
|
mutableprotected |
Definition at line 242 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(), llvm::DominatorTreeBase< BasicBlock >::setNewRoot(), and llvm::DominatorTreeBase< BasicBlock >::updateDFSNumbers().
|
protected |
Definition at line 239 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 >::reset(), and llvm::DominatorTreeBase< BasicBlock >::setNewRoot().
|
protected |
Definition at line 254 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getIDom(), llvm::DominatorTreeBase< BasicBlock >::operator=(), and llvm::DominatorTreeBase< BasicBlock >::reset().
|
protected |
Definition at line 260 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::operator=().
|
protected |
Definition at line 240 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::getRootNode(), llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::reset(), and llvm::DominatorTreeBase< BasicBlock >::setNewRoot().
|
mutableprotected |
Definition at line 243 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 257 of file GenericDomTree.h.
Referenced by llvm::DominatorTreeBase< BasicBlock >::operator=(), llvm::DominatorTreeBase< BasicBlock >::recalculate(), and llvm::DominatorTreeBase< BasicBlock >::reset().
1.8.6