#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/Support/CommandLine.h"
usingnamespacellvm;
static cl::opt<unsigned> DefaultMaxBBsToExplore(
"dom-tree-reachability-max-bbs-to-explore", cl::Hidden,
cl::desc("Max number of BBs to explore for reachability analysis"),
cl::init(32));
void llvm::FindFunctionBackedges(const Function &F,
SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result) { … }
unsigned llvm::GetSuccessorNumber(const BasicBlock *BB,
const BasicBlock *Succ) { … }
bool llvm::isCriticalEdge(const Instruction *TI, unsigned SuccNum,
bool AllowIdenticalEdges) { … }
bool llvm::isCriticalEdge(const Instruction *TI, const BasicBlock *Dest,
bool AllowIdenticalEdges) { … }
static const Loop *getOutermostLoop(const LoopInfo *LI, const BasicBlock *BB) { … }
template <class StopSetT>
static bool isReachableImpl(SmallVectorImpl<BasicBlock *> &Worklist,
const StopSetT &StopSet,
const SmallPtrSetImpl<BasicBlock *> *ExclusionSet,
const DominatorTree *DT, const LoopInfo *LI) { … }
template <class T> class SingleEntrySet { … };
bool llvm::isPotentiallyReachableFromMany(
SmallVectorImpl<BasicBlock *> &Worklist, const BasicBlock *StopBB,
const SmallPtrSetImpl<BasicBlock *> *ExclusionSet, const DominatorTree *DT,
const LoopInfo *LI) { … }
bool llvm::isManyPotentiallyReachableFromMany(
SmallVectorImpl<BasicBlock *> &Worklist,
const SmallPtrSetImpl<const BasicBlock *> &StopSet,
const SmallPtrSetImpl<BasicBlock *> *ExclusionSet, const DominatorTree *DT,
const LoopInfo *LI) { … }
bool llvm::isPotentiallyReachable(
const BasicBlock *A, const BasicBlock *B,
const SmallPtrSetImpl<BasicBlock *> *ExclusionSet, const DominatorTree *DT,
const LoopInfo *LI) { … }
bool llvm::isPotentiallyReachable(
const Instruction *A, const Instruction *B,
const SmallPtrSetImpl<BasicBlock *> *ExclusionSet, const DominatorTree *DT,
const LoopInfo *LI) { … }