15 #ifndef LLVM_ANALYSIS_CFG_H
16 #define LLVM_ANALYSIS_CFG_H
37 SmallVectorImpl<std::pair<const BasicBlock *, const BasicBlock *> > &
50 bool AllowIdenticalEdges =
false);
68 const DominatorTree *DT =
nullptr,
69 const LoopInfo *LI =
nullptr);
78 const DominatorTree *DT =
nullptr,
79 const LoopInfo *LI =
nullptr);
90 const DominatorTree *DT =
nullptr,
91 const LoopInfo *LI =
nullptr);
unsigned GetSuccessorNumber(BasicBlock *BB, BasicBlock *Succ)
Search for the specified successor of basic block BB and return its position in the terminator instru...
bool isPotentiallyReachable(const Instruction *From, const Instruction *To, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
Determine whether instruction 'To' is reachable from 'From', returning true if uncertain.
void FindFunctionBackedges(const Function &F, SmallVectorImpl< std::pair< const BasicBlock *, const BasicBlock * > > &Result)
Analyze the specified function to find all of the loop backedges in the function and return them...
bool isPotentiallyReachableFromMany(SmallVectorImpl< BasicBlock * > &Worklist, BasicBlock *StopBB, const DominatorTree *DT=nullptr, const LoopInfo *LI=nullptr)
Determine whether there is at least one path from a block in 'Worklist' to 'StopBB', returning true if uncertain.
bool isCriticalEdge(const TerminatorInst *TI, unsigned SuccNum, bool AllowIdenticalEdges=false)
Return true if the specified edge is a critical edge.