svf-tools 1.0.474 → 1.0.475
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/AndersenSFR_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +8 -7
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/Andersen_8h_source.html +1 -1
- package/SVF-doxygen/html/html/CFLAlias_8h_source.html +2 -2
- package/SVF-doxygen/html/html/CHGBuilder_8cpp.html +2 -2
- package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +20 -19
- package/SVF-doxygen/html/html/CHGBuilder_8h_source.html +15 -15
- package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/Casting_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/ContextDDA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ExeState_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8h_source.html +2 -2
- package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +11 -10
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +11 -10
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +7 -7
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/IRGraph_8h_source.html +3 -3
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +24 -24
- package/SVF-doxygen/html/html/LLVMUtil_8h.html +111 -111
- package/SVF-doxygen/html/html/LLVMUtil_8h_source.html +41 -40
- package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +11 -10
- package/SVF-doxygen/html/html/LeakChecker_8h_source.html +8 -8
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +14 -13
- package/SVF-doxygen/html/html/LocationSet_8h_source.html +9 -9
- package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +31 -30
- package/SVF-doxygen/html/html/LockAnalysis_8h_source.html +23 -23
- package/SVF-doxygen/html/html/MHP_8h_source.html +2 -2
- package/SVF-doxygen/html/html/MSSAMuChi_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/MemPartition_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +35 -34
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +28 -27
- package/SVF-doxygen/html/html/MemSSA_8h_source.html +19 -19
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/PathCondAllocator_8cpp_source.html +26 -25
- package/SVF-doxygen/html/html/PathCondAllocator_8h_source.html +22 -22
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +27 -26
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +24 -24
- package/SVF-doxygen/html/html/ProgSlice_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +17 -16
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +37 -37
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFVariables_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +40 -39
- package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +16 -16
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +58 -57
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +24 -24
- package/SVF-doxygen/html/html/TCT_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/WPAStat_8h_source.html +5 -5
- package/SVF-doxygen/html/html/cfl_8cpp.html +3 -3
- package/SVF-doxygen/html/html/cfl_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +48 -48
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DistinctMRG.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ExeState.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +23 -23
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FunExitICFGNode.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +23 -23
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IRGraph.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1IntraDisjointMRG.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +22 -22
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +28 -28
- package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +78 -78
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +100 -100
- package/SVF-doxygen/html/html/classSVF_1_1MTA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +54 -54
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +56 -56
- package/SVF-doxygen/html/html/classSVF_1_1MemSSAStat.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +15 -15
- package/SVF-doxygen/html/html/classSVF_1_1PathCondAllocator.html +71 -71
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +59 -59
- package/SVF-doxygen/html/html/classSVF_1_1ProgSlice.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1RaceValidator.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +148 -148
- package/SVF-doxygen/html/html/classSVF_1_1SVFModule.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1StInfo.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +88 -88
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +65 -65
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +4 -4
- package/SVF-doxygen/html/html/dda_8cpp.html +2 -2
- package/SVF-doxygen/html/html/dda_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/mta_8cpp.html +2 -2
- package/SVF-doxygen/html/html/mta_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/namespaceSVF.html +4 -2
- package/SVF-doxygen/html/html/namespaceSVF_1_1LLVMUtil.html +1452 -0
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +41 -1409
- package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +4 -4
- package/SVF-doxygen/html/html/namespacemembers.html +3 -3
- package/SVF-doxygen/html/html/namespacemembers_f.html +1 -1
- package/SVF-doxygen/html/html/namespacemembers_func.html +39 -39
- package/SVF-doxygen/html/html/namespacemembers_g.html +14 -14
- package/SVF-doxygen/html/html/namespacemembers_i.html +18 -18
- package/SVF-doxygen/html/html/namespacemembers_p.html +1 -1
- package/SVF-doxygen/html/html/namespacemembers_s.html +2 -2
- package/SVF-doxygen/html/html/namespaces.html +2 -1
- package/SVF-doxygen/html/html/saber_8cpp.html +2 -2
- package/SVF-doxygen/html/html/saber_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/search/all_1.js +3 -3
- package/SVF-doxygen/html/html/search/all_10.js +1 -1
- package/SVF-doxygen/html/html/search/all_13.js +3 -2
- package/SVF-doxygen/html/html/search/all_6.js +1 -1
- package/SVF-doxygen/html/html/search/all_7.js +14 -14
- package/SVF-doxygen/html/html/search/all_9.js +18 -18
- package/SVF-doxygen/html/html/search/functions_0.js +3 -3
- package/SVF-doxygen/html/html/search/functions_11.js +2 -2
- package/SVF-doxygen/html/html/search/functions_5.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +14 -14
- package/SVF-doxygen/html/html/search/functions_8.js +18 -18
- package/SVF-doxygen/html/html/search/functions_f.js +1 -1
- package/SVF-doxygen/html/html/search/namespaces_1.js +1 -0
- package/SVF-doxygen/html/html/svf-ex_8cpp.html +3 -3
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/wpa_8cpp.html +2 -2
- package/SVF-doxygen/html/html/wpa_8cpp_source.html +2 -2
- package/include/MTA/MHP.h +1 -1
- package/include/SVF-FE/LLVMUtil.h +7 -7
- package/lib/Graphs/ICFG.cpp +2 -2
- package/lib/MSSA/MemRegion.cpp +1 -0
- package/lib/MSSA/MemSSA.cpp +1 -0
- package/lib/MTA/LockAnalysis.cpp +1 -0
- package/lib/MemoryModel/LocationSet.cpp +1 -0
- package/lib/MemoryModel/PointerAnalysis.cpp +1 -0
- package/lib/MemoryModel/SVFIR.cpp +1 -1
- package/lib/MemoryModel/SymbolTableInfo.cpp +1 -0
- package/lib/SABER/LeakChecker.cpp +1 -0
- package/lib/SABER/PathCondAllocator.cpp +1 -0
- package/lib/SVF-FE/CHGBuilder.cpp +1 -0
- package/lib/SVF-FE/CPPUtil.cpp +2 -2
- package/lib/SVF-FE/ICFGBuilder.cpp +1 -0
- package/lib/SVF-FE/LLVMUtil.cpp +32 -32
- package/lib/SVF-FE/SVFIRBuilder.cpp +2 -1
- package/lib/SVF-FE/SymbolTableBuilder.cpp +8 -7
- package/lib/WPA/AndersenStat.cpp +1 -0
- package/lib/WPA/FlowSensitiveStat.cpp +1 -0
- package/package.json +1 -1
- package/tools/CFL/cfl.cpp +1 -1
- package/tools/DDA/dda.cpp +1 -1
- package/tools/Example/svf-ex.cpp +1 -1
- package/tools/MTA/mta.cpp +1 -1
- package/tools/SABER/saber.cpp +1 -1
- package/tools/WPA/wpa.cpp +1 -1
|
@@ -412,8 +412,8 @@ Private Attributes</h2></td></tr>
|
|
|
412
412
|
|
|
413
413
|
<p>Constructor. </p>
|
|
414
414
|
|
|
415
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
416
|
-
<div class="fragment"><div class="line"><a name="
|
|
415
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00049">49</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
416
|
+
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  : <a class="code" href="classSVF_1_1PathCondAllocator.html#a3f331564529091540cf587e575b0bc3a">condMgr</a>(<a class="code" href="classSVF_1_1BDDExprManager.html#ae7be20333ab86fb5297b33923562c7a5">BDDExprManager::getBDDExprMgr</a>())</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a3f331564529091540cf587e575b0bc3a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a3f331564529091540cf587e575b0bc3a">SVF::PathCondAllocator::condMgr</a></div><div class="ttdeci">BDDExprManager * condMgr</div><div class="ttdoc">z3 manager </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00296">PathCondAllocator.h:296</a></div></div>
|
|
417
417
|
<div class="ttc" id="classSVF_1_1BDDExprManager_html_ae7be20333ab86fb5297b33923562c7a5"><div class="ttname"><a href="classSVF_1_1BDDExprManager.html#ae7be20333ab86fb5297b33923562c7a5">SVF::BDDExprManager::getBDDExprMgr</a></div><div class="ttdeci">static BDDExprManager * getBDDExprMgr()</div><div class="ttdoc">Singleton design here to make sure we only have one instance during any analysis. ...</div><div class="ttdef"><b>Definition:</b> <a href="BDDExpr_8cpp_source.html#l00055">BDDExpr.cpp:55</a></div></div>
|
|
418
418
|
</div><!-- fragment -->
|
|
419
419
|
</div>
|
|
@@ -467,14 +467,14 @@ Private Attributes</h2></td></tr>
|
|
|
467
467
|
<p>Perform path allocation. </p>
|
|
468
468
|
<p>Allocate path condition for each branch </p>
|
|
469
469
|
|
|
470
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
471
|
-
<div class="fragment"><div class="line"><a name="
|
|
470
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00056">56</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
471
|
+
<div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="SVFBasicTypes_8h.html#a173ce1b9b505fdadf5613b663749d3b0">DBOUT</a>(<a class="code" href="SVFBasicTypes_8h.html#a2c64190a065f342897573a3ef4973adb">DGENERAL</a>,<a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a609eea630a8f88fe9eaba15ce7e48738">pasMsg</a>(<span class="stringliteral">"path condition allocation starts\n"</span>));</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& func : *M)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">SVFUtil::isExtCall</a>(func))</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">// Allocate conditions for a program.</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">for</span> (Function::const_iterator bit = func->getLLVMFun()->begin(), ebit = func->getLLVMFun()->end(); bit != ebit; ++bit)</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a> & bb = *bit;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a391cb347cf98f33c261e59975900048e">collectBBCallingProgExit</a>(bb);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#af854f880e76738a13d6cb937a257828f">allocateForBB</a>(bb);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  }</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1Options.html#ae6b763ff293381ed5da9b07c2e8ae496">Options::PrintPathCond</a>)</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a2932b15ef74e46b676075ba1b2e82111">printPathCond</a>();</div><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>  <a class="code" href="SVFBasicTypes_8h.html#a173ce1b9b505fdadf5613b663749d3b0">DBOUT</a>(<a class="code" href="SVFBasicTypes_8h.html#a2c64190a065f342897573a3ef4973adb">DGENERAL</a>,<a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <a class="code" href="namespaceSVF_1_1SVFUtil.html#a609eea630a8f88fe9eaba15ce7e48738">pasMsg</a>(<span class="stringliteral">"path condition allocation ends\n"</span>));</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_af854f880e76738a13d6cb937a257828f"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#af854f880e76738a13d6cb937a257828f">SVF::PathCondAllocator::allocateForBB</a></div><div class="ttdeci">virtual void allocateForBB(const BasicBlock &bb)</div><div class="ttdoc">Allocate path condition for every basic block. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00083">PathCondAllocator.cpp:83</a></div></div>
|
|
472
472
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
473
473
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a609eea630a8f88fe9eaba15ce7e48738"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a609eea630a8f88fe9eaba15ce7e48738">SVF::SVFUtil::pasMsg</a></div><div class="ttdeci">std::string pasMsg(std::string msg)</div><div class="ttdoc">Print each pass/phase message by converting a string into blue string output. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8cpp_source.html#l00100">SVFUtil.cpp:100</a></div></div>
|
|
474
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a2932b15ef74e46b676075ba1b2e82111"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a2932b15ef74e46b676075ba1b2e82111">SVF::PathCondAllocator::printPathCond</a></div><div class="ttdeci">void printPathCond()</div><div class="ttdoc">Print out the path condition information. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
474
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a2932b15ef74e46b676075ba1b2e82111"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a2932b15ef74e46b676075ba1b2e82111">SVF::PathCondAllocator::printPathCond</a></div><div class="ttdeci">void printPathCond()</div><div class="ttdoc">Print out the path condition information. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00555">PathCondAllocator.cpp:555</a></div></div>
|
|
475
475
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_aed0b0b9f035057552a6a82154fd88e61"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">SVF::SVFUtil::outs</a></div><div class="ttdeci">std::ostream & outs()</div><div class="ttdoc">Overwrite llvm::outs() </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00049">SVFUtil.h:49</a></div></div>
|
|
476
476
|
<div class="ttc" id="SVFBasicTypes_8h_html_a2c64190a065f342897573a3ef4973adb"><div class="ttname"><a href="SVFBasicTypes_8h.html#a2c64190a065f342897573a3ef4973adb">DGENERAL</a></div><div class="ttdeci">#define DGENERAL</div><div class="ttdoc">General debug flag is for each phase of a pass, it is often in a colorful output format. </div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00159">SVFBasicTypes.h:159</a></div></div>
|
|
477
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a391cb347cf98f33c261e59975900048e"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a391cb347cf98f33c261e59975900048e">SVF::PathCondAllocator::collectBBCallingProgExit</a></div><div class="ttdeci">void collectBBCallingProgExit(const BasicBlock &bb)</div><div class="ttdoc">Collect basic block contains program exit function call. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
477
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a391cb347cf98f33c261e59975900048e"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a391cb347cf98f33c261e59975900048e">SVF::PathCondAllocator::collectBBCallingProgExit</a></div><div class="ttdeci">void collectBBCallingProgExit(const BasicBlock &bb)</div><div class="ttdoc">Collect basic block contains program exit function call. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00412">PathCondAllocator.cpp:412</a></div></div>
|
|
478
478
|
<div class="ttc" id="SVFBasicTypes_8h_html_a173ce1b9b505fdadf5613b663749d3b0"><div class="ttname"><a href="SVFBasicTypes_8h.html#a173ce1b9b505fdadf5613b663749d3b0">DBOUT</a></div><div class="ttdeci">#define DBOUT(TYPE, X)</div><div class="ttdoc">LLVM debug macros, define type of your DEBUG model of each pass. </div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00154">SVFBasicTypes.h:154</a></div></div>
|
|
479
479
|
<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="SVFUtil_8h_source.html#l00358">SVFUtil.h:358</a></div></div>
|
|
480
480
|
<div class="ttc" id="classSVF_1_1Options_html_ae6b763ff293381ed5da9b07c2e8ae496"><div class="ttname"><a href="classSVF_1_1Options.html#ae6b763ff293381ed5da9b07c2e8ae496">SVF::Options::PrintPathCond</a></div><div class="ttdeci">static const llvm::cl::opt< bool > PrintPathCond</div><div class="ttdef"><b>Definition:</b> <a href="Options_8h_source.html#l00224">Options.h:224</a></div></div>
|
|
@@ -509,17 +509,17 @@ Private Attributes</h2></td></tr>
|
|
|
509
509
|
<p>Allocate conditions for a basic block and propagate its condition to its successors. </p>
|
|
510
510
|
<p>TODO: handle BranchInst and SwitchInst individually here!! </p>
|
|
511
511
|
|
|
512
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
513
|
-
<div class="fragment"><div class="line"><a name="
|
|
512
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00083">83</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
513
|
+
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> {</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>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succ_number = <a class="code" href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">getBBSuccessorNum</a>(&bb);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="comment">// if successor number greater than 1, allocate new decision variable for successors</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">if</span>(succ_number > 1)</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  {</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">//allocate log2(num_succ) decision variables</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordtype">double</span> num = log(succ_number)/log(2);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> bit_num = (<a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a>)ceil(num);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> succ_index = 0;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  std::vector<Condition*> condVec;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">for</span>(<a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> i = 0 ; i < bit_num; i++)</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  condVec.push_back(<a class="code" href="classSVF_1_1PathCondAllocator.html#a3cd08242b82129e6074b2f30a19b5c17">newCond</a>(bb.getTerminator()));</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// iterate each successor</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">for</span> (<a class="code" href="namespaceSVF.html#a3436a988bf80c021cd8022fb445b66d5">succ_const_iterator</a> succ_it = succ_begin(&bb);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  succ_it != succ_end(&bb);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  succ_it++, succ_index++)</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  {</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>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* succ = *succ_it;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* path_cond = <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</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="comment">// for each successor decide its bit representation</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="comment">// decide whether each bit of succ_index is 1 or 0, if (three successor) succ_index is 000 then use C1^C2^C3</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// if 001 use C1^C2^negC3</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">for</span>(<a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> j = 0 ; j < bit_num; j++)</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  {</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="comment">//test each bit of this successor's index (binary representation)</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> tool = 0x01 << j;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">if</span>(tool & succ_index)</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  path_cond = <a class="code" href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">condAnd</a>(path_cond, (<a class="code" href="classSVF_1_1PathCondAllocator.html#ac1ed60a8f59a55811c97c83def3bb739">condNeg</a>(condVec.at(j))));</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">else</span></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>  path_cond = <a class="code" href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">condAnd</a>(path_cond, condVec.at(j));</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>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#aaec323fc8a3f83da4596ed7d447ab6f1">setBranchCond</a>(&bb,succ,path_cond);</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="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
514
514
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
515
515
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
516
516
|
<div class="ttc" id="namespaceSVF_html_a3436a988bf80c021cd8022fb445b66d5"><div class="ttname"><a href="namespaceSVF.html#a3436a988bf80c021cd8022fb445b66d5">SVF::succ_const_iterator</a></div><div class="ttdeci">llvm::succ_const_iterator succ_const_iterator</div><div class="ttdoc">LLVM Iterators. </div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00119">BasicTypes.h:119</a></div></div>
|
|
517
517
|
<div class="ttc" id="namespaceSVF_html_ad42bff8d0a7d60a085aa32d10f4955af"><div class="ttname"><a href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">SVF::u32_t</a></div><div class="ttdeci">unsigned u32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00084">SVFBasicTypes.h:84</a></div></div>
|
|
518
518
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a3cd08242b82129e6074b2f30a19b5c17"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a3cd08242b82129e6074b2f30a19b5c17">SVF::PathCondAllocator::newCond</a></div><div class="ttdeci">Condition * newCond(const Instruction *inst)</div><div class="ttdoc">Allocate a new condition. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00121">PathCondAllocator.h:121</a></div></div>
|
|
519
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aaec323fc8a3f83da4596ed7d447ab6f1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aaec323fc8a3f83da4596ed7d447ab6f1">SVF::PathCondAllocator::setBranchCond</a></div><div class="ttdeci">void setBranchCond(const BasicBlock *bb, const BasicBlock *succ, Condition *cond)</div><div class="ttdoc">Get/Set a branch condition, and its terminator instruction. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
519
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aaec323fc8a3f83da4596ed7d447ab6f1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aaec323fc8a3f83da4596ed7d447ab6f1">SVF::PathCondAllocator::setBranchCond</a></div><div class="ttdeci">void setBranchCond(const BasicBlock *bb, const BasicBlock *succ, Condition *cond)</div><div class="ttdoc">Get/Set a branch condition, and its terminator instruction. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00165">PathCondAllocator.cpp:165</a></div></div>
|
|
520
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_a6d9205380948e1bd00708581a64301e1"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">SVF::LLVMUtil::getBBSuccessorNum</a></div><div class="ttdeci">u32_t getBBSuccessorNum(const BasicBlock *BB)</div><div class="ttdoc">Get num of BB&#39;s successors. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00389">LLVMUtil.cpp:389</a></div></div>
|
|
520
521
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ab0e41d1eacfc6ee2cf42a9ce69cdcb61"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">SVF::PathCondAllocator::condAnd</a></div><div class="ttdeci">Condition * condAnd(Condition *lhs, Condition *rhs)</div><div class="ttdoc">Condition operations. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00083">PathCondAllocator.h:83</a></div></div>
|
|
521
522
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ac1ed60a8f59a55811c97c83def3bb739"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ac1ed60a8f59a55811c97c83def3bb739">SVF::PathCondAllocator::condNeg</a></div><div class="ttdeci">Condition * condNeg(Condition *cond)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00091">PathCondAllocator.h:91</a></div></div>
|
|
522
|
-
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a737684498679dc16a26f2411d88f36aa"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a737684498679dc16a26f2411d88f36aa">SVF::SVFUtil::getBBSuccessorNum</a></div><div class="ttdeci">u32_t getBBSuccessorNum(const BasicBlock *BB)</div><div class="ttdoc">Get num of BB&#39;s successors. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00389">LLVMUtil.cpp:389</a></div></div>
|
|
523
523
|
</div><!-- fragment -->
|
|
524
524
|
</div>
|
|
525
525
|
</div>
|
|
@@ -578,8 +578,8 @@ Private Attributes</h2></td></tr>
|
|
|
578
578
|
<p>Collect basic block contains program exit function call. </p>
|
|
579
579
|
<p>Whether this basic block contains program exit function call </p>
|
|
580
580
|
|
|
581
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
582
|
-
<div class="fragment"><div class="line"><a name="
|
|
581
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00412">412</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
582
|
+
<div class="fragment"><div class="line"><a name="l00413"></a><span class="lineno"> 413</span> {</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span> </div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="keywordflow">for</span>(BasicBlock::const_iterator it = bb.begin(), eit = bb.end(); it!=eit; it++)</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  {</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* inst = &*it;</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">if</span>(<a class="code" href="namespaceSVF_1_1SVFUtil.html#a2e08ce822223842fa6a73fd659b1a526">SVFUtil::isCallSite</a>(inst))</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <span class="keywordflow">if</span>(<a class="code" href="namespaceSVF_1_1SVFUtil.html#a6528edf9a1750df4a84d1a60d4d0bbe4">SVFUtil::isProgExitCall</a>(inst))</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  {</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#ad35f1bdb406a85c5bfdcbbc15642853b">funToExitBBsMap</a>[bb.getParent()].insert(&bb);</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  }</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  }</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</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#l00196">SVFUtil.h:196</a></div></div>
|
|
583
583
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ad35f1bdb406a85c5bfdcbbc15642853b"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ad35f1bdb406a85c5bfdcbbc15642853b">SVF::PathCondAllocator::funToExitBBsMap</a></div><div class="ttdeci">FunToExitBBsMap funToExitBBsMap</div><div class="ttdoc">map a function to all its basic blocks calling program exit </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00291">PathCondAllocator.h:291</a></div></div>
|
|
584
584
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a6528edf9a1750df4a84d1a60d4d0bbe4"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a6528edf9a1750df4a84d1a60d4d0bbe4">SVF::SVFUtil::isProgExitCall</a></div><div class="ttdeci">bool isProgExitCall(const CallSite cs)</div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8h_source.html#l00723">SVFUtil.h:723</a></div></div>
|
|
585
585
|
<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="Util_2BasicTypes_8h_source.html#l00073">BasicTypes.h:73</a></div></div>
|
|
@@ -627,14 +627,14 @@ Private Attributes</h2></td></tr>
|
|
|
627
627
|
</div><div class="memdoc">
|
|
628
628
|
<p>Compute calling inter-procedural guards between two SVFGNodes (from caller to callee) src –c1–> callBB –true–> funEntryBB –c2–> dst the InterCallVFGGuard is c1 ^ c2 </p>
|
|
629
629
|
|
|
630
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
631
|
-
<div class="fragment"><div class="line"><a name="
|
|
630
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00471">471</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
631
|
+
<div class="fragment"><div class="line"><a name="l00472"></a><span class="lineno"> 472</span> {</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* funEntryBB = &dstBB->getParent()->getEntryBlock();</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span> </div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* c1 = <a class="code" href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">ComputeIntraVFGGuard</a>(srcBB,callBB);</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">setCFCond</a>(funEntryBB,<a class="code" href="classSVF_1_1PathCondAllocator.html#a5a8c25d74ffc2a8f8dbd20faab4d9803">condOr</a>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(funEntryBB),<a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(callBB)));</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* c2 = <a class="code" href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">ComputeIntraVFGGuard</a>(funEntryBB,dstBB);</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">condAnd</a>(c1,c2);</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
632
632
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
633
633
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a4cb61914dff693e284091e97ab8c8878"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">SVF::PathCondAllocator::setCFCond</a></div><div class="ttdeci">bool setCFCond(const BasicBlock *bb, Condition *cond)</div><div class="ttdoc">Get/Set control-flow conditions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00261">PathCondAllocator.h:261</a></div></div>
|
|
634
634
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5a8c25d74ffc2a8f8dbd20faab4d9803"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5a8c25d74ffc2a8f8dbd20faab4d9803">SVF::PathCondAllocator::condOr</a></div><div class="ttdeci">Condition * condOr(Condition *lhs, Condition *rhs)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00087">PathCondAllocator.h:87</a></div></div>
|
|
635
635
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ab0e41d1eacfc6ee2cf42a9ce69cdcb61"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">SVF::PathCondAllocator::condAnd</a></div><div class="ttdeci">Condition * condAnd(Condition *lhs, Condition *rhs)</div><div class="ttdoc">Condition operations. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00083">PathCondAllocator.h:83</a></div></div>
|
|
636
636
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a8c926057571ca14743e106a5a6ce7ae9"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">SVF::PathCondAllocator::getCFCond</a></div><div class="ttdeci">Condition * getCFCond(const BasicBlock *bb) const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00271">PathCondAllocator.h:271</a></div></div>
|
|
637
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5ab573cce84584c44778611ba6f4d99c"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">SVF::PathCondAllocator::ComputeIntraVFGGuard</a></div><div class="ttdeci">virtual Condition * ComputeIntraVFGGuard(const BasicBlock *src, const BasicBlock *dst)</div><div class="ttdoc">Guard Computation for a value-flow (between two basic blocks) </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
637
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5ab573cce84584c44778611ba6f4d99c"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">SVF::PathCondAllocator::ComputeIntraVFGGuard</a></div><div class="ttdeci">virtual Condition * ComputeIntraVFGGuard(const BasicBlock *src, const BasicBlock *dst)</div><div class="ttdoc">Guard Computation for a value-flow (between two basic blocks) </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00499">PathCondAllocator.cpp:499</a></div></div>
|
|
638
638
|
</div><!-- fragment -->
|
|
639
639
|
</div>
|
|
640
640
|
</div>
|
|
@@ -679,15 +679,15 @@ Private Attributes</h2></td></tr>
|
|
|
679
679
|
</div><div class="memdoc">
|
|
680
680
|
<p>Compute return inter-procedural guards between two SVFGNodes (from callee to caller) src –c1–> funExitBB –true–> retBB –c2–> dst the InterRetVFGGuard is c1 ^ c2 </p>
|
|
681
681
|
|
|
682
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
683
|
-
<div class="fragment"><div class="line"><a name="
|
|
682
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00486">486</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
683
|
+
<div class="fragment"><div class="line"><a name="l00487"></a><span class="lineno"> 487</span> {</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* funExitBB = <a class="code" href="namespaceSVF_1_1LLVMUtil.html#aa0e78f2e1c9c04aee478a7ecbf354800">getFunExitBB</a>(srcBB->getParent());</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span> </div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* c1 = <a class="code" href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">ComputeIntraVFGGuard</a>(srcBB,funExitBB);</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">setCFCond</a>(retBB,<a class="code" href="classSVF_1_1PathCondAllocator.html#a5a8c25d74ffc2a8f8dbd20faab4d9803">condOr</a>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(retBB),<a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(funExitBB)));</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* c2 = <a class="code" href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">ComputeIntraVFGGuard</a>(retBB,dstBB);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">condAnd</a>(c1,c2);</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
684
684
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
685
685
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a4cb61914dff693e284091e97ab8c8878"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">SVF::PathCondAllocator::setCFCond</a></div><div class="ttdeci">bool setCFCond(const BasicBlock *bb, Condition *cond)</div><div class="ttdoc">Get/Set control-flow conditions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00261">PathCondAllocator.h:261</a></div></div>
|
|
686
686
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5a8c25d74ffc2a8f8dbd20faab4d9803"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5a8c25d74ffc2a8f8dbd20faab4d9803">SVF::PathCondAllocator::condOr</a></div><div class="ttdeci">Condition * condOr(Condition *lhs, Condition *rhs)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00087">PathCondAllocator.h:87</a></div></div>
|
|
687
|
-
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a3cb226930eeaf558575e09e5b65e0223"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a3cb226930eeaf558575e09e5b65e0223">SVF::SVFUtil::getFunExitBB</a></div><div class="ttdeci">const BasicBlock * getFunExitBB(const Function *fun)</div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00167">LLVMUtil.h:167</a></div></div>
|
|
688
687
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ab0e41d1eacfc6ee2cf42a9ce69cdcb61"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">SVF::PathCondAllocator::condAnd</a></div><div class="ttdeci">Condition * condAnd(Condition *lhs, Condition *rhs)</div><div class="ttdoc">Condition operations. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00083">PathCondAllocator.h:83</a></div></div>
|
|
689
688
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a8c926057571ca14743e106a5a6ce7ae9"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">SVF::PathCondAllocator::getCFCond</a></div><div class="ttdeci">Condition * getCFCond(const BasicBlock *bb) const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00271">PathCondAllocator.h:271</a></div></div>
|
|
690
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5ab573cce84584c44778611ba6f4d99c"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">SVF::PathCondAllocator::ComputeIntraVFGGuard</a></div><div class="ttdeci">virtual Condition * ComputeIntraVFGGuard(const BasicBlock *src, const BasicBlock *dst)</div><div class="ttdoc">Guard Computation for a value-flow (between two basic blocks) </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
689
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5ab573cce84584c44778611ba6f4d99c"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">SVF::PathCondAllocator::ComputeIntraVFGGuard</a></div><div class="ttdeci">virtual Condition * ComputeIntraVFGGuard(const BasicBlock *src, const BasicBlock *dst)</div><div class="ttdoc">Guard Computation for a value-flow (between two basic blocks) </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00499">PathCondAllocator.cpp:499</a></div></div>
|
|
690
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_aa0e78f2e1c9c04aee478a7ecbf354800"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#aa0e78f2e1c9c04aee478a7ecbf354800">SVF::LLVMUtil::getFunExitBB</a></div><div class="ttdeci">const BasicBlock * getFunExitBB(const Function *fun)</div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00167">LLVMUtil.h:167</a></div></div>
|
|
691
691
|
</div><!-- fragment -->
|
|
692
692
|
</div>
|
|
693
693
|
</div>
|
|
@@ -730,15 +730,15 @@ Private Attributes</h2></td></tr>
|
|
|
730
730
|
<p>if the dstBB is the eligible loop exit of the current basic block we can early terminate the computation</p>
|
|
731
731
|
<p>calculate the branch condition if succ post dominate bb, then we get brCond quicker by using postDT note that we assume loop exit always post dominate loop bodys which means loops are approximated only once. </p>
|
|
732
732
|
|
|
733
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
734
|
-
<div class="fragment"><div class="line"><a name="
|
|
733
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00499">499</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
734
|
+
<div class="fragment"><div class="line"><a name="l00500"></a><span class="lineno"> 500</span> {</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span> </div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(srcBB->getParent() == dstBB->getParent() && <span class="stringliteral">"two basic blocks are not in the same function??"</span>);</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span> </div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  <a class="code" href="namespaceSVF.html#ab34383ee87cd45eb485fa29db482ffef">PostDominatorTree</a>* postDT = <a class="code" href="classSVF_1_1PathCondAllocator.html#a1295e2c2c0a9c1a3744ba3927b95363e">getPostDT</a>(srcBB->getParent());</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <span class="keywordflow">if</span>(postDT->dominates(dstBB,srcBB))</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span> </div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#ac578894f959845164e1343384d60def1">CFWorkList</a> worklist;</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  worklist.push(srcBB);</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">setCFCond</a>(srcBB,<a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>());</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span> </div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <span class="keywordflow">while</span>(!worklist.empty())</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  {</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* bb = worklist.pop();</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* cond = <a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(bb);</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span> </div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* loopExitCond = <a class="code" href="classSVF_1_1PathCondAllocator.html#a623e6ec670e5f6aeedee26b146ad5a0d">evaluateLoopExitBranch</a>(bb,dstBB))</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">condAnd</a>(cond, loopExitCond);</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span> </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>  <span class="keywordflow">for</span> (<a class="code" href="namespaceSVF.html#a3436a988bf80c021cd8022fb445b66d5">succ_const_iterator</a> succ_it = succ_begin(bb);</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  succ_it != succ_end(bb); succ_it++)</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  {</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* succ = *succ_it;</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* brCond;</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">if</span>(postDT->dominates(succ,bb))</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  brCond = <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  brCond = <a class="code" href="classSVF_1_1PathCondAllocator.html#a6d2c5b05f4966522c9310fd3c086adea">getEvalBrCond</a>(bb, succ);</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>  <a class="code" href="SVFBasicTypes_8h.html#a173ce1b9b505fdadf5613b663749d3b0">DBOUT</a>(<a class="code" href="SVFBasicTypes_8h.html#a817abc424f7cfcdec5954c7807970f36">DSaber</a>, <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <span class="stringliteral">" bb ("</span> << bb->getName().str() <<</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <span class="stringliteral">") --> "</span> << <span class="stringliteral">"succ_bb ("</span> << succ->getName().str() << <span class="stringliteral">") condition: "</span> << brCond << <span class="stringliteral">"\n"</span>);</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* succPathCond = <a class="code" href="classSVF_1_1PathCondAllocator.html#ab0e41d1eacfc6ee2cf42a9ce69cdcb61">condAnd</a>(cond, brCond);</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">setCFCond</a>(succ, <a class="code" href="classSVF_1_1PathCondAllocator.html#a5a8c25d74ffc2a8f8dbd20faab4d9803">condOr</a>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(succ), succPathCond)))</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  worklist.push(succ);</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  }</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  }</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span> </div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <a class="code" href="SVFBasicTypes_8h.html#a173ce1b9b505fdadf5613b663749d3b0">DBOUT</a>(<a class="code" href="SVFBasicTypes_8h.html#a817abc424f7cfcdec5954c7807970f36">DSaber</a>, <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <span class="stringliteral">" src_bb ("</span> << srcBB->getName().str() <<</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  <span class="stringliteral">") --> "</span> << <span class="stringliteral">"dst_bb ("</span> << dstBB->getName().str() << <span class="stringliteral">") condition: "</span> << <a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(dstBB) << <span class="stringliteral">"\n"</span>);</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span> </div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a8c926057571ca14743e106a5a6ce7ae9">getCFCond</a>(dstBB);</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
735
735
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
736
736
|
<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>
|
|
737
737
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
738
738
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a4cb61914dff693e284091e97ab8c8878"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a4cb61914dff693e284091e97ab8c8878">SVF::PathCondAllocator::setCFCond</a></div><div class="ttdeci">bool setCFCond(const BasicBlock *bb, Condition *cond)</div><div class="ttdoc">Get/Set control-flow conditions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00261">PathCondAllocator.h:261</a></div></div>
|
|
739
739
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1295e2c2c0a9c1a3744ba3927b95363e"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1295e2c2c0a9c1a3744ba3927b95363e">SVF::PathCondAllocator::getPostDT</a></div><div class="ttdeci">PostDominatorTree * getPostDT(const Function *fun)</div><div class="ttdoc">Get Postdominators. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00153">PathCondAllocator.h:153</a></div></div>
|
|
740
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a623e6ec670e5f6aeedee26b146ad5a0d"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a623e6ec670e5f6aeedee26b146ad5a0d">SVF::PathCondAllocator::evaluateLoopExitBranch</a></div><div class="ttdeci">Condition * evaluateLoopExitBranch(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Evaluate loop exit branch. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
741
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a6d2c5b05f4966522c9310fd3c086adea"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a6d2c5b05f4966522c9310fd3c086adea">SVF::PathCondAllocator::getEvalBrCond</a></div><div class="ttdeci">Condition * getEvalBrCond(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Get a condition, evaluate the value for conditions if necessary (e.g., testNull like express) ...</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
740
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a623e6ec670e5f6aeedee26b146ad5a0d"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a623e6ec670e5f6aeedee26b146ad5a0d">SVF::PathCondAllocator::evaluateLoopExitBranch</a></div><div class="ttdeci">Condition * evaluateLoopExitBranch(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Evaluate loop exit branch. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00256">PathCondAllocator.cpp:256</a></div></div>
|
|
741
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a6d2c5b05f4966522c9310fd3c086adea"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a6d2c5b05f4966522c9310fd3c086adea">SVF::PathCondAllocator::getEvalBrCond</a></div><div class="ttdeci">Condition * getEvalBrCond(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Get a condition, evaluate the value for conditions if necessary (e.g., testNull like express) ...</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00154">PathCondAllocator.cpp:154</a></div></div>
|
|
742
742
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5a8c25d74ffc2a8f8dbd20faab4d9803"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5a8c25d74ffc2a8f8dbd20faab4d9803">SVF::PathCondAllocator::condOr</a></div><div class="ttdeci">Condition * condOr(Condition *lhs, Condition *rhs)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00087">PathCondAllocator.h:87</a></div></div>
|
|
743
743
|
<div class="ttc" id="namespaceSVF_html_a3436a988bf80c021cd8022fb445b66d5"><div class="ttname"><a href="namespaceSVF.html#a3436a988bf80c021cd8022fb445b66d5">SVF::succ_const_iterator</a></div><div class="ttdeci">llvm::succ_const_iterator succ_const_iterator</div><div class="ttdoc">LLVM Iterators. </div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00119">BasicTypes.h:119</a></div></div>
|
|
744
744
|
<div class="ttc" id="SVFBasicTypes_8h_html_a817abc424f7cfcdec5954c7807970f36"><div class="ttname"><a href="SVFBasicTypes_8h.html#a817abc424f7cfcdec5954c7807970f36">DSaber</a></div><div class="ttdeci">#define DSaber</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00173">SVFBasicTypes.h:173</a></div></div>
|
|
@@ -960,19 +960,19 @@ Private Attributes</h2></td></tr>
|
|
|
960
960
|
<p>Evaluate the branch condtion</p>
|
|
961
961
|
<p>(1) Evaluate a branch when it reaches a program exit (2) Evaluate a branch when it is loop exit branch (3) Evaluate a branch when it is a test null like condition </p>
|
|
962
962
|
|
|
963
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
964
|
-
<div class="fragment"><div class="line"><a name="
|
|
965
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a4d00c3306b92e59568b54a6a72afdb74"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a4d00c3306b92e59568b54a6a72afdb74">SVF::PathCondAllocator::getBranchCond</a></div><div class="ttdeci">Condition * getBranchCond(const BasicBlock *bb, const BasicBlock *succ) const</div><div class="ttdoc">Get branch condition. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
963
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00296">296</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
964
|
+
<div class="fragment"><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> {</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <span class="keywordflow">if</span>(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">getBBSuccessorNum</a>(bb) == 1)</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  {</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(bb->getTerminator()->getSuccessor(0) == succ && <span class="stringliteral">"not the unique successor?"</span>);</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  }</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> </div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordflow">if</span> (<a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a> *icfgNode = <a class="code" href="classSVF_1_1PathCondAllocator.html#a80a607028f3a05d478ffbd6fcc0bbc2a">getICFG</a>()->getICFGNode(bb->getTerminator()))</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  {</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &svfStmt: icfgNode->getSVFStmts())</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  {</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">if</span> (<span class="keyword">const</span> <a class="code" href="classSVF_1_1BranchStmt.html">BranchStmt</a> *branchStmt = SVFUtil::dyn_cast<BranchStmt>(svfStmt))</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  {</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordflow">if</span>(branchStmt->getNumSuccessors() == 2)</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  {</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* succ1 = branchStmt->getSuccessor(0)->getBB();</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* succ2 = branchStmt->getSuccessor(1)->getBB();</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>((succ1 == succ || succ2 == succ) && <span class="stringliteral">"not a successor??"</span>);</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> </div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* evalLoopExit = <a class="code" href="classSVF_1_1PathCondAllocator.html#a623e6ec670e5f6aeedee26b146ad5a0d">evaluateLoopExitBranch</a>(bb,succ);</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">if</span>(evalLoopExit)</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="keywordflow">return</span> evalLoopExit;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span> </div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* evalProgExit = <a class="code" href="classSVF_1_1PathCondAllocator.html#a79d6bbd55a134c856f3e80a898af23ee">evaluateProgExit</a>(branchStmt,succ);</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <span class="keywordflow">if</span>(evalProgExit)</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">return</span> evalProgExit;</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span> </div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* evalTestNullLike = <a class="code" href="classSVF_1_1PathCondAllocator.html#af595a4b93bd350f489bfe8635d86cfcc">evaluateTestNullLikeExpr</a>(branchStmt,succ);</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <span class="keywordflow">if</span>(evalTestNullLike)</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">return</span> evalTestNullLike;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  }</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  }</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  }</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  }</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span> </div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a4d00c3306b92e59568b54a6a72afdb74">getBranchCond</a>(bb, succ);</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a79d6bbd55a134c856f3e80a898af23ee"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a79d6bbd55a134c856f3e80a898af23ee">SVF::PathCondAllocator::evaluateProgExit</a></div><div class="ttdeci">Condition * evaluateProgExit(const BranchStmt *branchStmt, const BasicBlock *succ)</div><div class="ttdoc">Return condition when there is a branch calls program exit. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00212">PathCondAllocator.cpp:212</a></div></div>
|
|
965
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a4d00c3306b92e59568b54a6a72afdb74"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a4d00c3306b92e59568b54a6a72afdb74">SVF::PathCondAllocator::getBranchCond</a></div><div class="ttdeci">Condition * getBranchCond(const BasicBlock *bb, const BasicBlock *succ) const</div><div class="ttdoc">Get branch condition. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00139">PathCondAllocator.cpp:139</a></div></div>
|
|
966
966
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
967
967
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
968
968
|
<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>
|
|
969
969
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
970
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a623e6ec670e5f6aeedee26b146ad5a0d"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a623e6ec670e5f6aeedee26b146ad5a0d">SVF::PathCondAllocator::evaluateLoopExitBranch</a></div><div class="ttdeci">Condition * evaluateLoopExitBranch(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Evaluate loop exit branch. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
970
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a623e6ec670e5f6aeedee26b146ad5a0d"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a623e6ec670e5f6aeedee26b146ad5a0d">SVF::PathCondAllocator::evaluateLoopExitBranch</a></div><div class="ttdeci">Condition * evaluateLoopExitBranch(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Evaluate loop exit branch. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00256">PathCondAllocator.cpp:256</a></div></div>
|
|
971
971
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a80a607028f3a05d478ffbd6fcc0bbc2a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a80a607028f3a05d478ffbd6fcc0bbc2a">SVF::PathCondAllocator::getICFG</a></div><div class="ttdeci">ICFG * getICFG() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00210">PathCondAllocator.h:210</a></div></div>
|
|
972
972
|
<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>
|
|
973
973
|
<div class="ttc" id="classSVF_1_1BranchStmt_html"><div class="ttname"><a href="classSVF_1_1BranchStmt.html">SVF::BranchStmt</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00938">SVFStatements.h:938</a></div></div>
|
|
974
|
-
<div class="ttc" id="
|
|
975
|
-
<div class="ttc" id="
|
|
974
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_a6d9205380948e1bd00708581a64301e1"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">SVF::LLVMUtil::getBBSuccessorNum</a></div><div class="ttdeci">u32_t getBBSuccessorNum(const BasicBlock *BB)</div><div class="ttdoc">Get num of BB&#39;s successors. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00389">LLVMUtil.cpp:389</a></div></div>
|
|
975
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_af595a4b93bd350f489bfe8635d86cfcc"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#af595a4b93bd350f489bfe8635d86cfcc">SVF::PathCondAllocator::evaluateTestNullLikeExpr</a></div><div class="ttdeci">Condition * evaluateTestNullLikeExpr(const BranchStmt *branchStmt, const BasicBlock *succ)</div><div class="ttdoc">Return branch condition after evaluating test null like expression. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00182">PathCondAllocator.cpp:182</a></div></div>
|
|
976
976
|
</div><!-- fragment -->
|
|
977
977
|
</div>
|
|
978
978
|
</div>
|
|
@@ -1015,8 +1015,8 @@ Private Attributes</h2></td></tr>
|
|
|
1015
1015
|
<p>exclude exit bb which calls program exit</p>
|
|
1016
1016
|
<p>if the dst dominate all other loop exit bbs, then dst can certainly be reached </p>
|
|
1017
1017
|
|
|
1018
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1019
|
-
<div class="fragment"><div class="line"><a name="
|
|
1018
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00256">256</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1019
|
+
<div class="fragment"><div class="line"><a name="l00257"></a><span class="lineno"> 257</span> {</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a5faee14fa1dd41447bc73ac365fe33c1">Function</a>* fun = bb->getParent();</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(fun==dst->getParent() && <span class="stringliteral">"two basic blocks should be in the same function"</span>);</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span> </div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a77e088bfe47c0b0ddcbbe0693dec6fe5">LoopInfo</a>* loopInfo = <a class="code" href="classSVF_1_1PathCondAllocator.html#a10ddc3b02b2baad2edd72fe429113b0f">getLoopInfo</a>(fun);</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordflow">if</span>(loopInfo->isLoopHeader(const_cast<BasicBlock*>(bb)))</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#abf85e29310b2e4df8925d00a5c081314">Loop</a> *loop = loopInfo->getLoopFor(bb);</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <a class="code" href="namespaceSVF.html#a02be4933b76c2baa7fdbe8b290e12bb3">SmallBBVector</a> exitbbs;</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<BasicBlock*></a> filteredbbs;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  loop->getExitBlocks(exitbbs);</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordflow">while</span>(!exitbbs.empty())</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  {</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* eb = exitbbs.pop_back_val();</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">if</span>(!<a class="code" href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">isBBCallsProgExit</a>(eb))</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  filteredbbs.insert(eb);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  }</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> </div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordtype">bool</span> allPDT = <span class="keyword">true</span>;</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <a class="code" href="namespaceSVF.html#ab34383ee87cd45eb485fa29db482ffef">PostDominatorTree</a>* pdt = <a class="code" href="classSVF_1_1PathCondAllocator.html#a1295e2c2c0a9c1a3744ba3927b95363e">getPostDT</a>(fun);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span>& filteredbb : filteredbbs)</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  {</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">if</span>(!pdt->dominates(dst,filteredbb))</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  allPDT =<span class="keyword">false</span>;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span> </div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">if</span>(allPDT)</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  }</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> }</div><div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
1020
1020
|
<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>
|
|
1021
1021
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
1022
1022
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1295e2c2c0a9c1a3744ba3927b95363e"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1295e2c2c0a9c1a3744ba3927b95363e">SVF::PathCondAllocator::getPostDT</a></div><div class="ttdeci">PostDominatorTree * getPostDT(const Function *fun)</div><div class="ttdoc">Get Postdominators. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00153">PathCondAllocator.h:153</a></div></div>
|
|
@@ -1027,7 +1027,7 @@ Private Attributes</h2></td></tr>
|
|
|
1027
1027
|
<div class="ttc" id="namespaceSVF_html_a5faee14fa1dd41447bc73ac365fe33c1"><div class="ttname"><a href="namespaceSVF.html#a5faee14fa1dd41447bc73ac365fe33c1">SVF::Function</a></div><div class="ttdeci">llvm::Function Function</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00070">BasicTypes.h:70</a></div></div>
|
|
1028
1028
|
<div class="ttc" id="namespaceSVF_html_abf85e29310b2e4df8925d00a5c081314"><div class="ttname"><a href="namespaceSVF.html#abf85e29310b2e4df8925d00a5c081314">SVF::Loop</a></div><div class="ttdeci">llvm::Loop Loop</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00079">BasicTypes.h:79</a></div></div>
|
|
1029
1029
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a10ddc3b02b2baad2edd72fe429113b0f"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a10ddc3b02b2baad2edd72fe429113b0f">SVF::PathCondAllocator::getLoopInfo</a></div><div class="ttdeci">LoopInfo * getLoopInfo(const Function *f)</div><div class="ttdoc">Get LoopInfo. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00158">PathCondAllocator.h:158</a></div></div>
|
|
1030
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a39c0cc9dec89b0b52bf9f1026da942e1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">SVF::PathCondAllocator::isBBCallsProgExit</a></div><div class="ttdeci">bool isBBCallsProgExit(const BasicBlock *bb)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1030
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a39c0cc9dec89b0b52bf9f1026da942e1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">SVF::PathCondAllocator::isBBCallsProgExit</a></div><div class="ttdeci">bool isBBCallsProgExit(const BasicBlock *bb)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00429">PathCondAllocator.cpp:429</a></div></div>
|
|
1031
1031
|
</div><!-- fragment -->
|
|
1032
1032
|
</div>
|
|
1033
1033
|
</div>
|
|
@@ -1071,13 +1071,13 @@ Private Attributes</h2></td></tr>
|
|
|
1071
1071
|
<p>else branch calls program exit</p>
|
|
1072
1072
|
<p>no branch call program exit </p>
|
|
1073
1073
|
|
|
1074
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1075
|
-
<div class="fragment"><div class="line"><a name="
|
|
1074
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00212">212</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1075
|
+
<div class="fragment"><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> {</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a> *succ1 = branchStmt-><a class="code" href="classSVF_1_1BranchStmt.html#a7d9a6ebb2d95942c453864b5327b1ae8">getSuccessor</a>(0)-><a class="code" href="classSVF_1_1ICFGNode.html#ac1689701c75e04481e2ae2f4482551c4">getBB</a>();</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* succ2 = branchStmt-><a class="code" href="classSVF_1_1BranchStmt.html#a7d9a6ebb2d95942c453864b5327b1ae8">getSuccessor</a>(1)-><a class="code" href="classSVF_1_1ICFGNode.html#ac1689701c75e04481e2ae2f4482551c4">getBB</a>();</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="keywordtype">bool</span> branch1 = <a class="code" href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">isBBCallsProgExit</a>(succ1);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keywordtype">bool</span> branch2 = <a class="code" href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">isBBCallsProgExit</a>(succ2);</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">if</span>(branch1 && !branch2)</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="comment">// succ is then branch</span></div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordflow">if</span>(succ1 == succ)</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">getFalseCond</a>();</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="comment">// succ is else branch</span></div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(!branch1 && branch2)</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  {</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="comment">// succ is else branch</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">if</span>(succ2 == succ)</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">getFalseCond</a>();</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="comment">// succ is then branch</span></div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="comment">// two branches both call program exit</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(branch1 && branch2)</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">getFalseCond</a>();</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  }</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> }</div><div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
1076
1076
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
1077
1077
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a0d059c9adce2c998ddf2489376beb8e2"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">SVF::PathCondAllocator::getFalseCond</a></div><div class="ttdeci">Condition * getFalseCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00099">PathCondAllocator.h:99</a></div></div>
|
|
1078
1078
|
<div class="ttc" id="classSVF_1_1BranchStmt_html_a7d9a6ebb2d95942c453864b5327b1ae8"><div class="ttname"><a href="classSVF_1_1BranchStmt.html#a7d9a6ebb2d95942c453864b5327b1ae8">SVF::BranchStmt::getSuccessor</a></div><div class="ttdeci">const ICFGNode * getSuccessor(u32_t i) const</div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l01007">SVFStatements.h:1007</a></div></div>
|
|
1079
1079
|
<div class="ttc" id="classSVF_1_1ICFGNode_html_ac1689701c75e04481e2ae2f4482551c4"><div class="ttname"><a href="classSVF_1_1ICFGNode.html#ac1689701c75e04481e2ae2f4482551c4">SVF::ICFGNode::getBB</a></div><div class="ttdeci">virtual const BasicBlock * getBB() const</div><div class="ttdoc">Return the function of this ICFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00086">ICFGNode.h:86</a></div></div>
|
|
1080
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a39c0cc9dec89b0b52bf9f1026da942e1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">SVF::PathCondAllocator::isBBCallsProgExit</a></div><div class="ttdeci">bool isBBCallsProgExit(const BasicBlock *bb)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1080
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a39c0cc9dec89b0b52bf9f1026da942e1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a39c0cc9dec89b0b52bf9f1026da942e1">SVF::PathCondAllocator::isBBCallsProgExit</a></div><div class="ttdeci">bool isBBCallsProgExit(const BasicBlock *bb)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00429">PathCondAllocator.cpp:429</a></div></div>
|
|
1081
1081
|
</div><!-- fragment -->
|
|
1082
1082
|
</div>
|
|
1083
1083
|
</div>
|
|
@@ -1118,13 +1118,13 @@ Private Attributes</h2></td></tr>
|
|
|
1118
1118
|
<p>Return branch condition after evaluating test null like expression. </p>
|
|
1119
1119
|
<p>Evaluate null like expression for source-sink related bug detection in SABER </p>
|
|
1120
1120
|
|
|
1121
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1122
|
-
<div class="fragment"><div class="line"><a name="
|
|
1121
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00182">182</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1122
|
+
<div class="fragment"><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> {</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* succ1 = branchStmt-><a class="code" href="classSVF_1_1BranchStmt.html#a7d9a6ebb2d95942c453864b5327b1ae8">getSuccessor</a>(0)-><a class="code" href="classSVF_1_1ICFGNode.html#ac1689701c75e04481e2ae2f4482551c4">getBB</a>();</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>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1PathCondAllocator.html#af7959f60bca343fb5755cfa0c5d56cb1">isTestNullExpr</a>(branchStmt-><a class="code" href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">getCondition</a>()-><a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>()))</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  {</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// succ is then branch</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordflow">if</span>(succ1 == succ)</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">getFalseCond</a>();</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="comment">// succ is else branch</span></div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  }</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a03ee22dd8af2d9ca658e2437eeae0a10">isTestNotNullExpr</a>(branchStmt-><a class="code" href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">getCondition</a>()-><a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>()))</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="comment">// succ is then branch</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">if</span>(succ1 == succ)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="comment">// succ is else branch</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">getFalseCond</a>();</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> </div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }</div><div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
1123
1123
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
1124
1124
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a0d059c9adce2c998ddf2489376beb8e2"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a0d059c9adce2c998ddf2489376beb8e2">SVF::PathCondAllocator::getFalseCond</a></div><div class="ttdeci">Condition * getFalseCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00099">PathCondAllocator.h:99</a></div></div>
|
|
1125
1125
|
<div class="ttc" id="classSVF_1_1BranchStmt_html_a7d9a6ebb2d95942c453864b5327b1ae8"><div class="ttname"><a href="classSVF_1_1BranchStmt.html#a7d9a6ebb2d95942c453864b5327b1ae8">SVF::BranchStmt::getSuccessor</a></div><div class="ttdeci">const ICFGNode * getSuccessor(u32_t i) const</div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l01007">SVFStatements.h:1007</a></div></div>
|
|
1126
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_af7959f60bca343fb5755cfa0c5d56cb1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#af7959f60bca343fb5755cfa0c5d56cb1">SVF::PathCondAllocator::isTestNullExpr</a></div><div class="ttdeci">bool isTestNullExpr(const Value *test) const</div><div class="ttdoc">Return true if this is a test null expression. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1127
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a03ee22dd8af2d9ca658e2437eeae0a10"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a03ee22dd8af2d9ca658e2437eeae0a10">SVF::PathCondAllocator::isTestNotNullExpr</a></div><div class="ttdeci">bool isTestNotNullExpr(const Value *test) const</div><div class="ttdoc">Return true if this is a test not null expression. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1126
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_af7959f60bca343fb5755cfa0c5d56cb1"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#af7959f60bca343fb5755cfa0c5d56cb1">SVF::PathCondAllocator::isTestNullExpr</a></div><div class="ttdeci">bool isTestNullExpr(const Value *test) const</div><div class="ttdoc">Return true if this is a test null expression. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00346">PathCondAllocator.cpp:346</a></div></div>
|
|
1127
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a03ee22dd8af2d9ca658e2437eeae0a10"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a03ee22dd8af2d9ca658e2437eeae0a10">SVF::PathCondAllocator::isTestNotNullExpr</a></div><div class="ttdeci">bool isTestNotNullExpr(const Value *test) const</div><div class="ttdoc">Return true if this is a test not null expression. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00355">PathCondAllocator.cpp:355</a></div></div>
|
|
1128
1128
|
<div class="ttc" id="classSVF_1_1ICFGNode_html_ac1689701c75e04481e2ae2f4482551c4"><div class="ttname"><a href="classSVF_1_1ICFGNode.html#ac1689701c75e04481e2ae2f4482551c4">SVF::ICFGNode::getBB</a></div><div class="ttdeci">virtual const BasicBlock * getBB() const</div><div class="ttdoc">Return the function of this ICFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00086">ICFGNode.h:86</a></div></div>
|
|
1129
1129
|
<div class="ttc" id="classSVF_1_1SVFVar_html_afaa33caa8d2a306f6741d9d066243e40"><div class="ttname"><a href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">SVF::SVFVar::getValue</a></div><div class="ttdeci">const Value * getValue() const</div><div class="ttdoc">Get/has methods of the components. </div><div class="ttdef"><b>Definition:</b> <a href="SVFVariables_8h_source.html#l00095">SVFVariables.h:95</a></div></div>
|
|
1130
1130
|
<div class="ttc" id="classSVF_1_1BranchStmt_html_a915384027ae53e99311f05a08edf99f0"><div class="ttname"><a href="classSVF_1_1BranchStmt.html#a915384027ae53e99311f05a08edf99f0">SVF::BranchStmt::getCondition</a></div><div class="ttdeci">const SVFVar * getCondition() const</div><div class="ttdoc">Return the condition. </div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8cpp_source.html#l00320">SVFStatements.cpp:320</a></div></div>
|
|
@@ -1201,13 +1201,13 @@ Private Attributes</h2></td></tr>
|
|
|
1201
1201
|
<p>Get branch condition. </p>
|
|
1202
1202
|
<p>Get a branch condition </p>
|
|
1203
1203
|
|
|
1204
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1205
|
-
<div class="fragment"><div class="line"><a name="
|
|
1204
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00139">139</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1205
|
+
<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="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> pos = <a class="code" href="namespaceSVF_1_1LLVMUtil.html#a5d911cede2f514e87b030e2a93919515">getBBSuccessorPos</a>(bb,succ);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">if</span>(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">getBBSuccessorNum</a>(bb) == 1)</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  {</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  BBCondMap::const_iterator it = <a class="code" href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">bbConds</a>.find(bb);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(it!=<a class="code" href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">bbConds</a>.end() && <span class="stringliteral">"basic block does not have branch and conditions??"</span>);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  CondPosMap::const_iterator cit = it->second.find(pos);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(cit!=it->second.end() && <span class="stringliteral">"no condition on the branch??"</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">return</span> cit->second;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  }</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</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>
|
|
1206
1206
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
1207
|
-
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a1631bbbed23fbfe2204779ecc0dc2769"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a1631bbbed23fbfe2204779ecc0dc2769">SVF::SVFUtil::getBBSuccessorPos</a></div><div class="ttdeci">u32_t getBBSuccessorPos(const BasicBlock *BB, const BasicBlock *Succ)</div><div class="ttdoc">Get basic block successor position. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00357">LLVMUtil.cpp:357</a></div></div>
|
|
1208
1207
|
<div class="ttc" id="namespaceSVF_html_ad42bff8d0a7d60a085aa32d10f4955af"><div class="ttname"><a href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">SVF::u32_t</a></div><div class="ttdeci">unsigned u32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00084">SVFBasicTypes.h:84</a></div></div>
|
|
1209
1208
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aff611b2797d61155c8c2f9d8ac4030bc"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">SVF::PathCondAllocator::bbConds</a></div><div class="ttdeci">BBCondMap bbConds</div><div class="ttdoc">map basic block to its successors/predecessors branch conditions </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00297">PathCondAllocator.h:297</a></div></div>
|
|
1210
|
-
<div class="ttc" id="
|
|
1209
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_a6d9205380948e1bd00708581a64301e1"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">SVF::LLVMUtil::getBBSuccessorNum</a></div><div class="ttdeci">u32_t getBBSuccessorNum(const BasicBlock *BB)</div><div class="ttdoc">Get num of BB&#39;s successors. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00389">LLVMUtil.cpp:389</a></div></div>
|
|
1210
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_a5d911cede2f514e87b030e2a93919515"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#a5d911cede2f514e87b030e2a93919515">SVF::LLVMUtil::getBBSuccessorPos</a></div><div class="ttdeci">u32_t getBBSuccessorPos(const BasicBlock *BB, const BasicBlock *Succ)</div><div class="ttdoc">Get basic block successor position. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00357">LLVMUtil.cpp:357</a></div></div>
|
|
1211
1211
|
</div><!-- fragment -->
|
|
1212
1212
|
</div>
|
|
1213
1213
|
</div>
|
|
@@ -1432,9 +1432,9 @@ Private Attributes</h2></td></tr>
|
|
|
1432
1432
|
|
|
1433
1433
|
<p>Get a condition, evaluate the value for conditions if necessary (e.g., testNull like express) </p>
|
|
1434
1434
|
|
|
1435
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1436
|
-
<div class="fragment"><div class="line"><a name="
|
|
1437
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a283788ca2886b03803829434150d11fe"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a283788ca2886b03803829434150d11fe">SVF::PathCondAllocator::evaluateBranchCond</a></div><div class="ttdeci">Condition * evaluateBranchCond(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Evaluate branch conditions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1435
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00154">154</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1436
|
+
<div class="fragment"><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> {</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1PathCondAllocator.html#a0fa615ec0ccc48933b84d09b8e359da7">getCurEvalSVFGNode</a>() && <a class="code" href="classSVF_1_1PathCondAllocator.html#a0fa615ec0ccc48933b84d09b8e359da7">getCurEvalSVFGNode</a>()->getValue())</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a283788ca2886b03803829434150d11fe">evaluateBranchCond</a>(bb, succ);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a4d00c3306b92e59568b54a6a72afdb74">getBranchCond</a>(bb,succ);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a4d00c3306b92e59568b54a6a72afdb74"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a4d00c3306b92e59568b54a6a72afdb74">SVF::PathCondAllocator::getBranchCond</a></div><div class="ttdeci">Condition * getBranchCond(const BasicBlock *bb, const BasicBlock *succ) const</div><div class="ttdoc">Get branch condition. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00139">PathCondAllocator.cpp:139</a></div></div>
|
|
1437
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a283788ca2886b03803829434150d11fe"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a283788ca2886b03803829434150d11fe">SVF::PathCondAllocator::evaluateBranchCond</a></div><div class="ttdeci">Condition * evaluateBranchCond(const BasicBlock *bb, const BasicBlock *succ)</div><div class="ttdoc">Evaluate branch conditions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00296">PathCondAllocator.cpp:296</a></div></div>
|
|
1438
1438
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a0fa615ec0ccc48933b84d09b8e359da7"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a0fa615ec0ccc48933b84d09b8e359da7">SVF::PathCondAllocator::getCurEvalSVFGNode</a></div><div class="ttdeci">const SVFGNode * getCurEvalSVFGNode() const</div><div class="ttdoc">Get current value for branch condition evaluation. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00184">PathCondAllocator.h:184</a></div></div>
|
|
1439
1439
|
</div><!-- fragment -->
|
|
1440
1440
|
</div>
|
|
@@ -1603,14 +1603,14 @@ Private Attributes</h2></td></tr>
|
|
|
1603
1603
|
<p>Get complement phi condition e.g., B0: dstBB; B1:incomingBB; B2:complementBB Assume B0 (phi node) is the successor of both B1 and B2. If B1 dominates B2, and B0 not dominate B2 then condition from B1–>B0 = neg(B1–>B2)^(B1–>B0) </p>
|
|
1604
1604
|
<p>avoid both BB0 and BB1 dominate BB2 (e.g., while loop), then BB2 is not necessaryly a complement BB </p>
|
|
1605
1605
|
|
|
1606
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1607
|
-
<div class="fragment"><div class="line"><a name="
|
|
1606
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00451">451</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1607
|
+
<div class="fragment"><div class="line"><a name="l00452"></a><span class="lineno"> 452</span> {</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(BB1 && BB2 && <span class="stringliteral">"expect nullptr BB here!"</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>  <a class="code" href="namespaceSVF.html#aecbb42b8e9d17fa0189c50dda9fd5fdd">DominatorTree</a>* dt = <a class="code" href="classSVF_1_1PathCondAllocator.html#a496a23bc37dfdea32c536e9ebe9a4b88">getDT</a>(BB1->getParent());</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <span class="keywordflow">if</span>(dt->dominates(BB1,BB2) && !dt->dominates(BB0,BB2))</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>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* cond = <a class="code" href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">ComputeIntraVFGGuard</a>(BB1,BB2);</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#ac1ed60a8f59a55811c97c83def3bb739">condNeg</a>(cond);</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  }</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span> </div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">getTrueCond</a>();</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
1608
1608
|
<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>
|
|
1609
1609
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1a6bde0db54c91fba7e6bac0acff664a"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1a6bde0db54c91fba7e6bac0acff664a">SVF::PathCondAllocator::getTrueCond</a></div><div class="ttdeci">Condition * getTrueCond() const</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00095">PathCondAllocator.h:95</a></div></div>
|
|
1610
1610
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a496a23bc37dfdea32c536e9ebe9a4b88"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a496a23bc37dfdea32c536e9ebe9a4b88">SVF::PathCondAllocator::getDT</a></div><div class="ttdeci">DominatorTree * getDT(const Function *fun)</div><div class="ttdoc">Get dominators. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00148">PathCondAllocator.h:148</a></div></div>
|
|
1611
1611
|
<div class="ttc" id="namespaceSVF_html_aecbb42b8e9d17fa0189c50dda9fd5fdd"><div class="ttname"><a href="namespaceSVF.html#aecbb42b8e9d17fa0189c50dda9fd5fdd">SVF::DominatorTree</a></div><div class="ttdeci">llvm::DominatorTree DominatorTree</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00110">BasicTypes.h:110</a></div></div>
|
|
1612
1612
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ac1ed60a8f59a55811c97c83def3bb739"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ac1ed60a8f59a55811c97c83def3bb739">SVF::PathCondAllocator::condNeg</a></div><div class="ttdeci">Condition * condNeg(Condition *cond)</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00091">PathCondAllocator.h:91</a></div></div>
|
|
1613
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5ab573cce84584c44778611ba6f4d99c"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">SVF::PathCondAllocator::ComputeIntraVFGGuard</a></div><div class="ttdeci">virtual Condition * ComputeIntraVFGGuard(const BasicBlock *src, const BasicBlock *dst)</div><div class="ttdoc">Guard Computation for a value-flow (between two basic blocks) </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1613
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a5ab573cce84584c44778611ba6f4d99c"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a5ab573cce84584c44778611ba6f4d99c">SVF::PathCondAllocator::ComputeIntraVFGGuard</a></div><div class="ttdeci">virtual Condition * ComputeIntraVFGGuard(const BasicBlock *src, const BasicBlock *dst)</div><div class="ttdoc">Guard Computation for a value-flow (between two basic blocks) </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00499">PathCondAllocator.cpp:499</a></div></div>
|
|
1614
1614
|
</div><!-- fragment -->
|
|
1615
1615
|
</div>
|
|
1616
1616
|
</div>
|
|
@@ -1732,8 +1732,8 @@ Private Attributes</h2></td></tr>
|
|
|
1732
1732
|
</div><div class="memdoc">
|
|
1733
1733
|
<p>Whether this basic block contains program exit function call </p>
|
|
1734
1734
|
|
|
1735
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1736
|
-
<div class="fragment"><div class="line"><a name="
|
|
1735
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00429">429</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1736
|
+
<div class="fragment"><div class="line"><a name="l00430"></a><span class="lineno"> 430</span> {</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a5faee14fa1dd41447bc73ac365fe33c1">Function</a>* fun = bb->getParent();</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  FunToExitBBsMap::const_iterator it = <a class="code" href="classSVF_1_1PathCondAllocator.html#ad35f1bdb406a85c5bfdcbbc15642853b">funToExitBBsMap</a>.find(fun);</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keywordflow">if</span>(it!=<a class="code" href="classSVF_1_1PathCondAllocator.html#ad35f1bdb406a85c5bfdcbbc15642853b">funToExitBBsMap</a>.end())</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  {</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <a class="code" href="namespaceSVF.html#ab34383ee87cd45eb485fa29db482ffef">PostDominatorTree</a>* pdt = <a class="code" href="classSVF_1_1PathCondAllocator.html#a1295e2c2c0a9c1a3744ba3927b95363e">getPostDT</a>(fun);</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span>& bit : it->second)</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="keywordflow">if</span>(pdt->dominates(bit,bb))</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  }</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  }</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a1295e2c2c0a9c1a3744ba3927b95363e"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a1295e2c2c0a9c1a3744ba3927b95363e">SVF::PathCondAllocator::getPostDT</a></div><div class="ttdeci">PostDominatorTree * getPostDT(const Function *fun)</div><div class="ttdoc">Get Postdominators. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00153">PathCondAllocator.h:153</a></div></div>
|
|
1737
1737
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ad35f1bdb406a85c5bfdcbbc15642853b"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ad35f1bdb406a85c5bfdcbbc15642853b">SVF::PathCondAllocator::funToExitBBsMap</a></div><div class="ttdeci">FunToExitBBsMap funToExitBBsMap</div><div class="ttdoc">map a function to all its basic blocks calling program exit </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00291">PathCondAllocator.h:291</a></div></div>
|
|
1738
1738
|
<div class="ttc" id="namespaceSVF_html_ab34383ee87cd45eb485fa29db482ffef"><div class="ttname"><a href="namespaceSVF.html#ab34383ee87cd45eb485fa29db482ffef">SVF::PostDominatorTree</a></div><div class="ttdeci">llvm::PostDominatorTree PostDominatorTree</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00111">BasicTypes.h:111</a></div></div>
|
|
1739
1739
|
<div class="ttc" id="namespaceSVF_html_a5faee14fa1dd41447bc73ac365fe33c1"><div class="ttname"><a href="namespaceSVF.html#a5faee14fa1dd41447bc73ac365fe33c1">SVF::Function</a></div><div class="ttdeci">llvm::Function Function</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00070">BasicTypes.h:70</a></div></div>
|
|
@@ -1767,8 +1767,8 @@ Private Attributes</h2></td></tr>
|
|
|
1767
1767
|
<p>Evaluate test null/not null like expressions. </p>
|
|
1768
1768
|
<p>Return true if the predicate of this compare instruction is equal </p>
|
|
1769
1769
|
|
|
1770
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1771
|
-
<div class="fragment"><div class="line"><a name="
|
|
1770
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00336">336</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1771
|
+
<div class="fragment"><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> {</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="keywordflow">return</span> (cmp->getPredicate() == CmpInst::ICMP_EQ);</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> }</div></div><!-- fragment -->
|
|
1772
1772
|
</div>
|
|
1773
1773
|
</div>
|
|
1774
1774
|
<a id="ad92e8909172d960de8a25f6ff0272261"></a>
|
|
@@ -1837,8 +1837,8 @@ Private Attributes</h2></td></tr>
|
|
|
1837
1837
|
|
|
1838
1838
|
<p>Return true if the predicate of this compare instruction is not equal. </p>
|
|
1839
1839
|
|
|
1840
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1841
|
-
<div class="fragment"><div class="line"><a name="
|
|
1840
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00341">341</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1841
|
+
<div class="fragment"><div class="line"><a name="l00342"></a><span class="lineno"> 342</span> {</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">return</span> (cmp->getPredicate() == CmpInst::ICMP_NE);</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span> }</div></div><!-- fragment -->
|
|
1842
1842
|
</div>
|
|
1843
1843
|
</div>
|
|
1844
1844
|
<a id="a7182283f15c556e9d0e9fdc6d62efeef"></a>
|
|
@@ -1934,8 +1934,8 @@ Private Attributes</h2></td></tr>
|
|
|
1934
1934
|
<li>br i1 tobool, label if.end, label if.then, !dbg !161 There is an indirect edge 1->2 with value %0 </li>
|
|
1935
1935
|
</ol>
|
|
1936
1936
|
|
|
1937
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1938
|
-
<div class="fragment"><div class="line"><a name="
|
|
1937
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00376">376</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1938
|
+
<div class="fragment"><div class="line"><a name="l00377"></a><span class="lineno"> 377</span> {</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span> </div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a> *op0 = cmp->getOperand(0);</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a> *op1 = cmp->getOperand(1);</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keywordflow">if</span> (SVFUtil::isa<ConstantPointerNull>(op1))</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  {</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const Value *></a> inDirVal;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &it: <a class="code" href="classSVF_1_1PathCondAllocator.html#a0fa615ec0ccc48933b84d09b8e359da7">getCurEvalSVFGNode</a>()->getOutEdges())</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  {</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keywordflow">if</span> (it->isIndirectVFGEdge())</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  inDirVal.insert(it->getDstNode()->getValue());</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  }</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  }</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <span class="keywordflow">return</span> inDirVal.find(op0) != inDirVal.end();</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  }</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (SVFUtil::isa<ConstantPointerNull>(op0))</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  {</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const Value *></a> inDirVal;</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span> &it: <a class="code" href="classSVF_1_1PathCondAllocator.html#a0fa615ec0ccc48933b84d09b8e359da7">getCurEvalSVFGNode</a>()->getOutEdges())</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  {</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="keywordflow">if</span> (it->isIndirectVFGEdge())</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  {</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  inDirVal.insert(it->getDstNode()->getValue());</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  }</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  }</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keywordflow">return</span> inDirVal.find(op1) != inDirVal.end();</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  }</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span> </div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> }</div><div class="ttc" id="namespaceSVF_html_af739db846e47ba6b2fd15eaad31ab7fb"><div class="ttname"><a href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">SVF::Set</a></div><div class="ttdeci">std::unordered_set< Key, Hash, KeyEqual, Allocator > Set</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00104">SVFBasicTypes.h:104</a></div></div>
|
|
1939
1939
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a0fa615ec0ccc48933b84d09b8e359da7"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a0fa615ec0ccc48933b84d09b8e359da7">SVF::PathCondAllocator::getCurEvalSVFGNode</a></div><div class="ttdeci">const SVFGNode * getCurEvalSVFGNode() const</div><div class="ttdoc">Get current value for branch condition evaluation. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00184">PathCondAllocator.h:184</a></div></div>
|
|
1940
1940
|
<div class="ttc" id="namespaceSVF_html_a90b263fd2f541eca78135078114cabda"><div class="ttname"><a href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">SVF::Value</a></div><div class="ttdeci">llvm::Value Value</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00072">BasicTypes.h:72</a></div></div>
|
|
1941
1941
|
</div><!-- fragment -->
|
|
@@ -1967,10 +1967,10 @@ Private Attributes</h2></td></tr>
|
|
|
1967
1967
|
|
|
1968
1968
|
<p>Return true if this is a test not null expression. </p>
|
|
1969
1969
|
|
|
1970
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
1971
|
-
<div class="fragment"><div class="line"><a name="
|
|
1972
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aff24f70f9aa07b9f89c25bedab0e5a71"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aff24f70f9aa07b9f89c25bedab0e5a71">SVF::PathCondAllocator::isNECmp</a></div><div class="ttdeci">bool isNECmp(const CmpInst *cmp) const</div><div class="ttdoc">Return true if the predicate of this compare instruction is not equal. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1973
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ae9c9621d6ff6d527ca81dc5f960387b7"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ae9c9621d6ff6d527ca81dc5f960387b7">SVF::PathCondAllocator::isTestContainsNullAndTheValue</a></div><div class="ttdeci">bool isTestContainsNullAndTheValue(const CmpInst *cmp) const</div><div class="ttdoc">Return true if two values on the predicate are what we want. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
1970
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00355">355</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
1971
|
+
<div class="fragment"><div class="line"><a name="l00356"></a><span class="lineno"> 356</span> {</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="SVF-FE_2BasicTypes_8h.html#a02550b1e1110f4cfca868603ce243564">CmpInst</a>* cmp = SVFUtil::dyn_cast<CmpInst>(test))</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  {</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#ae9c9621d6ff6d527ca81dc5f960387b7">isTestContainsNullAndTheValue</a>(cmp) && <a class="code" href="classSVF_1_1PathCondAllocator.html#aff24f70f9aa07b9f89c25bedab0e5a71">isNECmp</a>(cmp);</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  }</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span> }</div><div class="ttc" id="SVF-FE_2BasicTypes_8h_html_a02550b1e1110f4cfca868603ce243564"><div class="ttname"><a href="SVF-FE_2BasicTypes_8h.html#a02550b1e1110f4cfca868603ce243564">CmpInst</a></div><div class="ttdeci">llvm::CmpInst CmpInst</div><div class="ttdef"><b>Definition:</b> <a href="SVF-FE_2BasicTypes_8h_source.html#l00072">BasicTypes.h:72</a></div></div>
|
|
1972
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aff24f70f9aa07b9f89c25bedab0e5a71"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aff24f70f9aa07b9f89c25bedab0e5a71">SVF::PathCondAllocator::isNECmp</a></div><div class="ttdeci">bool isNECmp(const CmpInst *cmp) const</div><div class="ttdoc">Return true if the predicate of this compare instruction is not equal. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00341">PathCondAllocator.cpp:341</a></div></div>
|
|
1973
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ae9c9621d6ff6d527ca81dc5f960387b7"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ae9c9621d6ff6d527ca81dc5f960387b7">SVF::PathCondAllocator::isTestContainsNullAndTheValue</a></div><div class="ttdeci">bool isTestContainsNullAndTheValue(const CmpInst *cmp) const</div><div class="ttdoc">Return true if two values on the predicate are what we want. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00376">PathCondAllocator.cpp:376</a></div></div>
|
|
1974
1974
|
</div><!-- fragment -->
|
|
1975
1975
|
</div>
|
|
1976
1976
|
</div>
|
|
@@ -2000,10 +2000,10 @@ Private Attributes</h2></td></tr>
|
|
|
2000
2000
|
|
|
2001
2001
|
<p>Return true if this is a test null expression. </p>
|
|
2002
2002
|
|
|
2003
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
2004
|
-
<div class="fragment"><div class="line"><a name="
|
|
2005
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_af93358a02bf4ef8020091532e0c5b5af"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#af93358a02bf4ef8020091532e0c5b5af">SVF::PathCondAllocator::isEQCmp</a></div><div class="ttdeci">bool isEQCmp(const CmpInst *cmp) const</div><div class="ttdoc">Evaluate test null/not null like expressions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
2006
|
-
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ae9c9621d6ff6d527ca81dc5f960387b7"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ae9c9621d6ff6d527ca81dc5f960387b7">SVF::PathCondAllocator::isTestContainsNullAndTheValue</a></div><div class="ttdeci">bool isTestContainsNullAndTheValue(const CmpInst *cmp) const</div><div class="ttdoc">Return true if two values on the predicate are what we want. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#
|
|
2003
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00346">346</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
2004
|
+
<div class="fragment"><div class="line"><a name="l00347"></a><span class="lineno"> 347</span> {</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="keywordflow">if</span>(<span class="keyword">const</span> <a class="code" href="SVF-FE_2BasicTypes_8h.html#a02550b1e1110f4cfca868603ce243564">CmpInst</a>* cmp = SVFUtil::dyn_cast<CmpInst>(test))</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  {</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1PathCondAllocator.html#ae9c9621d6ff6d527ca81dc5f960387b7">isTestContainsNullAndTheValue</a>(cmp) && <a class="code" href="classSVF_1_1PathCondAllocator.html#af93358a02bf4ef8020091532e0c5b5af">isEQCmp</a>(cmp);</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  }</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span> }</div><div class="ttc" id="SVF-FE_2BasicTypes_8h_html_a02550b1e1110f4cfca868603ce243564"><div class="ttname"><a href="SVF-FE_2BasicTypes_8h.html#a02550b1e1110f4cfca868603ce243564">CmpInst</a></div><div class="ttdeci">llvm::CmpInst CmpInst</div><div class="ttdef"><b>Definition:</b> <a href="SVF-FE_2BasicTypes_8h_source.html#l00072">BasicTypes.h:72</a></div></div>
|
|
2005
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_af93358a02bf4ef8020091532e0c5b5af"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#af93358a02bf4ef8020091532e0c5b5af">SVF::PathCondAllocator::isEQCmp</a></div><div class="ttdeci">bool isEQCmp(const CmpInst *cmp) const</div><div class="ttdoc">Evaluate test null/not null like expressions. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00336">PathCondAllocator.cpp:336</a></div></div>
|
|
2006
|
+
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_ae9c9621d6ff6d527ca81dc5f960387b7"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#ae9c9621d6ff6d527ca81dc5f960387b7">SVF::PathCondAllocator::isTestContainsNullAndTheValue</a></div><div class="ttdeci">bool isTestContainsNullAndTheValue(const CmpInst *cmp) const</div><div class="ttdoc">Return true if two values on the predicate are what we want. </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8cpp_source.html#l00376">PathCondAllocator.cpp:376</a></div></div>
|
|
2007
2007
|
</div><!-- fragment -->
|
|
2008
2008
|
</div>
|
|
2009
2009
|
</div>
|
|
@@ -2057,8 +2057,8 @@ Private Attributes</h2></td></tr>
|
|
|
2057
2057
|
<p>Print out the path condition information. </p>
|
|
2058
2058
|
<p>Print path conditions </p>
|
|
2059
2059
|
|
|
2060
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
2061
|
-
<div class="fragment"><div class="line"><a name="
|
|
2060
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00555">555</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
2061
|
+
<div class="fragment"><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> </div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <span class="stringliteral">"print path condition\n"</span>;</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span> </div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> & bbCond : <a class="code" href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">bbConds</a>)</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  {</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a>* bb = bbCond.first;</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span>& cit : bbCond.second)</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>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> i=0;</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">BasicBlock</a> *succ: successors(bb))</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  {</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  <span class="keywordflow">if</span> (i == cit.first)</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  {</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">Condition</a>* cond = cit.second;</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << bb->getName().str() << <span class="stringliteral">"-->"</span> << succ->getName().str() << <span class="stringliteral">":"</span>;</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>  <a class="code" href="namespaceSVF_1_1SVFUtil.html#aed0b0b9f035057552a6a82154fd88e61">outs</a>() << <a class="code" href="classSVF_1_1PathCondAllocator.html#aae773a674331bb80cc589835e0b16e4e">dumpCond</a>(cond) << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  }</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>  i++;</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</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>  }</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span> }</div><div class="ttc" id="classSVF_1_1PathCondAllocator_html_a923cc78e9f6779a0e6172b98e8f44925"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a923cc78e9f6779a0e6172b98e8f44925">SVF::PathCondAllocator::Condition</a></div><div class="ttdeci">BDDExprManager::BDDExpr Condition</div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00052">PathCondAllocator.h:52</a></div></div>
|
|
2062
2062
|
<div class="ttc" id="namespaceSVF_html_a23bf614858f168b6ad76e0233cec9965"><div class="ttname"><a href="namespaceSVF.html#a23bf614858f168b6ad76e0233cec9965">SVF::BasicBlock</a></div><div class="ttdeci">llvm::BasicBlock BasicBlock</div><div class="ttdef"><b>Definition:</b> <a href="Util_2BasicTypes_8h_source.html#l00071">BasicTypes.h:71</a></div></div>
|
|
2063
2063
|
<div class="ttc" id="namespaceSVF_html_ad42bff8d0a7d60a085aa32d10f4955af"><div class="ttname"><a href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">SVF::u32_t</a></div><div class="ttdeci">unsigned u32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00084">SVFBasicTypes.h:84</a></div></div>
|
|
2064
2064
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aff611b2797d61155c8c2f9d8ac4030bc"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">SVF::PathCondAllocator::bbConds</a></div><div class="ttdeci">BBCondMap bbConds</div><div class="ttdoc">map basic block to its successors/predecessors branch conditions </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00297">PathCondAllocator.h:297</a></div></div>
|
|
@@ -2113,13 +2113,13 @@ Private Attributes</h2></td></tr>
|
|
|
2113
2113
|
<p>we only care about basic blocks have more than one successor</p>
|
|
2114
2114
|
<p>FIXME: llvm getNumSuccessors allows duplicated block in the successors, it makes this assertion fail In this case we may waste a condition allocation, because the overwrite of the previous cond </p>
|
|
2115
2115
|
|
|
2116
|
-
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#
|
|
2117
|
-
<div class="fragment"><div class="line"><a name="
|
|
2118
|
-
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a1631bbbed23fbfe2204779ecc0dc2769"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a1631bbbed23fbfe2204779ecc0dc2769">SVF::SVFUtil::getBBSuccessorPos</a></div><div class="ttdeci">u32_t getBBSuccessorPos(const BasicBlock *BB, const BasicBlock *Succ)</div><div class="ttdoc">Get basic block successor position. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00357">LLVMUtil.cpp:357</a></div></div>
|
|
2116
|
+
<p class="definition">Definition at line <a class="el" href="PathCondAllocator_8cpp_source.html#l00165">165</a> of file <a class="el" href="PathCondAllocator_8cpp_source.html">PathCondAllocator.cpp</a>.</p>
|
|
2117
|
+
<div class="fragment"><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> {</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<a class="code" href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">getBBSuccessorNum</a>(bb) > 1 && <span class="stringliteral">"not more than one successor??"</span>);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">u32_t</a> pos = <a class="code" href="namespaceSVF_1_1LLVMUtil.html#a5d911cede2f514e87b030e2a93919515">getBBSuccessorPos</a>(bb,succ);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="classSVF_1_1PathCondAllocator.html#a0d685cfd0f0652a0ff839969f763371b">CondPosMap</a>& condPosMap = <a class="code" href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">bbConds</a>[bb];</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="comment">//assert(condPosMap.find(pos) == condPosMap.end() && "this branch has already been set ");</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  condPosMap[pos] = cond;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</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>
|
|
2119
2118
|
<div class="ttc" id="namespaceSVF_html_ad42bff8d0a7d60a085aa32d10f4955af"><div class="ttname"><a href="namespaceSVF.html#ad42bff8d0a7d60a085aa32d10f4955af">SVF::u32_t</a></div><div class="ttdeci">unsigned u32_t</div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00084">SVFBasicTypes.h:84</a></div></div>
|
|
2120
2119
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_aff611b2797d61155c8c2f9d8ac4030bc"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#aff611b2797d61155c8c2f9d8ac4030bc">SVF::PathCondAllocator::bbConds</a></div><div class="ttdeci">BBCondMap bbConds</div><div class="ttdoc">map basic block to its successors/predecessors branch conditions </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00297">PathCondAllocator.h:297</a></div></div>
|
|
2120
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_a6d9205380948e1bd00708581a64301e1"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#a6d9205380948e1bd00708581a64301e1">SVF::LLVMUtil::getBBSuccessorNum</a></div><div class="ttdeci">u32_t getBBSuccessorNum(const BasicBlock *BB)</div><div class="ttdoc">Get num of BB&#39;s successors. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00389">LLVMUtil.cpp:389</a></div></div>
|
|
2121
2121
|
<div class="ttc" id="classSVF_1_1PathCondAllocator_html_a0d685cfd0f0652a0ff839969f763371b"><div class="ttname"><a href="classSVF_1_1PathCondAllocator.html#a0d685cfd0f0652a0ff839969f763371b">SVF::PathCondAllocator::CondPosMap</a></div><div class="ttdeci">Map< u32_t, Condition * > CondPosMap</div><div class="ttdoc">z3 condition </div><div class="ttdef"><b>Definition:</b> <a href="PathCondAllocator_8h_source.html#l00054">PathCondAllocator.h:54</a></div></div>
|
|
2122
|
-
<div class="ttc" id="
|
|
2122
|
+
<div class="ttc" id="namespaceSVF_1_1LLVMUtil_html_a5d911cede2f514e87b030e2a93919515"><div class="ttname"><a href="namespaceSVF_1_1LLVMUtil.html#a5d911cede2f514e87b030e2a93919515">SVF::LLVMUtil::getBBSuccessorPos</a></div><div class="ttdeci">u32_t getBBSuccessorPos(const BasicBlock *BB, const BasicBlock *Succ)</div><div class="ttdoc">Get basic block successor position. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8cpp_source.html#l00357">LLVMUtil.cpp:357</a></div></div>
|
|
2123
2123
|
</div><!-- fragment -->
|
|
2124
2124
|
</div>
|
|
2125
2125
|
</div>
|