6using namespace SVFUtil;
117 assert(
A &&
B &&
"Pointers are not valid");
118 assert(
A->getParent() ==
B->getParent() &&
119 "Two blocks are not in same function");
131 if (
lvA->second <
lvB->second) std::swap(
A,
B);
147 return blocks.front() == bb;
221 assert(
false &&
"Didn't find successor edge?");
234 assert(
false &&
"Didn't find successor edge?");
250 assert(
false &&
"Didn't find predecessor edge?");
262 assert(
false &&
"Didn't find predecessor edge?");
275 assert(
"SVFValue::toString should be implemented or supported by fronted" &&
false);
282 assert(
"SVFBaseNode::valueOnlyToString should be implemented or supported by fronted" &&
false);
const std::string valueOnlyToString() const
u32_t getBBPredecessorPos(const SVFBasicBlock *succbb)
std::vector< const SVFBasicBlock * > succBBs
all successor BasicBlocks of this BasicBlock
u32_t getBBSuccessorPos(const SVFBasicBlock *succbb)
~SVFBasicBlock() override
const SVFArgument * getArg(u32_t idx) const
bool varArg
return true if this function never returns
SVFBasicBlock * exitBlock
all formal arguments of this function
std::vector< const SVFArgument * > allArgs
all BasicBlocks of this function
bool hasBasicBlock() const
std::vector< const SVFBasicBlock * > allBBs
the definition of a function across multiple modules
void setExitBlock(SVFBasicBlock *bb)
const SVFBasicBlock * getExitBB() const
SVFLoopAndDomInfo * loopAndDom
FunctionType, which is different from the type (PointerType) of this SVFFunction.
SVFInstruction(void)=delete
const Map< const SVFBasicBlock *, BBSet > & getPostDomTreeMap() const
const LoopBBs & getLoopInfo(const SVFBasicBlock *bb) 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
const Map< const SVFBasicBlock *, u32_t > & getBBPDomLevel() const
const Map< const SVFBasicBlock *, const SVFBasicBlock * > & getBB2PIdom() const
bool isUnreachable(const SVFBasicBlock *bb) const
bool hasLoopInfo(const SVFBasicBlock *bb) const
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 postDominate(const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
std::string toString() const
Needs to be implemented by a SVF front end.
const SVFType * getOriginalElemType(u32_t fldIdx) const
std::vector< u32_t > fldIdxVec
flattened field indices of a struct (ignoring arrays)
std::vector< u32_t > elemIdxVec
void addFldWithType(u32_t fldIdx, const SVFType *type, u32_t elemIdx)
Add field index and element index and their corresponding type.
Map< u32_t, const SVFType * > fldIdx2TypeMap
Types of all fields of a struct.
__attribute__((weak)) std
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
llvm::IRBuilder IRBuilder