31#ifndef SVFLOOPANDDOMINFO_H
32#define SVFLOOPANDDOMINFO_H
47 typedef std::vector<const SVFBasicBlock*>
BBList;
85 assert(!
lp.empty() &&
"this is not a loop, empty basic block");
91 return std::find(
lp.begin(),
lp.end(), bb) !=
lp.end();
const Map< const SVFBasicBlock *, BBSet > & getPostDomTreeMap() const
const LoopBBs & getLoopInfo(const SVFBasicBlock *bb) const
const Map< const SVFBasicBlock *, BBSet > & getDomFrontierMap() const
Map< const SVFBasicBlock *, BBSet > & getDomTreeMap()
std::vector< const SVFBasicBlock * > BBList
Map< const SVFBasicBlock *, BBSet > dtBBsMap
map a BasicBlock to BasicBlocks it Dominates
bool dominate(const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
bool isLoopHeader(const SVFBasicBlock *bb) const
void getExitBlocksOfLoop(const SVFBasicBlock *bb, BBList &exitbbs) const
const SVFBasicBlock * findNearestCommonPDominator(const SVFBasicBlock *A, const SVFBasicBlock *B) const
find nearest common post dominator of two basic blocks
Map< const SVFBasicBlock *, BBSet > pdtBBsMap
map a BasicBlock to BasicBlocks it PostDominates
const Map< const SVFBasicBlock *, u32_t > & getBBPDomLevel() const
const BBList & getReachableBBs() const
Map< const SVFBasicBlock *, BBSet > & getPostDomTreeMap()
Map< const SVFBasicBlock *, u32_t > bb2PdomLevel
map a BasicBlock to its level in pdom tree, used in findNearestCommonPDominator
const Map< const SVFBasicBlock *, const SVFBasicBlock * > & getBB2PIdom() const
const Map< const SVFBasicBlock *, BBSet > & getDomTreeMap() const
Map< const SVFBasicBlock *, BBSet > & getDomFrontierMap()
bool isUnreachable(const SVFBasicBlock *bb) const
const SVFBasicBlock * getLoopHeader(const LoopBBs &lp) const
virtual ~SVFLoopAndDomInfo()
Map< const SVFBasicBlock *, const SVFBasicBlock * > bb2PIdom
map a BasicBlock to its immediate dominator in pdom tree, used in findNearestCommonPDominator
bool hasLoopInfo(const SVFBasicBlock *bb) const
void setReachableBBs(BBList &bbs)
Set< const SVFBasicBlock * > BBSet
Map< const SVFBasicBlock *, LoopBBs > bb2LoopMap
map a BasicBlock (if it is in a loop) to all the BasicBlocks in this loop
bool loopContainsBB(const LoopBBs &lp, const SVFBasicBlock *bb) const
Map< const SVFBasicBlock *, BBSet > dfBBsMap
map a BasicBlock to its Dominate Frontier BasicBlocks
void addToBB2LoopMap(const SVFBasicBlock *bb, const SVFBasicBlock *loopBB)
Map< const SVFBasicBlock *, const SVFBasicBlock * > & getBB2PIdom()
BBList reachableBBs
reachable BasicBlocks from the function entry.
bool postDominate(const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
Map< const SVFBasicBlock *, u32_t > & getBBPDomLevel()
llvm::IRBuilder IRBuilder