|
LLVM
3.7.0
|
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree. More...
#include <Dominators.h>
Public Types | |
| typedef DominatorTreeBase < BasicBlock > | Base |
Public Member Functions | |
| DominatorTree () | |
| DominatorTree (DominatorTree &&Arg) | |
| DominatorTree & | operator= (DominatorTree &&RHS) |
| bool | compare (const DominatorTree &Other) const |
| Returns false if the other dominator tree matches this dominator tree. More... | |
| bool | dominates (const Instruction *Def, const Use &U) const |
| Return true if Def dominates a use in User. More... | |
| bool | dominates (const Instruction *Def, const Instruction *User) const |
| bool | dominates (const Instruction *Def, const BasicBlock *BB) const |
| bool | dominates (const BasicBlockEdge &BBE, const Use &U) const |
| bool | dominates (const BasicBlockEdge &BBE, const BasicBlock *BB) const |
| bool | isReachableFromEntry (const Use &U) const |
| Provide an overload for a Use. More... | |
| void | verifyDomTree () const |
| Verify the correctness of the domtree by re-computing it. More... | |
Public Member Functions inherited from llvm::DominatorTreeBase< BasicBlock > | |
| 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 > *BasicBlock, 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... | |
| 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... | |
Additional Inherited Members | |
Protected Types inherited from llvm::DominatorTreeBase< BasicBlock > | |
| typedef DenseMap< NodeT *, std::unique_ptr < DomTreeNodeBase< NodeT > > > | DomTreeNodeMapType |
Protected Member Functions inherited from llvm::DominatorTreeBase< BasicBlock > | |
| void | reset () |
| 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) |
Protected Member Functions inherited from llvm::DominatorBase< NodeT > | |
| DominatorBase (bool isPostDom) | |
| DominatorBase (DominatorBase &&Arg) | |
| DominatorBase & | operator= (DominatorBase &&RHS) |
Protected Attributes inherited from llvm::DominatorTreeBase< BasicBlock > | |
| 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 |
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Definition at line 67 of file Dominators.h.
Definition at line 69 of file Dominators.h.
|
inline |
Definition at line 71 of file Dominators.h.
|
inline |
Definition at line 73 of file Dominators.h.
|
inline |
Returns false if the other dominator tree matches this dominator tree.
Definition at line 82 of file Dominators.h.
References llvm::DominatorTreeBase< BasicBlock >::compare(), llvm::DomTreeNodeBase< T >::getBlock(), llvm::DominatorTreeBase< BasicBlock >::getRootNode(), and llvm::DominatorTreeBase< N >::getRootNode().
Referenced by verifyDomTree().
| bool DominatorTree::dominates | ( | const Instruction * | Def, |
| const Use & | U | ||
| ) | const |
Return true if Def dominates a use in User.
This performs the special checks necessary if Def and User are in the same basic block. Note that Def doesn't dominate a use in Def itself!
Definition at line 214 of file Dominators.cpp.
References llvm::Instruction::getParent(), llvm::Use::getUser(), I, and isReachableFromEntry().
Referenced by blockDominatesAnExit(), llvm::LoopAccessInfo::blockNeedsPredication(), checkBasicSSA(), containsUnconditionalCallSafepoint(), dominates(), findBasePointers(), llvm::ScalarEvolution::getAddRecExpr(), getInsertPointForUses(), hoistBeforePos(), insertParsePoints(), isGuaranteedToExecute(), isKnownNonNullFromDominatingCondition(), llvm::isPotentiallyReachableFromMany(), IVUseShouldUsePostIncValue(), PickMostRelevantLoop(), processInstruction(), llvm::replaceDominatedUsesWith(), rewriteSingleStoreAlloca(), separateNestedLoop(), and ValueDominatesPHI().
| bool DominatorTree::dominates | ( | const Instruction * | Def, |
| const Instruction * | User | ||
| ) | const |
Definition at line 77 of file Dominators.cpp.
References llvm::BasicBlock::begin(), llvm::tgtok::Def, dominates(), llvm::Instruction::getParent(), I, and isReachableFromEntry().
| bool DominatorTree::dominates | ( | const Instruction * | Def, |
| const BasicBlock * | BB | ||
| ) | const |
Definition at line 114 of file Dominators.cpp.
References llvm::tgtok::Def, dominates(), llvm::dyn_cast(), llvm::InvokeInst::getNormalDest(), llvm::Instruction::getParent(), and isReachableFromEntry().
| bool DominatorTree::dominates | ( | const BasicBlockEdge & | BBE, |
| const Use & | U | ||
| ) | const |
Definition at line 191 of file Dominators.cpp.
References dominates(), llvm::dyn_cast(), llvm::BasicBlockEdge::getEnd(), llvm::BasicBlock::getParent(), llvm::BasicBlockEdge::getStart(), llvm::Use::getUser(), and llvm::BasicBlockEdge::isSingleEdge().
| bool DominatorTree::dominates | ( | const BasicBlockEdge & | BBE, |
| const BasicBlock * | BB | ||
| ) | const |
Definition at line 140 of file Dominators.cpp.
References dominates(), llvm::BasicBlockEdge::getEnd(), llvm::BasicBlock::getSinglePredecessor(), llvm::BasicBlockEdge::getStart(), llvm::BasicBlockEdge::isSingleEdge(), llvm::pred_begin(), and llvm::pred_end().
Provide an overload for a Use.
Definition at line 265 of file Dominators.cpp.
References llvm::dyn_cast(), llvm::Instruction::getParent(), llvm::Use::getUser(), and I.
Referenced by dominates(), FindUnconditionalPreds(), insertParsePoints(), llvm::Loop::isLCSSAForm(), llvm::isPotentiallyReachableFromMany(), llvm::PHITransAddr::PHITranslateValue(), sink(), and ValueDominatesPHI().
|
inline |
Definition at line 75 of file Dominators.h.
| void DominatorTree::verifyDomTree | ( | ) | const |
Verify the correctness of the domtree by re-computing it.
This should only be used for debugging as it aborts the program if the verification fails.
Definition at line 280 of file Dominators.cpp.
References compare(), llvm::errs(), F(), llvm::DominatorTreeBase< BasicBlock >::getRoot(), llvm::DominatorTreeBase< N >::print(), llvm::DominatorTreeBase< BasicBlock >::print(), and llvm::DominatorTreeBase< N >::recalculate().
Referenced by llvm::DominatorTreeWrapperPass::verifyAnalysis().
1.8.6