30#ifndef BASICBLOCKGRAPH_H_
31#define BASICBLOCKGRAPH_H_
68 virtual const std::string
toString()
const;
85 std::vector<const SVFBasicBlock*>
succBBs;
86 std::vector<const SVFBasicBlock*>
predBBs;
171 this->succBBs.push_back(
succ);
172 succ->predBBs.push_back(
this);
187 this->predBBs.push_back(
pred);
188 pred->succBBs.push_back(
this);
217 std::vector<const SVFBasicBlock*> res;
220 res.push_back(
edge->getDstNode());
227 std::vector<const SVFBasicBlock*> res;
230 res.push_back(
edge->getSrcNode());
247 assert(
false &&
"Didn't find successor edge?");
259 assert(
false &&
"Didn't find successor edge?");
272 assert(
false &&
"Didn't find predecessor edge?");
284 assert(
false &&
"Didn't find predecessor edge?");
friend OutStream & operator<<(OutStream &o, const BasicBlockEdge &edge)
Overloading operator << for dumping ICFG node ID.
BasicBlockEdge(SVFBasicBlock *s, SVFBasicBlock *d)
Constructor.
virtual const std::string toString() const
~BasicBlockEdge()
Destructor.
SVFBasicBlock * addBasicBlock(const std::string &bbname)
BasicBlockGraph()
Constructor.
void addGNode(NodeID id, NodeType *node)
Add a Node.
const GEdgeSetTy & getOutEdges() const
const GEdgeSetTy & getInEdges() const
bool addIncomingEdge(EdgeType *inEdge)
Add incoming and outgoing edges.
bool addOutgoingEdge(EdgeType *outEdge)
static bool classof(const SVFValue *node)
u32_t getBBSuccessorPos(const SVFBasicBlock *Succ) const
const FunObjVar * getParent() const
SVFBasicBlock(NodeID id, const FunObjVar *f)
Constructor without name.
void setFun(const FunObjVar *f)
void addPredBasicBlock(const SVFBasicBlock *pred2)
std::vector< const SVFBasicBlock * > getPredecessors() const
const std::vector< const ICFGNode * > & getICFGNodeList() const
const FunObjVar * getFunction() const
const std::string toString() const
void addSuccBasicBlock(const SVFBasicBlock *succ2)
void addICFGNode(const ICFGNode *icfgNode)
Function where this BasicBlock is.
friend OutStream & operator<<(OutStream &o, const SVFBasicBlock &node)
const ICFGNode * front() const
std::vector< const SVFBasicBlock * > succBBs
u32_t getBBPredecessorPos(const SVFBasicBlock *succbb)
u32_t getBBPredecessorPos(const SVFBasicBlock *succbb) const
std::vector< constICFGNode * >::const_iterator const_iterator
std::vector< const ICFGNode * > allICFGNodes
all ICFGNodes in this BasicBlock
static bool classof(const SVFBasicBlock *node)
const_iterator end() const
const_iterator begin() const
u32_t getBBSuccessorPos(const SVFBasicBlock *Succ)
u32_t getNumSuccessors() const
std::vector< const SVFBasicBlock * > predBBs
const ICFGNode * back() const
std::vector< const SVFBasicBlock * > getSuccessors() const
GNodeK getNodeKind() const
Get node kind.
virtual void setName(const std::string &nameInfo)
GenericNode< SVFBasicBlock, BasicBlockEdge > GenericBasicBlockNodeTy
llvm::IRBuilder IRBuilder
GenericEdge< SVFBasicBlock > GenericBasicBlockEdgeTy
GenericGraph< SVFBasicBlock, BasicBlockEdge > GenericBasicBlockGraphTy