103{
104 for (const auto &llvmLoop: llvmLoops)
105 {
107
110 for (const auto &BB: llvmLoop->getBlocks())
111 {
112 for (const auto &ins: *BB)
113 {
115 continue;
118 }
119 }
121 for (
const auto &node:
nodes)
122 {
124 }
125
126 BasicBlock* header_blk = llvmLoop->getHeader();
128
130 {
131 in_ins = in_ins->getNextNode();
132 }
135 {
136 if (loop_ids.find(edge->getSrcNode()) == loop_ids.end())
137 {
138
141 }
142 else
143 {
144
147 }
148 }
149
150 llvm::Instruction &br_ins = header_blk->back();
153 {
154 if (loop_ids.find(edge->getDstNode()) != loop_ids.end())
155 {
158 }
159 else
160 {
161 continue;
162 }
163 }
164
165 llvm::SmallVector<BasicBlock*, 8> ExitBlocks;
166 llvmLoop->getExitBlocks(ExitBlocks);
167 for (const auto& exit_blk: ExitBlocks)
168 {
169 assert(!exit_blk->empty() && "exit block is empty?");
170 llvm::Instruction* out_ins = &(*exit_blk->begin());
171
173 {
174 out_ins = out_ins->getNextNode();
175 }
176
178 for (
const auto &edge: out_node->
getInEdges())
179 {
182 }
183 }
184 }
185}
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
const GEdgeSetTy & getOutEdges() const
const GEdgeSetTy & getInEdges() const
void addNodeToSVFLoop(const ICFGNode *node, const SVFLoop *loop)
Insert (node, loop) to icfgNodeToSVFLoopVec.
ICFGNode * getICFGNode(const Instruction *inst)
Get a basic block ICFGNode.
static const Option< u32_t > LoopBound
void addBackICFGEdge(const ICFGEdge *edge)
void addOutICFGEdge(const ICFGEdge *edge)
void addEntryICFGEdge(const ICFGEdge *edge)
void addInICFGEdge(const ICFGEdge *edge)
bool isIntrinsicInst(const Instruction *inst)
Return true if it is an intrinsic instruction.
std::ostream & outs()
Overwrite llvm::outs().
llvm::BasicBlock BasicBlock
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
llvm::Instruction Instruction
iter_range< typename GenericGraphTraits< GraphType >::nodes_iterator > nodes(const GraphType &G)