svf-tools 1.0.361 → 1.0.362
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 +1 -1
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +5 -4
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +16 -16
- package/lib/Graphs/ICFG.cpp +17 -12
- package/lib/SVF-FE/ICFGBuilder.cpp +4 -4
- package/package.json +1 -1
|
@@ -1680,32 +1680,33 @@ 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
|
|
1683
|
+
<p>if this is an external function (no function body or specified in ExAPI.cpp)</p>
|
|
1684
|
+
<p>otherwise connect interprocedural edges</p>
|
|
1684
1685
|
<p>Remove callBlockNode to retBlockNode intraICFGEdge since we found at least one inter procedural edge </p>
|
|
1685
1686
|
|
|
1686
1687
|
<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>
|
|
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_1CallICFGNode.html">CallICFGNode</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_1CallICFGNode.html#a674753d5ca0fbe28674acb25291f2bcf">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_1CallICFGNode.html#aa11226a2e4fa6a7b1d78006cc8ca0518">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_1CallICFGNode.html">CallICFGNode</a>*
|
|
1688
|
+
<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_1CallICFGNode.html">CallICFGNode</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_1CallICFGNode.html#a674753d5ca0fbe28674acb25291f2bcf">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_1CallICFGNode.html#aa11226a2e4fa6a7b1d78006cc8ca0518">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_1CallICFGNode.html">CallICFGNode</a>* callICFGNode = <a class="code" href="classSVF_1_1ICFG.html#adc66b547720b9271e6805edea0b9d01f">getCallICFGNode</a>(cs);</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  <a class="code" href="classSVF_1_1RetICFGNode.html">RetICFGNode</a>* retBlockNode = <a class="code" href="classSVF_1_1ICFG.html#a66cb50d8c176f800f06d9cb8924eb896">getRetICFGNode</a>(cs);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">isExtCall</a>(callee))</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  {</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(callICFGNode, retBlockNode); </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">else</span></div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  {</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <a class="code" href="classSVF_1_1FunEntryICFGNode.html">FunEntryICFGNode</a>* calleeEntryNode = <a class="code" href="classSVF_1_1ICFG.html#a0dca4655c2f6112a5be1f921b8e81076">getFunEntryICFGNode</a>(callee);</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <a class="code" href="classSVF_1_1FunExitICFGNode.html">FunExitICFGNode</a>* calleeExitNode = <a class="code" href="classSVF_1_1ICFG.html#af1b2d2839f811a00103df87342dfc919">getFunExitICFGNode</a>(callee);</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <a class="code" href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">addCallEdge</a>(callICFGNode, calleeEntryNode, cs);</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <a class="code" href="classSVF_1_1ICFG.html#a4a44849b596c89ab14d2e5f18366e848">addRetEdge</a>(calleeExitNode, retBlockNode, cs);</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span> </div><div class="line"><a name="l00455"></a><span class="lineno"> 455</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>(callICFGNode,retBlockNode, <a class="code" href="classSVF_1_1ICFGEdge.html#a395c34788e98950bc43e8cb44313e429acb8fba7c61b08ec952f1b65643d7a84b">ICFGEdge::IntraCF</a>))</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <a class="code" href="classSVF_1_1ICFG.html#a534625b10673efe5b0f344bfebf9b3cf">removeICFGEdge</a>(edge);</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  }</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  }</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  }</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="comment">// dump ICFG</span></div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1Options.html#aea29a835c54fab800117e57de00e0b1e">Options::DumpICFG</a>){</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <a class="code" href="classSVF_1_1ICFG.html#a999956500bbd605326531480546db9ba">dump</a>(<span class="stringliteral">"icfg_final"</span>);</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  }</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</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
1689
|
<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>
|
|
1689
1690
|
<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
1691
|
<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>
|
|
1691
1692
|
<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>
|
|
1692
1693
|
<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>
|
|
1693
1694
|
<div class="ttc" id="classSVF_1_1ICFG_html_a66cb50d8c176f800f06d9cb8924eb896"><div class="ttname"><a href="classSVF_1_1ICFG.html#a66cb50d8c176f800f06d9cb8924eb896">SVF::ICFG::getRetICFGNode</a></div><div class="ttdeci">RetICFGNode * getRetICFGNode(const Instruction *inst)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00222">ICFG.cpp:222</a></div></div>
|
|
1695
|
+
<div class="ttc" id="classSVF_1_1ICFG_html_af1b2d2839f811a00103df87342dfc919"><div class="ttname"><a href="classSVF_1_1ICFG.html#af1b2d2839f811a00103df87342dfc919">SVF::ICFG::getFunExitICFGNode</a></div><div class="ttdeci">FunExitICFGNode * getFunExitICFGNode(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>
|
|
1694
1696
|
<div class="ttc" id="classSVF_1_1RetICFGNode_html"><div class="ttname"><a href="classSVF_1_1RetICFGNode.html">SVF::RetICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00459">ICFGNode.h:459</a></div></div>
|
|
1695
1697
|
<div class="ttc" id="classSVF_1_1ICFG_html_adc66b547720b9271e6805edea0b9d01f"><div class="ttname"><a href="classSVF_1_1ICFG.html#adc66b547720b9271e6805edea0b9d01f">SVF::ICFG::getCallICFGNode</a></div><div class="ttdeci">CallICFGNode * getCallICFGNode(const Instruction *inst)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00209">ICFG.cpp:209</a></div></div>
|
|
1696
1698
|
<div class="ttc" id="classSVF_1_1FunEntryICFGNode_html"><div class="ttname"><a href="classSVF_1_1FunEntryICFGNode.html">SVF::FunEntryICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00251">ICFGNode.h:251</a></div></div>
|
|
1697
|
-
<div class="ttc" id="classSVF_1_1ICFG_html_acc261924103bd0c357acd3acfa6cf38a"><div class="ttname"><a href="classSVF_1_1ICFG.html#acc261924103bd0c357acd3acfa6cf38a">SVF::ICFG::getFunEntryBlock</a></div><div class="ttdeci">FunEntryICFGNode * getFunEntryBlock(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>
|
|
1698
1699
|
<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>
|
|
1699
1700
|
<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>
|
|
1700
1701
|
<div class="ttc" id="classSVF_1_1CallICFGNode_html_aa11226a2e4fa6a7b1d78006cc8ca0518"><div class="ttname"><a href="classSVF_1_1CallICFGNode.html#aa11226a2e4fa6a7b1d78006cc8ca0518">SVF::CallICFGNode::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>
|
|
1701
1702
|
<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>
|
|
1702
1703
|
<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>
|
|
1703
|
-
<div class="ttc" id="classSVF_1_1ICFG_html_a22d7f37a0cb2df90f73c1f2e3eaa71c6"><div class="ttname"><a href="classSVF_1_1ICFG.html#a22d7f37a0cb2df90f73c1f2e3eaa71c6">SVF::ICFG::getFunExitBlock</a></div><div class="ttdeci">FunExitICFGNode * getFunExitBlock(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>
|
|
1704
1704
|
<div class="ttc" id="classSVF_1_1ICFG_html_a999956500bbd605326531480546db9ba"><div class="ttname"><a href="classSVF_1_1ICFG.html#a999956500bbd605326531480546db9ba">SVF::ICFG::dump</a></div><div class="ttdeci">void dump(const std::string &file, bool simple=false)</div><div class="ttdoc">Dump graph into dot file. </div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00410">ICFG.cpp:410</a></div></div>
|
|
1705
1705
|
<div class="ttc" id="classSVF_1_1CallICFGNode_html_a674753d5ca0fbe28674acb25291f2bcf"><div class="ttname"><a href="classSVF_1_1CallICFGNode.html#a674753d5ca0fbe28674acb25291f2bcf">SVF::CallICFGNode::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>
|
|
1706
1706
|
<div class="ttc" id="classSVF_1_1CallICFGNode_html"><div class="ttname"><a href="classSVF_1_1CallICFGNode.html">SVF::CallICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00364">ICFGNode.h:364</a></div></div>
|
|
1707
1707
|
<div class="ttc" id="classSVF_1_1Options_html_aea29a835c54fab800117e57de00e0b1e"><div class="ttname"><a href="classSVF_1_1Options.html#aea29a835c54fab800117e57de00e0b1e">SVF::Options::DumpICFG</a></div><div class="ttdeci">static const llvm::cl::opt< bool > DumpICFG</div><div class="ttdef"><b>Definition:</b> <a href="Options_8h_source.html#l00135">Options.h:135</a></div></div>
|
|
1708
1708
|
<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>
|
|
1709
|
+
<div class="ttc" id="classSVF_1_1ICFG_html_a0dca4655c2f6112a5be1f921b8e81076"><div class="ttname"><a href="classSVF_1_1ICFG.html#a0dca4655c2f6112a5be1f921b8e81076">SVF::ICFG::getFunEntryICFGNode</a></div><div class="ttdeci">FunEntryICFGNode * getFunEntryICFGNode(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>
|
|
1709
1710
|
<div class="ttc" id="classSVF_1_1FunExitICFGNode_html"><div class="ttname"><a href="classSVF_1_1FunExitICFGNode.html">SVF::FunExitICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00308">ICFGNode.h:308</a></div></div>
|
|
1710
1711
|
<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>
|
|
1711
1712
|
<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>
|
|
@@ -251,7 +251,7 @@ Private Attributes</h2></td></tr>
|
|
|
251
251
|
<p>indirect call (don't know callee) </p>
|
|
252
252
|
|
|
253
253
|
<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>
|
|
254
|
-
<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_1CallICFGNode.html">CallICFGNode</a>*
|
|
254
|
+
<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_1CallICFGNode.html">CallICFGNode</a>* callICFGNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a702a888f2175dd32e2467bff27385e02">getCallICFGNode</a>(cs);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classSVF_1_1RetICFGNode.html">RetICFGNode</a>* retBlockNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#a7c1125c992eec20e118e6bfc12cb8bfb">getRetICFGNode</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="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">isExtCall</a>(callee))</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  {</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#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(callICFGNode, retBlockNode); </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  }</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="classSVF_1_1FunEntryICFGNode.html">FunEntryICFGNode</a>* calleeEntryNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a0dca4655c2f6112a5be1f921b8e81076">getFunEntryICFGNode</a>(callee);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="classSVF_1_1FunExitICFGNode.html">FunExitICFGNode</a>* calleeExitNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#af1b2d2839f811a00103df87342dfc919">getFunExitICFGNode</a>(callee);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">addCallEdge</a>(callICFGNode, calleeEntryNode, cs);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</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="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">else</span>{</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(callICFGNode, retBlockNode); </div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</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>
|
|
255
255
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a7c1125c992eec20e118e6bfc12cb8bfb"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a7c1125c992eec20e118e6bfc12cb8bfb">SVF::ICFGBuilder::getRetICFGNode</a></div><div class="ttdeci">RetICFGNode * getRetICFGNode(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>
|
|
256
256
|
<div class="ttc" id="classSVF_1_1ICFG_html_af1b2d2839f811a00103df87342dfc919"><div class="ttname"><a href="classSVF_1_1ICFG.html#af1b2d2839f811a00103df87342dfc919">SVF::ICFG::getFunExitICFGNode</a></div><div class="ttdeci">FunExitICFGNode * getFunExitICFGNode(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>
|
|
257
257
|
<div class="ttc" id="classSVF_1_1RetICFGNode_html"><div class="ttname"><a href="classSVF_1_1RetICFGNode.html">SVF::RetICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00459">ICFGNode.h:459</a></div></div>
|
|
@@ -114,7 +114,7 @@ Static Public Member Functions</h2></td></tr>
|
|
|
114
114
|
struct llvm::DOTGraphTraits< ICFG * ></h3>
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
117
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00472">472</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
118
118
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
119
119
|
<a id="a7ef3894da60c3e3350b8d2de3e94a562"></a>
|
|
120
120
|
<h2 class="memtitle"><span class="permalink"><a href="#a7ef3894da60c3e3350b8d2de3e94a562">◆ </a></span>NodeType</h2>
|
|
@@ -128,7 +128,7 @@ struct llvm::DOTGraphTraits< ICFG * ></h3>
|
|
|
128
128
|
</table>
|
|
129
129
|
</div><div class="memdoc">
|
|
130
130
|
|
|
131
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
131
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00475">475</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
132
132
|
|
|
133
133
|
</div>
|
|
134
134
|
</div>
|
|
@@ -157,8 +157,8 @@ struct llvm::DOTGraphTraits< ICFG * ></h3>
|
|
|
157
157
|
</table>
|
|
158
158
|
</div><div class="memdoc">
|
|
159
159
|
|
|
160
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
161
|
-
<div class="fragment"><div class="line"><a name="
|
|
160
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00476">476</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
161
|
+
<div class="fragment"><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  :</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  DOTGraphTraits<SVFIR*>(isSimple)</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  {</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  }</div></div><!-- fragment -->
|
|
162
162
|
</div>
|
|
163
163
|
</div>
|
|
164
164
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
@@ -204,8 +204,8 @@ template<class EdgeIter > </div>
|
|
|
204
204
|
</table>
|
|
205
205
|
</div><div class="memdoc">
|
|
206
206
|
|
|
207
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
208
|
-
<div class="fragment"><div class="line"><a name="
|
|
207
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00582">582</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
208
|
+
<div class="fragment"><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  {</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  <a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  <span class="keywordflow">if</span> (SVFUtil::isa<CallCFGEdge>(edge))</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  <span class="keywordflow">return</span> <span class="stringliteral">"style=solid,color=red"</span>;</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<RetCFGEdge>(edge))</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  <span class="keywordflow">return</span> <span class="stringliteral">"style=solid,color=blue"</span>;</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <span class="keywordflow">return</span> <span class="stringliteral">"style=solid"</span>;</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  <span class="keywordflow">return</span> <span class="stringliteral">""</span>;</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</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>
|
|
209
209
|
<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>
|
|
210
210
|
</div><!-- fragment -->
|
|
211
211
|
</div>
|
|
@@ -246,8 +246,8 @@ template<class EdgeIter > </div>
|
|
|
246
246
|
</table>
|
|
247
247
|
</div><div class="memdoc">
|
|
248
248
|
|
|
249
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
250
|
-
<div class="fragment"><div class="line"><a name="
|
|
249
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00596">596</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
250
|
+
<div class="fragment"><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  {</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  <a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = *(EI.getCurrent());</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(edge && <span class="stringliteral">"No edge found!!"</span>);</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span> </div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  std::string str;</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1CallCFGEdge.html">CallCFGEdge</a>* dirCall = SVFUtil::dyn_cast<CallCFGEdge>(edge))</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  rawstr << dirCall->getCallSite();</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1RetCFGEdge.html">RetCFGEdge</a>* dirRet = SVFUtil::dyn_cast<RetCFGEdge>(edge))</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  rawstr << dirRet->getCallSite();</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span> </div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</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>
|
|
251
251
|
<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>
|
|
252
252
|
<div class="ttc" id="classSVF_1_1CallCFGEdge_html"><div class="ttname"><a href="classSVF_1_1CallCFGEdge.html">SVF::CallCFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00162">ICFGEdge.h:162</a></div></div>
|
|
253
253
|
<div class="ttc" id="namespaceSVF_html_a726981481ac082dcda3e4921416b65a0"><div class="ttname"><a href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">SVF::raw_string_ostream</a></div><div class="ttdeci">llvm::raw_string_ostream raw_string_ostream</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00100">BasicTypes.h:100</a></div></div>
|
|
@@ -281,8 +281,8 @@ template<class EdgeIter > </div>
|
|
|
281
281
|
|
|
282
282
|
<p>Return name of the graph. </p>
|
|
283
283
|
|
|
284
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
285
|
-
<div class="fragment"><div class="line"><a name="
|
|
284
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00482">482</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
285
|
+
<div class="fragment"><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  {</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="keywordflow">return</span> <span class="stringliteral">"ICFG"</span>;</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  }</div></div><!-- fragment -->
|
|
286
286
|
</div>
|
|
287
287
|
</div>
|
|
288
288
|
<a id="aef77eaa614a202f39964d0a0917b5140"></a>
|
|
@@ -319,8 +319,8 @@ template<class EdgeIter > </div>
|
|
|
319
319
|
</table>
|
|
320
320
|
</div><div class="memdoc">
|
|
321
321
|
|
|
322
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
323
|
-
<div class="fragment"><div class="line"><a name="
|
|
322
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00544">544</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
323
|
+
<div class="fragment"><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  {</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  std::string str;</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span> </div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  <span class="keywordflow">if</span>(SVFUtil::isa<IntraICFGNode>(node))</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  {</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  rawstr << <span class="stringliteral">"color=black"</span>;</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  }</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<FunEntryICFGNode>(node))</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  {</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  rawstr << <span class="stringliteral">"color=yellow"</span>;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  }</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<FunExitICFGNode>(node))</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  {</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  rawstr << <span class="stringliteral">"color=green"</span>;</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  }</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<CallICFGNode>(node))</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  {</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  rawstr << <span class="stringliteral">"color=red"</span>;</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  }</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<RetICFGNode>(node))</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  {</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  rawstr << <span class="stringliteral">"color=blue"</span>;</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  }</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(SVFUtil::isa<GlobalICFGNode>(node))</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  {</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  rawstr << <span class="stringliteral">"color=purple"</span>;</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  }</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"no such kind of node!!"</span>);</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span> </div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  rawstr << <span class="stringliteral">""</span>;</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span> </div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  }</div><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
324
|
<div class="ttc" id="namespaceSVF_html_a726981481ac082dcda3e4921416b65a0"><div class="ttname"><a href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">SVF::raw_string_ostream</a></div><div class="ttdeci">llvm::raw_string_ostream raw_string_ostream</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00100">BasicTypes.h:100</a></div></div>
|
|
325
325
|
</div><!-- fragment -->
|
|
326
326
|
</div>
|
|
@@ -359,8 +359,8 @@ template<class EdgeIter > </div>
|
|
|
359
359
|
</table>
|
|
360
360
|
</div><div class="memdoc">
|
|
361
361
|
|
|
362
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
363
|
-
<div class="fragment"><div class="line"><a name="
|
|
362
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00487">487</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
363
|
+
<div class="fragment"><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  {</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <span class="keywordflow">return</span> getSimpleNodeLabel(node, graph);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  }</div></div><!-- fragment -->
|
|
364
364
|
</div>
|
|
365
365
|
</div>
|
|
366
366
|
<a id="a1cf0470d3e9821152416e3bf5236e553"></a>
|
|
@@ -399,8 +399,8 @@ template<class EdgeIter > </div>
|
|
|
399
399
|
|
|
400
400
|
<p>Return the label of an ICFG node. </p>
|
|
401
401
|
|
|
402
|
-
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#
|
|
403
|
-
<div class="fragment"><div class="line"><a name="
|
|
402
|
+
<p class="definition">Definition at line <a class="el" href="ICFG_8cpp_source.html#l00493">493</a> of file <a class="el" href="ICFG_8cpp_source.html">ICFG.cpp</a>.</p>
|
|
403
|
+
<div class="fragment"><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  {</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  std::string str;</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  rawstr << <span class="stringliteral">"NodeID: "</span> << node->getId() << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1IntraICFGNode.html">IntraICFGNode</a>* bNode = SVFUtil::dyn_cast<IntraICFGNode>(node))</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  {</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  rawstr << <span class="stringliteral">"IntraICFGNode ID: "</span> << bNode->getId() << <span class="stringliteral">" \t"</span>;</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->getSVFStmtList(bNode);</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <span class="keywordflow">if</span> (edges.empty()) {</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  rawstr << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a7486fd8e5350879ed1cbd835c0d4e191">value2String</a>(bNode->getInst()) << <span class="stringliteral">" \t"</span>;</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <span class="keywordflow">for</span> (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  {</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">PAGEdge</a>* edge = *it;</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  rawstr << edge-><a class="code" href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">toString</a>();</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  }</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  }</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  rawstr << <span class="stringliteral">" {fun: "</span> << bNode->getFun()->getName() << <span class="stringliteral">"}"</span>;</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  }</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1FunEntryICFGNode.html">FunEntryICFGNode</a>* <a class="code" href="cuddInt_8c.html#a936a27e51e66afb57c2b3a12d78a238e">entry</a> = SVFUtil::dyn_cast<FunEntryICFGNode>(node))</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  {</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  rawstr << <a class="code" href="cuddInt_8c.html#a936a27e51e66afb57c2b3a12d78a238e">entry</a>->toString();</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  }</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1FunExitICFGNode.html">FunExitICFGNode</a>* <a class="code" href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a> = SVFUtil::dyn_cast<FunExitICFGNode>(node))</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  {</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  rawstr << <a class="code" href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a>->toString();</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  }</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1CallICFGNode.html">CallICFGNode</a>* call = SVFUtil::dyn_cast<CallICFGNode>(node))</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  {</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  rawstr << call->toString();</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  }</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1RetICFGNode.html">RetICFGNode</a>* ret = SVFUtil::dyn_cast<RetICFGNode>(node))</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  {</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  rawstr << ret->toString();</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  }</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1GlobalICFGNode.html">GlobalICFGNode</a>* glob = SVFUtil::dyn_cast<GlobalICFGNode>(node) )</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  {</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <a class="code" href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVFIR::SVFStmtList</a>& edges = SVFIR::getPAG()->getSVFStmtList(glob);</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">for</span> (SVFIR::SVFStmtList::iterator it = edges.begin(), eit = edges.end(); it != eit; ++it)</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  {</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFStmt.html">PAGEdge</a>* edge = *it;</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  rawstr << edge-><a class="code" href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">toString</a>();</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  }</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  }</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"what else kinds of nodes do we have??"</span>);</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> </div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="keywordflow">return</span> rawstr.str();</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  }</div><div class="ttc" id="util_8h_html_a43b6ea6be735bb828bc062c70cadeff8"><div class="ttname"><a href="util_8h.html#a43b6ea6be735bb828bc062c70cadeff8">exit</a></div><div class="ttdeci">VOID_OR_INT exit()</div></div>
|
|
404
404
|
<div class="ttc" id="classSVF_1_1SVFIR_html_a6bc360d2604ae4a0af74530b263b10d9"><div class="ttname"><a href="classSVF_1_1SVFIR.html#a6bc360d2604ae4a0af74530b263b10d9">SVF::SVFIR::SVFStmtList</a></div><div class="ttdeci">std::vector< const SVFStmt * > SVFStmtList</div><div class="ttdef"><b>Definition:</b> <a href="SVFIR_8h_source.html#l00056">SVFIR.h:56</a></div></div>
|
|
405
405
|
<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>
|
|
406
406
|
<div class="ttc" id="classSVF_1_1SVFStmt_html_ad0b4dbe87e009518f22360c48b0d0c22"><div class="ttname"><a href="classSVF_1_1SVFStmt.html#ad0b4dbe87e009518f22360c48b0d0c22">SVF::SVFStmt::toString</a></div><div class="ttdeci">virtual const std::string toString() const</div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8cpp_source.html#l00061">SVFStatements.cpp:61</a></div></div>
|
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -436,20 +436,25 @@ void ICFG::updateCallGraph(PTACallGraph* callgraph)
|
|
|
436
436
|
for (PTACallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
|
|
437
437
|
{
|
|
438
438
|
const SVFFunction* callee = *func_iter;
|
|
439
|
-
CallICFGNode*
|
|
439
|
+
CallICFGNode* callICFGNode = getCallICFGNode(cs);
|
|
440
440
|
RetICFGNode* retBlockNode = getRetICFGNode(cs);
|
|
441
|
-
|
|
442
|
-
FunExitICFGNode* calleeExitNode = getFunExitBlock(callee);
|
|
443
|
-
addCallEdge(callBlockNode, calleeEntryNode, cs);
|
|
444
|
-
addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
445
|
-
|
|
446
|
-
/// if this is an external function (no function body), connect calleeEntryNode to calleeExitNode
|
|
441
|
+
/// if this is an external function (no function body or specified in ExAPI.cpp)
|
|
447
442
|
if (isExtCall(callee))
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
443
|
+
{
|
|
444
|
+
addIntraEdge(callICFGNode, retBlockNode);
|
|
445
|
+
}
|
|
446
|
+
/// otherwise connect interprocedural edges
|
|
447
|
+
else
|
|
448
|
+
{
|
|
449
|
+
FunEntryICFGNode* calleeEntryNode = getFunEntryICFGNode(callee);
|
|
450
|
+
FunExitICFGNode* calleeExitNode = getFunExitICFGNode(callee);
|
|
451
|
+
addCallEdge(callICFGNode, calleeEntryNode, cs);
|
|
452
|
+
addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
453
|
+
|
|
454
|
+
/// Remove callBlockNode to retBlockNode intraICFGEdge since we found at least one inter procedural edge
|
|
455
|
+
if(ICFGEdge* edge = hasIntraICFGEdge(callICFGNode,retBlockNode, ICFGEdge::IntraCF))
|
|
456
|
+
removeICFGEdge(edge);
|
|
457
|
+
}
|
|
453
458
|
}
|
|
454
459
|
}
|
|
455
460
|
// dump ICFG
|
|
@@ -171,7 +171,7 @@ InterICFGNode* ICFGBuilder::getOrAddInterBlockICFGNode(const Instruction* inst)
|
|
|
171
171
|
*/
|
|
172
172
|
void ICFGBuilder::addICFGInterEdges(const Instruction* cs, const SVFFunction* callee)
|
|
173
173
|
{
|
|
174
|
-
CallICFGNode*
|
|
174
|
+
CallICFGNode* callICFGNode = getCallICFGNode(cs);
|
|
175
175
|
RetICFGNode* retBlockNode = getRetICFGNode(cs);
|
|
176
176
|
|
|
177
177
|
/// direct call
|
|
@@ -179,20 +179,20 @@ void ICFGBuilder::addICFGInterEdges(const Instruction* cs, const SVFFunction* ca
|
|
|
179
179
|
/// if this is an external function (no function body)
|
|
180
180
|
if (isExtCall(callee))
|
|
181
181
|
{
|
|
182
|
-
icfg->addIntraEdge(
|
|
182
|
+
icfg->addIntraEdge(callICFGNode, retBlockNode);
|
|
183
183
|
}
|
|
184
184
|
/// otherwise connect interprocedural edges
|
|
185
185
|
else
|
|
186
186
|
{
|
|
187
187
|
FunEntryICFGNode* calleeEntryNode = icfg->getFunEntryICFGNode(callee);
|
|
188
188
|
FunExitICFGNode* calleeExitNode = icfg->getFunExitICFGNode(callee);
|
|
189
|
-
icfg->addCallEdge(
|
|
189
|
+
icfg->addCallEdge(callICFGNode, calleeEntryNode, cs);
|
|
190
190
|
icfg->addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
/// indirect call (don't know callee)
|
|
194
194
|
else{
|
|
195
|
-
icfg->addIntraEdge(
|
|
195
|
+
icfg->addIntraEdge(callICFGNode, retBlockNode);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.362",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|