LLVM API Documentation
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 () | |
bool | compare (const DominatorTree &Other) const |
Returns *false* if the other dominator tree matches this dominator tree. | |
bool | dominates (const Instruction *Def, const Use &U) const |
Return true if Def dominates a use in User. | |
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. | |
void | verifyDomTree () const |
Verify the correctness of the domtree by re-computing it. |
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Definition at line 66 of file Dominators.h.
Definition at line 68 of file Dominators.h.
llvm::DominatorTree::DominatorTree | ( | ) | [inline] |
Definition at line 70 of file Dominators.h.
bool llvm::DominatorTree::compare | ( | const DominatorTree & | Other | ) | const [inline] |
Returns *false* if the other dominator tree matches this dominator tree.
Definition at line 74 of file Dominators.h.
References llvm::DominatorTreeBase< BasicBlock >::compare(), llvm::DomTreeNodeBase< NodeT >::getBlock(), llvm::DominatorTreeBase< BasicBlock >::getRootNode(), and llvm::DominatorTreeBase< NodeT >::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 217 of file Dominators.cpp.
References llvm::Instruction::getParent(), llvm::Use::getUser(), I, and isReachableFromEntry().
Referenced by blockDominatesAnExit(), dominates(), llvm::ScalarEvolution::getAddRecExpr(), getInsertPointForUses(), llvm::SCEVExpander::getIVIncOperand(), hoistBeforePos(), llvm::SCEVExpander::hoistIVInc(), llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(), llvm::ScalarEvolution::isLoopEntryGuardedByCond(), isPotentiallyReachableInner(), IVUseShouldUsePostIncValue(), llvm::PHITransAddr::PHITranslateValue(), PickMostRelevantLoop(), processInstruction(), rewriteSingleStoreAlloca(), separateNestedLoop(), and ValueDominatesPHI().
bool DominatorTree::dominates | ( | const Instruction * | Def, |
const Instruction * | User | ||
) | const |
Definition at line 80 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 117 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 194 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 143 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().
bool DominatorTree::isReachableFromEntry | ( | const Use & | U | ) | const |
Provide an overload for a Use.
Definition at line 268 of file Dominators.cpp.
References llvm::dyn_cast(), llvm::Instruction::getParent(), llvm::Use::getUser(), and I.
Referenced by dominates(), FindUnconditionalPreds(), llvm::Loop::isLCSSAForm(), isPotentiallyReachableInner(), and ValueDominatesPHI().
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 283 of file Dominators.cpp.
References compare(), llvm::errs(), F(), llvm::BasicBlock::getParent(), llvm::DominatorTreeBase< BasicBlock >::getRoot(), llvm::DominatorTreeBase< BasicBlock >::print(), llvm::DominatorTreeBase< NodeT >::print(), llvm::DominatorTreeBase< NodeT >::recalculate(), and VerifyDomInfo.
Referenced by llvm::DominatorTreeWrapperPass::verifyAnalysis().