svf-tools 1.0.342 → 1.0.343
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +10 -9
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +8 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +17 -14
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +16 -16
- package/lib/Graphs/ICFG.cpp +14 -9
- package/lib/SVF-FE/ICFGBuilder.cpp +16 -10
- package/package.json +1 -1
|
@@ -1680,9 +1680,12 @@ Additional Inherited Members</h2></td></tr>
|
|
|
1680
1680
|
|
|
1681
1681
|
<p>update <a class="el" href="classSVF_1_1ICFG.html">ICFG</a> for indirect calls </p>
|
|
1682
1682
|
<p>Update <a class="el" href="classSVF_1_1ICFG.html">ICFG</a> for indirect calls </p>
|
|
1683
|
+
<p>if this is an external function (no function body), connect calleeEntryNode to calleeExitNode</p>
|
|
1684
|
+
<p>Remove callBlockNode to retBlockNode intraICFGEdge since we found at least one inter procedural edge </p>
|
|
1683
1685
|
|
|
1684
1686
|
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00426">426</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
1685
|
-
<div class="fragment"><div class="line"><a name="l00427"></a><span class="lineno"> 427</span> {</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  PTACallGraph::CallEdgeMap::const_iterator iter = callgraph-><a class="code" href="classSVF_1_1PTACallGraph.html#ad49fa2a288945f6910deb11acdf6a42d">getIndCallMap</a>().begin();</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  PTACallGraph::CallEdgeMap::const_iterator eiter = callgraph-><a class="code" href="classSVF_1_1PTACallGraph.html#ad49fa2a288945f6910deb11acdf6a42d">getIndCallMap</a>().end();</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">for</span> (; iter != eiter; iter++)</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  {</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>* callBlock = iter->first;</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* cs = callBlock-><a class="code" href="classSVF_1_1CallBlockNode.html#ad3d50024efcfa94b1246c982b43aff2f">getCallSite</a>();</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(callBlock-><a class="code" href="classSVF_1_1CallBlockNode.html#a285c517dfd7fee5467606663a0fdd035">isIndirectCall</a>() && <span class="stringliteral">"this is not an indirect call?"</span>);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1PTACallGraph.html#a5f5a5ec7e707a21994d301cc07d32a5a">PTACallGraph::FunctionSet</a> & functions = iter->second;</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">for</span> (PTACallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  {</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* callee = *func_iter;</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>*
|
|
1687
|
+
<div class="fragment"><div class="line"><a name="l00427"></a><span class="lineno"> 427</span> {</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  PTACallGraph::CallEdgeMap::const_iterator iter = callgraph-><a class="code" href="classSVF_1_1PTACallGraph.html#ad49fa2a288945f6910deb11acdf6a42d">getIndCallMap</a>().begin();</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  PTACallGraph::CallEdgeMap::const_iterator eiter = callgraph-><a class="code" href="classSVF_1_1PTACallGraph.html#ad49fa2a288945f6910deb11acdf6a42d">getIndCallMap</a>().end();</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">for</span> (; iter != eiter; iter++)</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  {</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>* callBlock = iter->first;</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* cs = callBlock-><a class="code" href="classSVF_1_1CallBlockNode.html#ad3d50024efcfa94b1246c982b43aff2f">getCallSite</a>();</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(callBlock-><a class="code" href="classSVF_1_1CallBlockNode.html#a285c517dfd7fee5467606663a0fdd035">isIndirectCall</a>() && <span class="stringliteral">"this is not an indirect call?"</span>);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1PTACallGraph.html#a5f5a5ec7e707a21994d301cc07d32a5a">PTACallGraph::FunctionSet</a> & functions = iter->second;</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">for</span> (PTACallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  {</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* callee = *func_iter;</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>* callBlockNode = <a class="code" href="classSVF_1_1ICFG.html#a7d10e8a815c836a070d35850f817a18c">getCallBlockNode</a>(cs);</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <a class="code" href="classSVF_1_1RetBlockNode.html">RetBlockNode</a>* retBlockNode = <a class="code" href="classSVF_1_1ICFG.html#a6d66c83cb1656d0f8ec8b8b65a9e9c41">getRetBlockNode</a>(cs);</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <a class="code" href="classSVF_1_1FunEntryBlockNode.html">FunEntryBlockNode</a>* calleeEntryNode = <a class="code" href="classSVF_1_1ICFG.html#a5d75af18ed4228b89a4bb4e2b0b97925">getFunEntryICFGNode</a>(callee);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a>* calleeExitNode = <a class="code" href="classSVF_1_1ICFG.html#a63479291b885344630ebf024d537ac19">getFunExitICFGNode</a>(callee);</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <a class="code" href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">addCallEdge</a>(callBlockNode, calleeEntryNode, cs);</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <a class="code" href="classSVF_1_1ICFG.html#a4a44849b596c89ab14d2e5f18366e848">addRetEdge</a>(calleeExitNode, retBlockNode, cs);</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span> </div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">isExtCall</a>(callee))</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  <a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(calleeEntryNode, calleeExitNode); </div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span> </div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = <a class="code" href="classSVF_1_1ICFG.html#aa662baae5682ef6ec5084fa4147c9709">hasIntraICFGEdge</a>(callBlockNode,retBlockNode, <a class="code" href="classSVF_1_1ICFGEdge.html#a395c34788e98950bc43e8cb44313e429acb8fba7c61b08ec952f1b65643d7a84b">ICFGEdge::IntraCF</a>))</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <a class="code" href="classSVF_1_1ICFG.html#a534625b10673efe5b0f344bfebf9b3cf">removeICFGEdge</a>(edge);</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  }</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  }</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span> }</div><div class="ttc" id="classSVF_1_1ICFG_html_abde033687317d47909ee45db7501723f"><div class="ttname"><a href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">SVF::ICFG::addCallEdge</a></div><div class="ttdeci">ICFGEdge * addCallEdge(ICFGNode *srcNode, ICFGNode *dstNode, const Instruction *cs)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00375">ICFG.cpp:375</a></div></div>
|
|
1688
|
+
<div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00042">ICFGEdge.h:42</a></div></div>
|
|
1686
1689
|
<div class="ttc" id="classSVF_1_1ICFG_html_a5d75af18ed4228b89a4bb4e2b0b97925"><div class="ttname"><a href="classSVF_1_1ICFG.html#a5d75af18ed4228b89a4bb4e2b0b97925">SVF::ICFG::getFunEntryICFGNode</a></div><div class="ttdeci">FunEntryBlockNode * getFunEntryICFGNode(const SVFFunction *fun)</div><div class="ttdoc">Get/Add a function entry node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00203">ICFG.h:203</a></div></div>
|
|
1687
1690
|
<div class="ttc" id="classSVF_1_1ICFG_html_a7d10e8a815c836a070d35850f817a18c"><div class="ttname"><a href="classSVF_1_1ICFG.html#a7d10e8a815c836a070d35850f817a18c">SVF::ICFG::getCallBlockNode</a></div><div class="ttdeci">CallBlockNode * getCallBlockNode(const Instruction *inst)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00209">ICFG.cpp:209</a></div></div>
|
|
1688
1691
|
<div class="ttc" id="classSVF_1_1PTACallGraph_html_ad49fa2a288945f6910deb11acdf6a42d"><div class="ttname"><a href="classSVF_1_1PTACallGraph.html#ad49fa2a288945f6910deb11acdf6a42d">SVF::PTACallGraph::getIndCallMap</a></div><div class="ttdeci">CallEdgeMap & getIndCallMap()</div><div class="ttdoc">Get callees from an indirect callsite. </div><div class="ttdef"><b>Definition:</b> <a href="PTACallGraph_8h_source.html#l00280">PTACallGraph.h:280</a></div></div>
|
|
@@ -1690,15 +1693,19 @@ Additional Inherited Members</h2></td></tr>
|
|
|
1690
1693
|
<div class="ttc" id="classSVF_1_1PTACallGraph_html_a5f5a5ec7e707a21994d301cc07d32a5a"><div class="ttname"><a href="classSVF_1_1PTACallGraph.html#a5f5a5ec7e707a21994d301cc07d32a5a">SVF::PTACallGraph::FunctionSet</a></div><div class="ttdeci">Set< const SVFFunction * > FunctionSet</div><div class="ttdef"><b>Definition:</b> <a href="PTACallGraph_8h_source.html#l00228">PTACallGraph.h:228</a></div></div>
|
|
1691
1694
|
<div class="ttc" id="classSVF_1_1SVFFunction_html"><div class="ttname"><a href="classSVF_1_1SVFFunction.html">SVF::SVFFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00233">BasicTypes.h:233</a></div></div>
|
|
1692
1695
|
<div class="ttc" id="classSVF_1_1FunEntryBlockNode_html"><div class="ttname"><a href="classSVF_1_1FunEntryBlockNode.html">SVF::FunEntryBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00251">ICFGNode.h:251</a></div></div>
|
|
1696
|
+
<div class="ttc" id="classSVF_1_1ICFG_html_a534625b10673efe5b0f344bfebf9b3cf"><div class="ttname"><a href="classSVF_1_1ICFG.html#a534625b10673efe5b0f344bfebf9b3cf">SVF::ICFG::removeICFGEdge</a></div><div class="ttdeci">void removeICFGEdge(ICFGEdge *edge)</div><div class="ttdoc">Remove a SVFG edge. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00116">ICFG.h:116</a></div></div>
|
|
1693
1697
|
<div class="ttc" id="namespaceSVF_html_a7875172ff434b2210eea7cecfbbd959e"><div class="ttname"><a href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">SVF::Instruction</a></div><div class="ttdeci">llvm::Instruction Instruction</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00079">BasicTypes.h:79</a></div></div>
|
|
1694
1698
|
<div class="ttc" id="classSVF_1_1RetBlockNode_html"><div class="ttname"><a href="classSVF_1_1RetBlockNode.html">SVF::RetBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00459">ICFGNode.h:459</a></div></div>
|
|
1695
1699
|
<div class="ttc" id="classSVF_1_1ICFG_html_a4a44849b596c89ab14d2e5f18366e848"><div class="ttname"><a href="classSVF_1_1ICFG.html#a4a44849b596c89ab14d2e5f18366e848">SVF::ICFG::addRetEdge</a></div><div class="ttdeci">ICFGEdge * addRetEdge(ICFGNode *srcNode, ICFGNode *dstNode, const Instruction *cs)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00392">ICFG.cpp:392</a></div></div>
|
|
1696
1700
|
<div class="ttc" id="classSVF_1_1FunExitBlockNode_html"><div class="ttname"><a href="classSVF_1_1FunExitBlockNode.html">SVF::FunExitBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00308">ICFGNode.h:308</a></div></div>
|
|
1701
|
+
<div class="ttc" id="classSVF_1_1ICFGEdge_html_a395c34788e98950bc43e8cb44313e429acb8fba7c61b08ec952f1b65643d7a84b"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html#a395c34788e98950bc43e8cb44313e429acb8fba7c61b08ec952f1b65643d7a84b">SVF::ICFGEdge::IntraCF</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00051">ICFGEdge.h:51</a></div></div>
|
|
1697
1702
|
<div class="ttc" id="classSVF_1_1CallBlockNode_html_a285c517dfd7fee5467606663a0fdd035"><div class="ttname"><a href="classSVF_1_1CallBlockNode.html#a285c517dfd7fee5467606663a0fdd035">SVF::CallBlockNode::isIndirectCall</a></div><div class="ttdeci">bool isIndirectCall() const</div><div class="ttdoc">Return true if this is an indirect call. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00412">ICFGNode.h:412</a></div></div>
|
|
1703
|
+
<div class="ttc" id="classSVF_1_1ICFG_html_aa662baae5682ef6ec5084fa4147c9709"><div class="ttname"><a href="classSVF_1_1ICFG.html#aa662baae5682ef6ec5084fa4147c9709">SVF::ICFG::hasIntraICFGEdge</a></div><div class="ttdeci">ICFGEdge * hasIntraICFGEdge(ICFGNode *src, ICFGNode *dst, ICFGEdge::ICFGEdgeK kind)</div><div class="ttdoc">Whether we has a SVFG edge. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00263">ICFG.cpp:263</a></div></div>
|
|
1698
1704
|
<div class="ttc" id="classSVF_1_1ICFG_html_a63479291b885344630ebf024d537ac19"><div class="ttname"><a href="classSVF_1_1ICFG.html#a63479291b885344630ebf024d537ac19">SVF::ICFG::getFunExitICFGNode</a></div><div class="ttdeci">FunExitBlockNode * getFunExitICFGNode(const SVFFunction *fun)</div><div class="ttdoc">Get/Add a function exit node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8h_source.html#l00219">ICFG.h:219</a></div></div>
|
|
1699
1705
|
<div class="ttc" id="classSVF_1_1CallBlockNode_html_ad3d50024efcfa94b1246c982b43aff2f"><div class="ttname"><a href="classSVF_1_1CallBlockNode.html#ad3d50024efcfa94b1246c982b43aff2f">SVF::CallBlockNode::getCallSite</a></div><div class="ttdeci">const Instruction * getCallSite() const</div><div class="ttdoc">Return callsite. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00381">ICFGNode.h:381</a></div></div>
|
|
1700
1706
|
<div class="ttc" id="classSVF_1_1ICFG_html_a6d66c83cb1656d0f8ec8b8b65a9e9c41"><div class="ttname"><a href="classSVF_1_1ICFG.html#a6d66c83cb1656d0f8ec8b8b65a9e9c41">SVF::ICFG::getRetBlockNode</a></div><div class="ttdeci">RetBlockNode * getRetBlockNode(const Instruction *inst)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00222">ICFG.cpp:222</a></div></div>
|
|
1701
1707
|
<div class="ttc" id="classSVF_1_1CallBlockNode_html"><div class="ttname"><a href="classSVF_1_1CallBlockNode.html">SVF::CallBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00364">ICFGNode.h:364</a></div></div>
|
|
1708
|
+
<div class="ttc" id="classSVF_1_1ICFG_html_adafd8bbb91507a9a78a3f16305812afc"><div class="ttname"><a href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">SVF::ICFG::addIntraEdge</a></div><div class="ttdeci">ICFGEdge * addIntraEdge(ICFGNode *srcNode, ICFGNode *dstNode)</div><div class="ttdoc">Add control-flow edges for top level pointers. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00337">ICFG.cpp:337</a></div></div>
|
|
1702
1709
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a22ef185e767ff76c098e75126c885400"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">SVF::SVFUtil::isExtCall</a></div><div class="ttdeci">bool isExtCall(const SVFFunction *fun)</div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00063">LLVMUtil.h:63</a></div></div>
|
|
1703
1710
|
</div><!-- fragment -->
|
|
1704
1711
|
</div>
|
|
@@ -245,9 +245,12 @@ Private Attributes</h2></td></tr>
|
|
|
245
245
|
|
|
246
246
|
<p>Create edges between <a class="el" href="classSVF_1_1ICFG.html">ICFG</a> nodes across functions. </p>
|
|
247
247
|
<p>Create edges between <a class="el" href="classSVF_1_1ICFG.html">ICFG</a> nodes across functions </p>
|
|
248
|
+
<p>direct call</p>
|
|
249
|
+
<p>if this is an external function (no function body)</p>
|
|
250
|
+
<p>indirect call (don't know callee) </p>
|
|
248
251
|
|
|
249
|
-
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#
|
|
250
|
-
<div class="fragment"><div class="line"><a name="
|
|
252
|
+
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00172">172</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
253
|
+
<div class="fragment"><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>* <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a> = <a class="code" href="classSVF_1_1ICFGBuilder.html#ae9958bebe253db187d403929bc508eac">getOrAddCallICFGNode</a>(cs);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classSVF_1_1RetBlockNode.html">RetBlockNode</a>* retBlockNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a2f89ca8d506f90f0b90d18b0f63d8481">getOrAddRetICFGNode</a>(cs);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">if</span>(callee){</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="classSVF_1_1FunEntryBlockNode.html">FunEntryBlockNode</a>* calleeEntryNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#ae1ef14cdda27a2062c4c454750444108">getFunEntryBlockNode</a>(callee);</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a>* calleeExitNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#aa33426d57dc150956902945a17a29bcb">getFunExitBlockNode</a>(callee);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">addCallEdge</a>(CallBlockNode, calleeEntryNode, cs);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a4a44849b596c89ab14d2e5f18366e848">addRetEdge</a>(calleeExitNode, retBlockNode, cs);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">isExtCall</a>(callee))</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  {</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(calleeEntryNode, calleeExitNode); </div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  }</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  }</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordflow">else</span>{</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(CallBlockNode, retBlockNode); </div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> }</div><div class="ttc" id="classSVF_1_1ICFG_html_abde033687317d47909ee45db7501723f"><div class="ttname"><a href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">SVF::ICFG::addCallEdge</a></div><div class="ttdeci">ICFGEdge * addCallEdge(ICFGNode *srcNode, ICFGNode *dstNode, const Instruction *cs)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00375">ICFG.cpp:375</a></div></div>
|
|
251
254
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a2f89ca8d506f90f0b90d18b0f63d8481"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a2f89ca8d506f90f0b90d18b0f63d8481">SVF::ICFGBuilder::getOrAddRetICFGNode</a></div><div class="ttdeci">RetBlockNode * getOrAddRetICFGNode(const Instruction *cs)</div><div class="ttdoc">Add a return node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00092">ICFGBuilder.h:92</a></div></div>
|
|
252
255
|
<div class="ttc" id="classSVF_1_1FunEntryBlockNode_html"><div class="ttname"><a href="classSVF_1_1FunEntryBlockNode.html">SVF::FunEntryBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00251">ICFGNode.h:251</a></div></div>
|
|
253
256
|
<div class="ttc" id="classSVF_1_1RetBlockNode_html"><div class="ttname"><a href="classSVF_1_1RetBlockNode.html">SVF::RetBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00459">ICFGNode.h:459</a></div></div>
|
|
@@ -257,6 +260,7 @@ Private Attributes</h2></td></tr>
|
|
|
257
260
|
<div class="ttc" id="classSVF_1_1ICFG_html_ae1ef14cdda27a2062c4c454750444108"><div class="ttname"><a href="classSVF_1_1ICFG.html#ae1ef14cdda27a2062c4c454750444108">SVF::ICFG::getFunEntryBlockNode</a></div><div class="ttdeci">FunEntryBlockNode * getFunEntryBlockNode(const SVFFunction *fun)</div><div class="ttdoc">Add a function entry node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00242">ICFG.cpp:242</a></div></div>
|
|
258
261
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_adefeaad9c02000f263430dfee7149ea6"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">SVF::ICFGBuilder::icfg</a></div><div class="ttdeci">ICFG * icfg</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00048">ICFGBuilder.h:48</a></div></div>
|
|
259
262
|
<div class="ttc" id="classSVF_1_1CallBlockNode_html"><div class="ttname"><a href="classSVF_1_1CallBlockNode.html">SVF::CallBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00364">ICFGNode.h:364</a></div></div>
|
|
263
|
+
<div class="ttc" id="classSVF_1_1ICFG_html_adafd8bbb91507a9a78a3f16305812afc"><div class="ttname"><a href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">SVF::ICFG::addIntraEdge</a></div><div class="ttdeci">ICFGEdge * addIntraEdge(ICFGNode *srcNode, ICFGNode *dstNode)</div><div class="ttdoc">Add control-flow edges for top level pointers. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00337">ICFG.cpp:337</a></div></div>
|
|
260
264
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a22ef185e767ff76c098e75126c885400"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">SVF::SVFUtil::isExtCall</a></div><div class="ttdeci">bool isExtCall(const SVFFunction *fun)</div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00063">LLVMUtil.h:63</a></div></div>
|
|
261
265
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_ae9958bebe253db187d403929bc508eac"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#ae9958bebe253db187d403929bc508eac">SVF::ICFGBuilder::getOrAddCallICFGNode</a></div><div class="ttdeci">CallBlockNode * getOrAddCallICFGNode(const Instruction *cs)</div><div class="ttdoc">Add a call node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00087">ICFGBuilder.h:87</a></div></div>
|
|
262
266
|
</div><!-- fragment -->
|
|
@@ -284,8 +288,8 @@ Private Attributes</h2></td></tr>
|
|
|
284
288
|
<div class="ttc" id="classSVF_1_1SVFFunction_html"><div class="ttname"><a href="classSVF_1_1SVFFunction.html">SVF::SVFFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00233">BasicTypes.h:233</a></div></div>
|
|
285
289
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a2dc4467008cdd6eb896e98b67457082a"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a2dc4467008cdd6eb896e98b67457082a">SVF::ICFGBuilder::WorkList</a></div><div class="ttdeci">FIFOWorkList< const Instruction * > WorkList</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00051">ICFGBuilder.h:51</a></div></div>
|
|
286
290
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_ab1cc5de5c2ee7acf83e9ae51c7b38cb5"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#ab1cc5de5c2ee7acf83e9ae51c7b38cb5">SVF::ICFGBuilder::processFunBody</a></div><div class="ttdeci">void processFunBody(WorkList &worklist)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00080">ICFGBuilder.cpp:80</a></div></div>
|
|
287
|
-
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a21ecc610b7ac35f4e64b2a4a45688359"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a21ecc610b7ac35f4e64b2a4a45688359">SVF::ICFGBuilder::processFunExit</a></div><div class="ttdeci">void processFunExit(const SVFFunction *fun)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#
|
|
288
|
-
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a05539eb12b22886ea4b5b4275f601641"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a05539eb12b22886ea4b5b4275f601641">SVF::ICFGBuilder::connectGlobalToProgEntry</a></div><div class="ttdeci">void connectGlobalToProgEntry(SVFModule *svfModule)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#
|
|
291
|
+
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a21ecc610b7ac35f4e64b2a4a45688359"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a21ecc610b7ac35f4e64b2a4a45688359">SVF::ICFGBuilder::processFunExit</a></div><div class="ttdeci">void processFunExit(const SVFFunction *fun)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00139">ICFGBuilder.cpp:139</a></div></div>
|
|
292
|
+
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a05539eb12b22886ea4b5b4275f601641"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a05539eb12b22886ea4b5b4275f601641">SVF::ICFGBuilder::connectGlobalToProgEntry</a></div><div class="ttdeci">void connectGlobalToProgEntry(SVFModule *svfModule)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00197">ICFGBuilder.cpp:197</a></div></div>
|
|
289
293
|
<div class="ttc" id="classSVF_1_1SVFModule_html_a58d03edb6ff85f4943135478f113df31"><div class="ttname"><a href="classSVF_1_1SVFModule.html#a58d03edb6ff85f4943135478f113df31">SVF::SVFModule::end</a></div><div class="ttdeci">iterator end()</div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00155">SVFModule.h:155</a></div></div>
|
|
290
294
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a52e6426f0a1af479159f6fbac6d5b8f4"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a52e6426f0a1af479159f6fbac6d5b8f4">SVF::ICFGBuilder::processFunEntry</a></div><div class="ttdeci">void processFunEntry(const SVFFunction *fun, WorkList &worklist)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00059">ICFGBuilder.cpp:59</a></div></div>
|
|
291
295
|
<div class="ttc" id="classSVF_1_1SVFModule_html_afcf2978f32e15127fb093405dc17d7f1"><div class="ttname"><a href="classSVF_1_1SVFModule.html#afcf2978f32e15127fb093405dc17d7f1">SVF::SVFModule::const_iterator</a></div><div class="ttdeci">FunctionSetType::const_iterator const_iterator</div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00052">SVFModule.h:52</a></div></div>
|
|
@@ -318,8 +322,8 @@ Private Attributes</h2></td></tr>
|
|
|
318
322
|
</div><div class="memdoc">
|
|
319
323
|
<p>Return back if the main function is not found, the bc file might be a library only </p>
|
|
320
324
|
|
|
321
|
-
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#
|
|
322
|
-
<div class="fragment"><div class="line"><a name="
|
|
325
|
+
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00197">197</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
326
|
+
<div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno"> 198</span> {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* mainFunc = <a class="code" href="namespaceSVF_1_1SVFUtil.html#aa8017e3e5100b3f63ee338b66118d266">SVFUtil::getProgEntryFunction</a>(svfModule);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">if</span>(mainFunc == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="classSVF_1_1FunEntryBlockNode.html">FunEntryBlockNode</a>* entryNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#ae1ef14cdda27a2062c4c454750444108">getFunEntryBlockNode</a>(mainFunc);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <a class="code" href="classSVF_1_1GlobalBlockNode.html">GlobalBlockNode</a>* globalNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#ae3b8f1b45c75b5fc231da76d3a49ad57">getGlobalBlockNode</a>();</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> </div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  std::vector<ICFGEdge*> toBeRemovedEdges;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">for</span>(<a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge : entryNode-><a class="code" href="classSVF_1_1GenericNode.html#a2d9cd758d6f8c5189d9b90b74f43e009">getOutEdges</a>())</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  toBeRemovedEdges.push_back(edge);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  </div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">for</span>(<a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge : toBeRemovedEdges){</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(SVFUtil::isa<IntraCFGEdge>(edge) && <span class="stringliteral">"the outgoing edge of FunEntryBlockNode is not an intraCFGEdge?"</span>);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a534625b10673efe5b0f344bfebf9b3cf">removeICFGEdge</a>(edge);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>* intraEdge = <span class="keyword">new</span> <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>(globalNode, edge->getDstNode());</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a462f590c2604184d69e4efe3d85a7b5b">addICFGEdge</a>(intraEdge); </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  }</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>* intraEdge = <span class="keyword">new</span> <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>(entryNode, globalNode);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a462f590c2604184d69e4efe3d85a7b5b">addICFGEdge</a>(intraEdge);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> }</div><div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00042">ICFGEdge.h:42</a></div></div>
|
|
323
327
|
<div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
324
328
|
<div class="ttc" id="classSVF_1_1SVFFunction_html"><div class="ttname"><a href="classSVF_1_1SVFFunction.html">SVF::SVFFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00233">BasicTypes.h:233</a></div></div>
|
|
325
329
|
<div class="ttc" id="classSVF_1_1GlobalBlockNode_html"><div class="ttname"><a href="classSVF_1_1GlobalBlockNode.html">SVF::GlobalBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00142">ICFGNode.h:142</a></div></div>
|
|
@@ -363,7 +367,7 @@ Private Attributes</h2></td></tr>
|
|
|
363
367
|
|
|
364
368
|
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8h_source.html#l00075">75</a> of file <a class="el" href="ICFGBuilder_8h_source.html">ICFGBuilder.h</a>.</p>
|
|
365
369
|
<div class="fragment"><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">if</span>(<a class="code" href="namespaceSVF_1_1SVFUtil.html#a8d8216a92140d982303f83ea424ddc91">SVFUtil::isNonInstricCallSite</a>(inst))</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ICFGBuilder.html#a1fe9bfb1f0cb64fba6b54d598b6d7a74">getOrAddInterBlockICFGNode</a>(inst);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ICFGBuilder.html#a28bcef712806344a3bcd664ef3d1e48b">getOrAddIntraBlockICFGNode</a>(inst);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div><div class="ttc" id="classSVF_1_1ICFGBuilder_html_a28bcef712806344a3bcd664ef3d1e48b"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a28bcef712806344a3bcd664ef3d1e48b">SVF::ICFGBuilder::getOrAddIntraBlockICFGNode</a></div><div class="ttdeci">IntraBlockNode * getOrAddIntraBlockICFGNode(const Instruction *inst)</div><div class="ttdoc">Add and get IntraBlock ICFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00098">ICFGBuilder.h:98</a></div></div>
|
|
366
|
-
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a1fe9bfb1f0cb64fba6b54d598b6d7a74"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a1fe9bfb1f0cb64fba6b54d598b6d7a74">SVF::ICFGBuilder::getOrAddInterBlockICFGNode</a></div><div class="ttdeci">InterBlockNode * getOrAddInterBlockICFGNode(const Instruction *inst)</div><div class="ttdoc">Add/Get an inter block ICFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#
|
|
370
|
+
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a1fe9bfb1f0cb64fba6b54d598b6d7a74"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a1fe9bfb1f0cb64fba6b54d598b6d7a74">SVF::ICFGBuilder::getOrAddInterBlockICFGNode</a></div><div class="ttdeci">InterBlockNode * getOrAddInterBlockICFGNode(const Instruction *inst)</div><div class="ttdoc">Add/Get an inter block ICFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00160">ICFGBuilder.cpp:160</a></div></div>
|
|
367
371
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a8d8216a92140d982303f83ea424ddc91"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a8d8216a92140d982303f83ea424ddc91">SVF::SVFUtil::isNonInstricCallSite</a></div><div class="ttdeci">bool isNonInstricCallSite(const Instruction *inst)</div><div class="ttdoc">Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls...</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00206">SVFUtil.h:206</a></div></div>
|
|
368
372
|
</div><!-- fragment -->
|
|
369
373
|
</div>
|
|
@@ -427,14 +431,13 @@ Private Attributes</h2></td></tr>
|
|
|
427
431
|
<p>Add/Get an inter block <a class="el" href="classSVF_1_1ICFGNode.html">ICFGNode</a>. </p>
|
|
428
432
|
<p>(1) Add and get CallBlockICFGNode (2) Handle call instruction by creating interprocedural edges </p>
|
|
429
433
|
|
|
430
|
-
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#
|
|
431
|
-
<div class="fragment"><div class="line"><a name="
|
|
434
|
+
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00160">160</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
435
|
+
<div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<a class="code" href="namespaceSVF_1_1SVFUtil.html#a2e08ce822223842fa6a73fd659b1a526">SVFUtil::isCallSite</a>(inst) && <span class="stringliteral">"not a call instruction?"</span>);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<a class="code" href="namespaceSVF_1_1SVFUtil.html#a8d8216a92140d982303f83ea424ddc91">SVFUtil::isNonInstricCallSite</a>(inst) && <span class="stringliteral">"associating an intrinsic debug instruction with an ICFGNode!"</span>);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classSVF_1_1CallBlockNode.html">CallBlockNode</a>* callICFGNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#ae9958bebe253db187d403929bc508eac">getOrAddCallICFGNode</a>(inst);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#af1fb4795e58130d639b75c354f67a6ab">addICFGInterEdges</a>(inst, <a class="code" href="namespaceSVF_1_1SVFUtil.html#a145abbd2958629718fbca41d25c3124d">getCallee</a>(inst)); <span class="comment">//creating interprocedural edges</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordflow">return</span> callICFGNode;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> }</div><div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a2e08ce822223842fa6a73fd659b1a526"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a2e08ce822223842fa6a73fd659b1a526">SVF::SVFUtil::isCallSite</a></div><div class="ttdeci">bool isCallSite(const Instruction *inst)</div><div class="ttdoc">Whether an instruction is a call or invoke instruction. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00193">SVFUtil.h:193</a></div></div>
|
|
432
436
|
<div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
433
|
-
<div class="ttc" id="classSVF_1_1SVFFunction_html"><div class="ttname"><a href="classSVF_1_1SVFFunction.html">SVF::SVFFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00233">BasicTypes.h:233</a></div></div>
|
|
434
437
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a145abbd2958629718fbca41d25c3124d"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a145abbd2958629718fbca41d25c3124d">SVF::SVFUtil::getCallee</a></div><div class="ttdeci">const SVFFunction * getCallee(const CallSite cs)</div><div class="ttdoc">Return callee of a callsite. Return null if this is an indirect call. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00268">SVFUtil.h:268</a></div></div>
|
|
435
438
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a8d8216a92140d982303f83ea424ddc91"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a8d8216a92140d982303f83ea424ddc91">SVF::SVFUtil::isNonInstricCallSite</a></div><div class="ttdeci">bool isNonInstricCallSite(const Instruction *inst)</div><div class="ttdoc">Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls...</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00206">SVFUtil.h:206</a></div></div>
|
|
436
439
|
<div class="ttc" id="classSVF_1_1CallBlockNode_html"><div class="ttname"><a href="classSVF_1_1CallBlockNode.html">SVF::CallBlockNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00364">ICFGNode.h:364</a></div></div>
|
|
437
|
-
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_af1fb4795e58130d639b75c354f67a6ab"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#af1fb4795e58130d639b75c354f67a6ab">SVF::ICFGBuilder::addICFGInterEdges</a></div><div class="ttdeci">void addICFGInterEdges(const Instruction *cs, const SVFFunction *callee)</div><div class="ttdoc">Create edges between ICFG nodes across functions. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#
|
|
440
|
+
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_af1fb4795e58130d639b75c354f67a6ab"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#af1fb4795e58130d639b75c354f67a6ab">SVF::ICFGBuilder::addICFGInterEdges</a></div><div class="ttdeci">void addICFGInterEdges(const Instruction *cs, const SVFFunction *callee)</div><div class="ttdoc">Create edges between ICFG nodes across functions. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00172">ICFGBuilder.cpp:172</a></div></div>
|
|
438
441
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_ae9958bebe253db187d403929bc508eac"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#ae9958bebe253db187d403929bc508eac">SVF::ICFGBuilder::getOrAddCallICFGNode</a></div><div class="ttdeci">CallBlockNode * getOrAddCallICFGNode(const Instruction *cs)</div><div class="ttdoc">Add a call node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00087">ICFGBuilder.h:87</a></div></div>
|
|
439
442
|
</div><!-- fragment -->
|
|
440
443
|
</div>
|
|
@@ -530,7 +533,7 @@ Private Attributes</h2></td></tr>
|
|
|
530
533
|
<p>function body </p>
|
|
531
534
|
|
|
532
535
|
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00080">80</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
533
|
-
<div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#abb7144bcc587e236fd22f6c8896117f5">BBSet</a> visited;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">while</span> (!worklist.empty())</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* inst = worklist.pop();</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">if</span> (visited.find(inst) == visited.end())</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  visited.insert(inst);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* srcNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a42f190f697284e6da7a6211ce7adecfe">getOrAddBlockICFGNode</a>(inst);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#abd525a2e3b7b9167b61b2304cc2cbdf2">isReturn</a>(inst))</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a5faee14fa1dd41447bc73ac365fe33c1">Function</a>* fun = inst->getFunction();</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* svfFun = <a class="code" href="classSVF_1_1LLVMModuleSet.html#acf40310917909e4234282c0695a43160">LLVMModuleSet::getLLVMModuleSet</a>()-><a class="code" href="classSVF_1_1LLVMModuleSet.html#a547b3bc62de65b9dbfc6dee55c063dd7">getSVFFunction</a>(fun);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a>* <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a> = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#aa33426d57dc150956902945a17a29bcb">getFunExitBlockNode</a>(svfFun);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, FunExitBlockNode);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#a57af1044422b3c3860aa6fb033f8111e">InstVec</a> nextInsts;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#a2f9959fa23ab4bdc65ca36fbda8c1b70">getNextInsts</a>(inst, nextInsts);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> branchID = 0;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">for</span> (InstVec::const_iterator nit = nextInsts.begin(), enit =</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  nextInsts.end(); nit != enit; ++nit)</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* succ = *nit;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* dstNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a42f190f697284e6da7a6211ce7adecfe">getOrAddBlockICFGNode</a>(succ);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a8d8216a92140d982303f83ea424ddc91">isNonInstricCallSite</a>(inst))</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  {</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="classSVF_1_1RetBlockNode.html">RetBlockNode</a>* retICFGNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a2f89ca8d506f90f0b90d18b0f63d8481">getOrAddRetICFGNode</a>(inst);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, retICFGNode);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  srcNode = retICFGNode;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  }</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  </div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#ac9a05dd7ab16e998625037aa242cd30f">BranchInst</a>* br = SVFUtil::dyn_cast<BranchInst>(inst))</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span>(br->isConditional())</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a8b038782880ae8950076e2c104bc4b18">addConditionalIntraEdge</a>(srcNode, dstNode, br->getCondition(), branchID);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">else</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, dstNode);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  }</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a412280b134578905248ce0122c5db7c9">SwitchInst</a>* si = SVFUtil::dyn_cast<SwitchInst>(inst))</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  {</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a8b038782880ae8950076e2c104bc4b18">addConditionalIntraEdge</a>(srcNode, dstNode, si->getCondition(),branchID);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  }</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, dstNode);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  worklist.push(succ);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  branchID++;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> }</div><div class="ttc" id="namespaceSVF_html_ac9a05dd7ab16e998625037aa242cd30f"><div class="ttname"><a href="namespaceSVF.html#ac9a05dd7ab16e998625037aa242cd30f">SVF::BranchInst</a></div><div class="ttdeci">llvm::BranchInst BranchInst</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00161">BasicTypes.h:161</a></div></div>
|
|
536
|
+
<div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#abb7144bcc587e236fd22f6c8896117f5">BBSet</a> visited;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">while</span> (!worklist.empty())</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* inst = worklist.pop();</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">if</span> (visited.find(inst) == visited.end())</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  visited.insert(inst);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* srcNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a42f190f697284e6da7a6211ce7adecfe">getOrAddBlockICFGNode</a>(inst);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#abd525a2e3b7b9167b61b2304cc2cbdf2">isReturn</a>(inst))</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a5faee14fa1dd41447bc73ac365fe33c1">Function</a>* fun = inst->getFunction();</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* svfFun = <a class="code" href="classSVF_1_1LLVMModuleSet.html#acf40310917909e4234282c0695a43160">LLVMModuleSet::getLLVMModuleSet</a>()-><a class="code" href="classSVF_1_1LLVMModuleSet.html#a547b3bc62de65b9dbfc6dee55c063dd7">getSVFFunction</a>(fun);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a>* <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a> = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#aa33426d57dc150956902945a17a29bcb">getFunExitBlockNode</a>(svfFun);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, FunExitBlockNode);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  }</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#a57af1044422b3c3860aa6fb033f8111e">InstVec</a> nextInsts;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#a2f9959fa23ab4bdc65ca36fbda8c1b70">getNextInsts</a>(inst, nextInsts);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> branchID = 0;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">for</span> (InstVec::const_iterator nit = nextInsts.begin(), enit =</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  nextInsts.end(); nit != enit; ++nit)</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* succ = *nit;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* dstNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a42f190f697284e6da7a6211ce7adecfe">getOrAddBlockICFGNode</a>(succ);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a8d8216a92140d982303f83ea424ddc91">isNonInstricCallSite</a>(inst))</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  {</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="classSVF_1_1RetBlockNode.html">RetBlockNode</a>* retICFGNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a2f89ca8d506f90f0b90d18b0f63d8481">getOrAddRetICFGNode</a>(inst);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  srcNode = retICFGNode;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#ac9a05dd7ab16e998625037aa242cd30f">BranchInst</a>* br = SVFUtil::dyn_cast<BranchInst>(inst))</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">if</span>(br->isConditional())</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a8b038782880ae8950076e2c104bc4b18">addConditionalIntraEdge</a>(srcNode, dstNode, br->getCondition(), branchID);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">else</span> </div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, dstNode);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a412280b134578905248ce0122c5db7c9">SwitchInst</a>* si = SVFUtil::dyn_cast<SwitchInst>(inst))</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a8b038782880ae8950076e2c104bc4b18">addConditionalIntraEdge</a>(srcNode, dstNode, si->getCondition(),branchID);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(srcNode, dstNode);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  </div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  worklist.push(succ);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  branchID++;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> }</div><div class="ttc" id="namespaceSVF_html_ac9a05dd7ab16e998625037aa242cd30f"><div class="ttname"><a href="namespaceSVF.html#ac9a05dd7ab16e998625037aa242cd30f">SVF::BranchInst</a></div><div class="ttdeci">llvm::BranchInst BranchInst</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00161">BasicTypes.h:161</a></div></div>
|
|
534
537
|
<div class="ttc" id="namespaceSVF_html_a43a65e0d33af3c743294f7a1139d2301"><div class="ttname"><a href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">SVF::NodeID</a></div><div class="ttdeci">unsigned NodeID</div><div class="ttdef"><b>Definition:</b> <a href="MTAResultValidator_8h_source.html#l00018">MTAResultValidator.h:18</a></div></div>
|
|
535
538
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_abb7144bcc587e236fd22f6c8896117f5"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#abb7144bcc587e236fd22f6c8896117f5">SVF::ICFGBuilder::BBSet</a></div><div class="ttdeci">Set< const Instruction * > BBSet</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00045">ICFGBuilder.h:45</a></div></div>
|
|
536
539
|
<div class="ttc" id="classSVF_1_1SVFFunction_html"><div class="ttname"><a href="classSVF_1_1SVFFunction.html">SVF::SVFFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00233">BasicTypes.h:233</a></div></div>
|
|
@@ -631,8 +634,8 @@ Private Attributes</h2></td></tr>
|
|
|
631
634
|
</div><div class="memdoc">
|
|
632
635
|
<p>function exit e.g., exit(0). In LLVM, it usually manifests as "unreachable" instruction If a function has multiple exit(0), we will only have one "unreachle" instruction after the UnifyFunctionExitNodes pass. </p>
|
|
633
636
|
|
|
634
|
-
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#
|
|
635
|
-
<div class="fragment"><div class="line"><a name="
|
|
637
|
+
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00139">139</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
638
|
+
<div class="fragment"><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a>* <a class="code" href="classSVF_1_1FunExitBlockNode.html">FunExitBlockNode</a> = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#aa33426d57dc150956902945a17a29bcb">getFunExitBlockNode</a>(fun);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">for</span> (<a class="code" href="namespaceSVF.html#a255af6ff30782cb9a548feadb0fe7d6b">inst_iterator</a> II = inst_begin(fun-><a class="code" href="classSVF_1_1SVFFunction.html#ac4ae917ae35ac6fca652fe2dd90a8ac2">getLLVMFun</a>()), EE = inst_end(fun-><a class="code" href="classSVF_1_1SVFFunction.html#ac4ae917ae35ac6fca652fe2dd90a8ac2">getLLVMFun</a>()); II != EE; ++II)</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  {</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a> *inst = &*II;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">if</span>(SVFUtil::isa<ReturnInst>(inst)) {</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* instNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a42f190f697284e6da7a6211ce7adecfe">getOrAddBlockICFGNode</a>(inst);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(instNode, FunExitBlockNode);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  }</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  }</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span> }</div><div class="ttc" id="classSVF_1_1ICFGNode_html"><div class="ttname"><a href="classSVF_1_1ICFGNode.html">SVF::ICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00054">ICFGNode.h:54</a></div></div>
|
|
636
639
|
<div class="ttc" id="namespaceSVF_html_a7875172ff434b2210eea7cecfbbd959e"><div class="ttname"><a href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">SVF::Instruction</a></div><div class="ttdeci">llvm::Instruction Instruction</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00079">BasicTypes.h:79</a></div></div>
|
|
637
640
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a42f190f697284e6da7a6211ce7adecfe"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a42f190f697284e6da7a6211ce7adecfe">SVF::ICFGBuilder::getOrAddBlockICFGNode</a></div><div class="ttdeci">ICFGNode * getOrAddBlockICFGNode(const Instruction *inst)</div><div class="ttdoc">Add/Get a basic block ICFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00075">ICFGBuilder.h:75</a></div></div>
|
|
638
641
|
<div class="ttc" id="classSVF_1_1ICFG_html_aa33426d57dc150956902945a17a29bcb"><div class="ttname"><a href="classSVF_1_1ICFG.html#aa33426d57dc150956902945a17a29bcb">SVF::ICFG::getFunExitBlockNode</a></div><div class="ttdeci">FunExitBlockNode * getFunExitBlockNode(const SVFFunction *fun)</div><div class="ttdoc">Add a function exit node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00251">ICFG.cpp:251</a></div></div>
|