40 cl::desc(
"Verify dominator info (time consuming)"));
44 unsigned NumEdgesToEnd = 0;
48 if (NumEdgesToEnd >= 2)
51 assert(NumEdgesToEnd == 1);
69 "Dominator Tree Construction",
true,
true)
82 OtherDT.
getBase().recalculate(F);
84 errs() <<
"DominatorTree is not up to date!\nComputed:\n";
86 errs() <<
"\nActual:\n";
120 if (isa<InvokeInst>(Def) || isa<PHINode>(User))
128 for (; &*I != Def && &*I != User; ++
I)
214 const Use &U)
const {
223 if (PN && PN->getParent() == BBE.
getEnd() &&
224 PN->getIncomingBlock(U) == BBE.
getStart())
231 UseBB = PN->getIncomingBlock(U);
238 const Use &U)
const {
246 if (
PHINode *PN = dyn_cast<PHINode>(UserInst))
247 UseBB = PN->getIncomingBlock(U);
264 if (
const InvokeInst *II = dyn_cast<InvokeInst>(Def)) {
278 if (isa<PHINode>(UserInst))
283 for (; &*I != Def && &*I != UserInst; ++
I)
286 return &*I != UserInst;
297 if (
PHINode *PN = dyn_cast<PHINode>(I))
static bool VerifyDomInfo
DominatorTreeBase< BasicBlock > * DT
The main container class for the LLVM Intermediate Representation.
bool isReachableFromEntry(const BasicBlock *A) const
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const BasicBlock * getStart() const
const Function * getParent() const
Return the enclosing method, or null if none.
TEMPLATE_INSTANTIATION(class DomTreeNodeBase< MachineBasicBlock >)
DominatorTreeBase< BasicBlock > & getBase()
BasicBlock * getNormalDest() const
unsigned getNumSuccessors() const
LLVM Basic Block Representation.
BasicBlock * getSuccessor(unsigned idx) const
Interval::pred_iterator pred_begin(Interval *I)
Interval::pred_iterator pred_end(Interval *I)
bool dominates(const DomTreeNode *A, const DomTreeNode *B) const
static cl::opt< bool, true > VerifyDomInfoX("verify-dom-info", cl::location(VerifyDomInfo), cl::desc("Verify dominator info (time consuming)"))
const BasicBlock * getEnd() const
INITIALIZE_PASS(DominatorTree,"domtree","Dominator Tree Construction", true, true) bool DominatorTree
virtual void print(raw_ostream &OS, const Module *M=0) const
BasicBlock * getRoot() const
BasicBlock * getSinglePredecessor()
Return this block if it has a single predecessor block. Otherwise return a null pointer.
bool compare(DominatorTree &Other) const
TerminatorInst * getTerminator()
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
virtual void verifyAnalysis() const
bool isSingleEdge() const
LocationClass< Ty > location(Ty &L)
const BasicBlock * getParent() const