svf-tools 1.0.577 → 1.0.578
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/CFLAlias_8cpp.html +0 -1
- package/SVF-doxygen/html/html/CFLAlias_8cpp_source.html +18 -25
- package/SVF-doxygen/html/html/CFLAlias_8h.html +1 -8
- package/SVF-doxygen/html/html/CFLAlias_8h_source.html +23 -49
- package/SVF-doxygen/html/html/CFLBase_8h.html +103 -0
- package/SVF-doxygen/html/html/CFLBase_8h_source.html +124 -0
- package/SVF-doxygen/html/html/CFLGraph_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/CFLGraph_8h_source.html +5 -4
- package/SVF-doxygen/html/html/CFLStat_8cpp_source.html +24 -19
- package/SVF-doxygen/html/html/CFLStat_8h.html +1 -0
- package/SVF-doxygen/html/html/CFLStat_8h_source.html +22 -21
- package/SVF-doxygen/html/html/CFLVF_8cpp.html +0 -2
- package/SVF-doxygen/html/html/CFLVF_8cpp_source.html +5 -8
- package/SVF-doxygen/html/html/CFLVF_8h.html +3 -8
- package/SVF-doxygen/html/html/CFLVF_8h_source.html +12 -26
- package/SVF-doxygen/html/html/CHG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/CHG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DCHG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DataFlowUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/GEPTypeBridgeIterator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GenericGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/GraphPrinter_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TCT_8h_source.html +1 -1
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/annotated.html +271 -270
- package/SVF-doxygen/html/html/cfl_8cpp.html +6 -9
- package/SVF-doxygen/html/html/cfl_8cpp_source.html +6 -8
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +9 -8
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias-members.html +75 -71
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.html +239 -679
- package/SVF-doxygen/html/html/classSVF_1_1CFLAlias.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLBase-members.html +275 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLBase.html +1341 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLBase.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph-members.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1CFLGraph.html +33 -3
- package/SVF-doxygen/html/html/classSVF_1_1CFLStat-members.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1CFLStat.html +58 -58
- package/SVF-doxygen/html/html/classSVF_1_1CFLVF-members.html +91 -72
- package/SVF-doxygen/html/html/classSVF_1_1CFLVF.html +243 -274
- package/SVF-doxygen/html/html/classSVF_1_1CFLVF.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +21 -20
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +12 -11
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.png +0 -0
- package/SVF-doxygen/html/html/classes.html +96 -95
- package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/dir_ae8aa099e368efaa962140c6624142bc.html +2 -0
- package/SVF-doxygen/html/html/files.html +8 -7
- package/SVF-doxygen/html/html/functions_0x7e.html +2 -5
- package/SVF-doxygen/html/html/functions_a.html +10 -9
- package/SVF-doxygen/html/html/functions_c.html +28 -28
- package/SVF-doxygen/html/html/functions_f.html +17 -16
- package/SVF-doxygen/html/html/functions_func.html +6 -5
- package/SVF-doxygen/html/html/functions_func_0x7e.html +2 -5
- package/SVF-doxygen/html/html/functions_func_c.html +29 -21
- package/SVF-doxygen/html/html/functions_func_f.html +4 -1
- package/SVF-doxygen/html/html/functions_func_g.html +14 -11
- package/SVF-doxygen/html/html/functions_func_i.html +10 -7
- package/SVF-doxygen/html/html/functions_func_p.html +1 -1
- package/SVF-doxygen/html/html/functions_func_s.html +2 -2
- package/SVF-doxygen/html/html/functions_g.html +18 -17
- package/SVF-doxygen/html/html/functions_i.html +10 -7
- package/SVF-doxygen/html/html/functions_l.html +6 -6
- package/SVF-doxygen/html/html/functions_m.html +2 -2
- package/SVF-doxygen/html/html/functions_n.html +14 -11
- package/SVF-doxygen/html/html/functions_o.html +15 -15
- package/SVF-doxygen/html/html/functions_p.html +19 -15
- package/SVF-doxygen/html/html/functions_r.html +3 -7
- package/SVF-doxygen/html/html/functions_s.html +16 -16
- package/SVF-doxygen/html/html/functions_t.html +9 -6
- package/SVF-doxygen/html/html/functions_type_c.html +0 -1
- package/SVF-doxygen/html/html/functions_v.html +6 -6
- package/SVF-doxygen/html/html/functions_vars_a.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_c.html +0 -1
- package/SVF-doxygen/html/html/functions_vars_g.html +2 -4
- package/SVF-doxygen/html/html/functions_vars_m.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_n.html +11 -8
- package/SVF-doxygen/html/html/functions_vars_p.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_s.html +2 -4
- package/SVF-doxygen/html/html/functions_vars_t.html +9 -6
- package/SVF-doxygen/html/html/hierarchy.html +58 -57
- package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF.html +2 -0
- package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/search/all_1.js +2 -2
- package/SVF-doxygen/html/html/search/all_10.js +11 -11
- package/SVF-doxygen/html/html/search/all_11.js +2 -2
- package/SVF-doxygen/html/html/search/all_12.js +11 -11
- package/SVF-doxygen/html/html/search/all_13.js +9 -8
- package/SVF-doxygen/html/html/search/all_15.js +4 -4
- package/SVF-doxygen/html/html/search/all_16.js +1 -1
- package/SVF-doxygen/html/html/search/all_19.js +1 -2
- package/SVF-doxygen/html/html/search/all_3.js +5 -2
- package/SVF-doxygen/html/html/search/all_6.js +2 -2
- package/SVF-doxygen/html/html/search/all_7.js +4 -3
- package/SVF-doxygen/html/html/search/all_9.js +2 -2
- package/SVF-doxygen/html/html/search/all_c.js +4 -4
- package/SVF-doxygen/html/html/search/all_d.js +3 -3
- package/SVF-doxygen/html/html/search/all_e.js +11 -10
- package/SVF-doxygen/html/html/search/all_f.js +2 -2
- package/SVF-doxygen/html/html/search/classes_2.js +1 -0
- package/SVF-doxygen/html/html/search/files_2.js +1 -0
- package/SVF-doxygen/html/html/search/functions_0.js +1 -1
- package/SVF-doxygen/html/html/search/functions_11.js +1 -1
- package/SVF-doxygen/html/html/search/functions_17.js +1 -2
- package/SVF-doxygen/html/html/search/functions_2.js +3 -1
- package/SVF-doxygen/html/html/search/functions_5.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +2 -1
- package/SVF-doxygen/html/html/search/functions_8.js +1 -1
- package/SVF-doxygen/html/html/search/functions_f.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_2.js +1 -1
- package/SVF-doxygen/html/html/search/variables_1.js +1 -1
- package/SVF-doxygen/html/html/search/variables_10.js +1 -1
- package/SVF-doxygen/html/html/search/variables_12.js +2 -2
- package/SVF-doxygen/html/html/search/variables_13.js +9 -8
- package/SVF-doxygen/html/html/search/variables_3.js +1 -1
- package/SVF-doxygen/html/html/search/variables_7.js +2 -2
- package/SVF-doxygen/html/html/search/variables_9.js +1 -1
- package/SVF-doxygen/html/html/search/variables_c.js +1 -1
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +9 -8
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1CFLNode_01_5_01_4_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLGraph_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1CFLNode_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
- package/include/CFL/CFLAlias.h +10 -47
- package/include/CFL/CFLBase.h +111 -0
- package/include/CFL/CFLStat.h +4 -2
- package/include/CFL/CFLVF.h +13 -23
- package/include/Graphs/CFLGraph.h +5 -0
- package/lib/CFL/CFLAlias.cpp +60 -52
- package/lib/CFL/CFLStat.cpp +11 -19
- package/lib/CFL/CFLVF.cpp +40 -35
- package/package.json +1 -1
- package/tools/CFL/cfl.cpp +12 -25
|
@@ -58,7 +58,7 @@ var searchData=
|
|
|
58
58
|
['numofentrychi',['NumOfEntryChi',['../classSVF_1_1MemSSAStat.html#ad96437d0c28f8088c711a718d2f2730e',1,'SVF::MemSSAStat']]],
|
|
59
59
|
['numofentrynodes',['numOfEntryNodes',['../classSVF_1_1ICFGStat.html#ad37793e64fe58a8faba201c18d876685',1,'SVF::ICFGStat']]],
|
|
60
60
|
['numofexitnodes',['numOfExitNodes',['../classSVF_1_1ICFGStat.html#ad7e00680fb8ca31afbd166f9a4adc5ec',1,'SVF::ICFGStat']]],
|
|
61
|
-
['numoffieldexpand',['numOfFieldExpand',['../
|
|
61
|
+
['numoffieldexpand',['numOfFieldExpand',['../classSVF_1_1CFLBase.html#ac0b0681d957fe18b3e87ff9e8a6f577c',1,'SVF::CFLBase::numOfFieldExpand()'],['../classSVF_1_1AndersenBase.html#a9f453ec1b4236b8194ae590981217259',1,'SVF::AndersenBase::numOfFieldExpand()']]],
|
|
62
62
|
['numofflattenelements',['numOfFlattenElements',['../classSVF_1_1StInfo.html#a7aa5b5018b4dec4913eb6aecf25568a4',1,'SVF::StInfo']]],
|
|
63
63
|
['numofflattenfields',['numOfFlattenFields',['../classSVF_1_1StInfo.html#aa9b4e659f4a4421aadf736a3de24ca50',1,'SVF::StInfo']]],
|
|
64
64
|
['numofformalin',['numOfFormalIn',['../classSVF_1_1SVFGStat.html#abc5e079242666bb55ec7dbc7f258b3db',1,'SVF::SVFGStat']]],
|
|
@@ -88,14 +88,14 @@ var searchData=
|
|
|
88
88
|
['numofnonlocalst',['numOfNonLocalSt',['../classSVF_1_1MTAAnnotator.html#a3c07f9964623b3895b1bab59a63dccfb',1,'SVF::MTAAnnotator']]],
|
|
89
89
|
['numofphi',['numOfPhi',['../classSVF_1_1SVFGStat.html#a0e1fcb9154aad266406c4da4861ba020',1,'SVF::SVFGStat']]],
|
|
90
90
|
['numofprocessedactualparam',['numOfProcessedActualParam',['../classSVF_1_1FlowSensitive.html#abdc30e45347579986c42795a436a1251',1,'SVF::FlowSensitive']]],
|
|
91
|
-
['numofprocessedaddr',['numOfProcessedAddr',['../
|
|
92
|
-
['numofprocessedcopy',['numOfProcessedCopy',['../
|
|
91
|
+
['numofprocessedaddr',['numOfProcessedAddr',['../classSVF_1_1CFLBase.html#ab5ace49d46bd156660166ec9262ae328',1,'SVF::CFLBase::numOfProcessedAddr()'],['../classSVF_1_1AndersenBase.html#a4acad18a6eb585ba9e3d2276dd591067',1,'SVF::AndersenBase::numOfProcessedAddr()'],['../classSVF_1_1FlowSensitive.html#ae4253bc632ffffe2498263c90f456ca7',1,'SVF::FlowSensitive::numOfProcessedAddr()']]],
|
|
92
|
+
['numofprocessedcopy',['numOfProcessedCopy',['../classSVF_1_1CFLBase.html#ac45983aa9c30e11cf4dc92c732d671d2',1,'SVF::CFLBase::numOfProcessedCopy()'],['../classSVF_1_1AndersenBase.html#a04acd871bd1b98cd9e83e395334ac130',1,'SVF::AndersenBase::numOfProcessedCopy()'],['../classSVF_1_1FlowSensitive.html#a19e017f3ed6429fa30687018e64dae54',1,'SVF::FlowSensitive::numOfProcessedCopy()']]],
|
|
93
93
|
['numofprocessedformalret',['numOfProcessedFormalRet',['../classSVF_1_1FlowSensitive.html#ae048cc5350cf2b075c05f5d84777a3c5',1,'SVF::FlowSensitive']]],
|
|
94
|
-
['numofprocessedgep',['numOfProcessedGep',['../
|
|
95
|
-
['numofprocessedload',['numOfProcessedLoad',['../
|
|
94
|
+
['numofprocessedgep',['numOfProcessedGep',['../classSVF_1_1CFLBase.html#ac8c31fde200a039f880e93a0808ad273',1,'SVF::CFLBase::numOfProcessedGep()'],['../classSVF_1_1AndersenBase.html#aa1246b392aeae1fd10c8a9ebedcc2dd9',1,'SVF::AndersenBase::numOfProcessedGep()'],['../classSVF_1_1FlowSensitive.html#a88a111b6bc347d6562db7af8bd8f2f0e',1,'SVF::FlowSensitive::numOfProcessedGep()']]],
|
|
95
|
+
['numofprocessedload',['numOfProcessedLoad',['../classSVF_1_1CFLBase.html#ac374dff70ef434b3ba4f75257f632f97',1,'SVF::CFLBase::numOfProcessedLoad()'],['../classSVF_1_1AndersenBase.html#a69aae96fc1c99bf108075e5061f50f9e',1,'SVF::AndersenBase::numOfProcessedLoad()'],['../classSVF_1_1FlowSensitive.html#a0e1a0bdbf4f81a3600ac26ac011ac268',1,'SVF::FlowSensitive::numOfProcessedLoad()']]],
|
|
96
96
|
['numofprocessedmssanode',['numOfProcessedMSSANode',['../classSVF_1_1FlowSensitive.html#af71a5ae3aef022c569e89f40515072cf',1,'SVF::FlowSensitive']]],
|
|
97
97
|
['numofprocessedphi',['numOfProcessedPhi',['../classSVF_1_1FlowSensitive.html#ac39abcb40e4b568ab59b7cf48ed10f70',1,'SVF::FlowSensitive']]],
|
|
98
|
-
['numofprocessedstore',['numOfProcessedStore',['../
|
|
98
|
+
['numofprocessedstore',['numOfProcessedStore',['../classSVF_1_1CFLBase.html#a44aaad485d8911703c2f83c99b41bcf9',1,'SVF::CFLBase::numOfProcessedStore()'],['../classSVF_1_1AndersenBase.html#a2b763519509ce21cf40893c01f8357b6',1,'SVF::AndersenBase::numOfProcessedStore()'],['../classSVF_1_1FlowSensitive.html#a669e8f1dd8572b7dcff373c9787a923d',1,'SVF::FlowSensitive::numOfProcessedStore()']]],
|
|
99
99
|
['numofremovedpts',['numOfRemovedPTS',['../classSVF_1_1MTASVFGBuilder.html#a07c3f5fa2e0092dac28521cf901a26cf',1,'SVF::MTASVFGBuilder']]],
|
|
100
100
|
['numofremovedsvfgedges',['numOfRemovedSVFGEdges',['../classSVF_1_1MTASVFGBuilder.html#a0319d1d2e78c79f9943f2e2f65da26ed',1,'SVF::MTASVFGBuilder']]],
|
|
101
101
|
['numofresolvedindcalledge',['numOfResolvedIndCallEdge',['../classSVF_1_1PTACallGraph.html#adf05313ea8bcc7973acebd3fbcd75c92',1,'SVF::PTACallGraph']]],
|
|
@@ -103,11 +103,12 @@ var searchData=
|
|
|
103
103
|
['numofretmu',['NumOfRetMu',['../classSVF_1_1MemSSAStat.html#a1459465f0a76c09b5dd7d777467ac2e4',1,'SVF::MemSSAStat']]],
|
|
104
104
|
['numofretnodes',['numOfRetNodes',['../classSVF_1_1ICFGStat.html#ac9bfce40c058ed7ab178fe1f1818e9de',1,'SVF::ICFGStat']]],
|
|
105
105
|
['numofscc',['numOfSCC',['../classSVF_1_1FlowSensitive.html#a0ac955bf06261eec1c6bb78ec99652e3',1,'SVF::FlowSensitive']]],
|
|
106
|
-
['numofsccdetection',['numOfSCCDetection',['../
|
|
107
|
-
['numofsfrs',['numOfSfrs',['../
|
|
106
|
+
['numofsccdetection',['numOfSCCDetection',['../classSVF_1_1CFLBase.html#a2ab180a3cb942b674f8b2a12e4756a23',1,'SVF::CFLBase::numOfSCCDetection()'],['../classSVF_1_1AndersenBase.html#a0d7298cbf83568f24fd2bd1926a32968',1,'SVF::AndersenBase::numOfSCCDetection()']]],
|
|
107
|
+
['numofsfrs',['numOfSfrs',['../classSVF_1_1CFLBase.html#a8d03c680be0bae1bb5f9490b7a72c2a2',1,'SVF::CFLBase::numOfSfrs()'],['../classSVF_1_1AndersenBase.html#a25b00d9ca71cbdd27530fc5d0dc84ee5',1,'SVF::AndersenBase::numOfSfrs()']]],
|
|
108
108
|
['numofstore',['numOfStore',['../classSVF_1_1SVFGStat.html#a4d15f2de3f226c26cb2af57176444ec9',1,'SVF::SVFGStat']]],
|
|
109
109
|
['numofstorechi',['NumOfStoreChi',['../classSVF_1_1MemSSAStat.html#a810965c025da84c58575c8066bc84056',1,'SVF::MemSSAStat']]],
|
|
110
110
|
['numofstorehaschi',['NumOfStoreHasChi',['../classSVF_1_1MemSSAStat.html#a3bc14307bd0f986cbd8ba5970f1abf0f',1,'SVF::MemSSAStat']]],
|
|
111
|
+
['numofsumedges',['numOfSumEdges',['../classSVF_1_1CFLBase.html#aad77c4e9fb9a3fdceb222fbdec192c51',1,'SVF::CFLBase']]],
|
|
111
112
|
['numoftotalqueries',['numOfTotalQueries',['../classSVF_1_1LockAnalysis.html#ad648ad9cda4070f9aec1addef0067627',1,'SVF::LockAnalysis::numOfTotalQueries()'],['../classSVF_1_1MHP.html#a26ae18993915d76b704232cded9811c2',1,'SVF::MHP::numOfTotalQueries()']]],
|
|
112
113
|
['numperquerystatmap',['NumPerQueryStatMap',['../classSVF_1_1DDAStat.html#a7dabcdacf00844415bd23ca241d885e9',1,'SVF::DDAStat']]],
|
|
113
114
|
['numprelabelednodes',['numPrelabeledNodes',['../classSVF_1_1VersionedFlowSensitive.html#aff5029fca933376be1fa374bec790da6',1,'SVF::VersionedFlowSensitive']]],
|
|
@@ -85,7 +85,7 @@ struct llvm::GraphTraits< Inverse< SVF::CFLNode * > ></h3>
|
|
|
85
85
|
|
|
86
86
|
<p>Inverse GraphTraits specializations for call graph node, it is used for inverse traversal. </p>
|
|
87
87
|
|
|
88
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
88
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00135">135</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
89
89
|
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
|
90
90
|
<li>/home/runner/work/SVF/SVF/include/Graphs/<a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a></li>
|
|
91
91
|
</ul>
|
|
@@ -90,7 +90,7 @@ Public Types</h2></td></tr>
|
|
|
90
90
|
struct llvm::GraphTraits< SVF::CFLGraph * ></h3>
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
93
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00139">139</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
94
94
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
95
95
|
<a id="a6f880b27ee400d73347d77abb7a80f3d"></a>
|
|
96
96
|
<h2 class="memtitle"><span class="permalink"><a href="#a6f880b27ee400d73347d77abb7a80f3d">◆ </a></span>NodeRef</h2>
|
|
@@ -104,7 +104,7 @@ struct llvm::GraphTraits< SVF::CFLGraph * ></h3>
|
|
|
104
104
|
</table>
|
|
105
105
|
</div><div class="memdoc">
|
|
106
106
|
|
|
107
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
107
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00141">141</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
108
108
|
|
|
109
109
|
</div>
|
|
110
110
|
</div>
|
|
@@ -81,7 +81,7 @@ Inheritance diagram for llvm::GraphTraits< SVF::CFLNode * >:</div>
|
|
|
81
81
|
struct llvm::GraphTraits< SVF::CFLNode * ></h3>
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#
|
|
84
|
+
<p class="definition">Definition at line <a class="el" href="CFLGraph_8h_source.html#l00129">129</a> of file <a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a>.</p>
|
|
85
85
|
</div><hr/>The documentation for this struct was generated from the following file:<ul>
|
|
86
86
|
<li>/home/runner/work/SVF/SVF/include/Graphs/<a class="el" href="CFLGraph_8h_source.html">CFLGraph.h</a></li>
|
|
87
87
|
</ul>
|
|
@@ -69,7 +69,7 @@ $(function() {
|
|
|
69
69
|
<a href="svf-ex_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- svf-ex.cpp -- A driver example of SVF-------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===-----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> // A driver program of SVF including usages of SVF APIs</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> //</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="SVFG_8h.html">Graphs/SVFG.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="Andersen_8h.html">WPA/Andersen.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="SVFIRBuilder_8h.html">SVF-FE/SVFIRBuilder.h</a>"</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span><a class="code" href="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">static</span> llvm::cl::opt<std::string> <a class="code" href="svf-ex_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  llvm::cl::desc(<span class="stringliteral">"<input bitcode>"</span>), llvm::cl::init(<span class="stringliteral">"-"</span>));</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#a5fe2142b121150867c08ee9bd8f65940"> 45</a></span> <a class="code" href="namespaceSVF.html#a61c01e2e687ab3a001fb806737583943">SVF::AliasResult</a> <a class="code" href="svf-ex_8cpp.html#a5fe2142b121150867c08ee9bd8f65940">aliasQuery</a>(<a class="code" href="classSVF_1_1PointerAnalysis.html">PointerAnalysis</a>* pta, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* v1, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* v2)</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a6c01f259ad2379a422d7106ce0255eb8">alias</a>(v1,v2);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> }</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#ae004a620ad67220b6dd8212a2ad625a9"> 53</a></span> <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> <a class="code" href="svf-ex_8cpp.html#ae004a620ad67220b6dd8212a2ad625a9">printPts</a>(<a class="code" href="classSVF_1_1PointerAnalysis.html">PointerAnalysis</a>* pta, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* val)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="cJSON_8h.html#ad4c68ea99a26b0a98ad9a79982960458">std::string</a> str;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="namespaceSVF.html#a726981481ac082dcda3e4921416b65a0">raw_string_ostream</a> rawstr(str);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">NodeID</a> pNodeId = pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a240219c2dc4f5cc5f85445e18c79b83b">getPAG</a>()-><a class="code" href="classSVF_1_1IRGraph.html#abffddd41cc308b9b3bd5ad4a7f8f1624">getValueNode</a>(val);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1PointsTo.html">PointsTo</a>& pts = pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a4dfb43679e9fa794ebad99b6584c32ec">getPts</a>(pNodeId);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">for</span> (<a class="code" href="classSVF_1_1PointsTo_1_1PointsToIterator.html">PointsTo::iterator</a> ii = pts.<a class="code" href="classSVF_1_1PointsTo.html#aa53962e561399bf493d1f2b9137356f6">begin</a>(), ie = pts.<a class="code" href="classSVF_1_1PointsTo.html#a8f741cdffbf3c5fe0f602cdca677dee6">end</a>();</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  ii != ie; ii++)</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>  rawstr << <span class="stringliteral">" "</span> << *ii << <span class="stringliteral">" "</span>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="classSVF_1_1SVFVar.html">PAGNode</a>* targetObj = pta-><a class="code" href="classSVF_1_1PointerAnalysis.html#a240219c2dc4f5cc5f85445e18c79b83b">getPAG</a>()-><a class="code" href="classSVF_1_1GenericGraph.html#a43c9c773bfa17abf481c33073e30d01b">getGNode</a>(*ii);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span>(targetObj-><a class="code" href="classSVF_1_1SVFVar.html#a1ace69053c2c4436fd78d5624bd0086a">hasValue</a>())</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  rawstr << <span class="stringliteral">"("</span> <<*targetObj-><a class="code" href="classSVF_1_1SVFVar.html#afaa33caa8d2a306f6741d9d066243e40">getValue</a>() << <span class="stringliteral">")\t "</span>;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</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>  <span class="keywordflow">return</span> rawstr.str();</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> }</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#af45b449c07f1c975eea45d40d1cc37f6"> 80</a></span> <span class="keywordtype">void</span> <a class="code" href="svf-ex_8cpp.html#af45b449c07f1c975eea45d40d1cc37f6">traverseOnICFG</a>(<a class="code" href="classSVF_1_1ICFG.html">ICFG</a>* icfg, <span class="keyword">const</span> <a class="code" href="namespaceSVF.html#a7875172ff434b2210eea7cecfbbd959e">Instruction</a>* inst)</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* iNode = icfg-><a class="code" href="classSVF_1_1ICFG.html#a5f2c0aaba07d6fdd63058da0fb60ca8b">getICFGNode</a>(inst);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="classSVF_1_1FIFOWorkList.html">FIFOWorkList<const ICFGNode*></a> worklist;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const ICFGNode*></a> visited;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(iNode);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">while</span> (!worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a7056704c224dfb4b57287fe90c004aa8">empty</a>())</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* vNode = worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a8fa72918fce7e9c0b2dc34b683a797c6">pop</a>();</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">for</span> (<a class="code" href="classSVF_1_1ICFGNode.html#ac16c5a3227a44d3b9f7c3209156d9df2">ICFGNode::const_iterator</a> it = vNode-><a class="code" href="classSVF_1_1GenericNode.html#aa4f103330118c8976bf95e4bf53416eb">OutEdgeBegin</a>(), eit =</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  vNode-><a class="code" href="classSVF_1_1GenericNode.html#a19a3366fd8a58290d0c740c46c3dcb3d">OutEdgeEnd</a>(); it != eit; ++it)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge = *it;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <a class="code" href="classSVF_1_1ICFGNode.html">ICFGNode</a>* succNode = edge-><a class="code" href="classSVF_1_1GenericEdge.html#aeaa31a2c8479e831b36ce2e2582ceb86">getDstNode</a>();</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">if</span> (visited.find(succNode) == visited.end())</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  visited.insert(succNode);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(succNode);</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>  }</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> }</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#a210d797e39e39071d420ba450727d6e4"> 108</a></span> <span class="keywordtype">void</span> <a class="code" href="svf-ex_8cpp.html#a210d797e39e39071d420ba450727d6e4">traverseOnVFG</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFG.html">SVFG</a>* vfg, <a class="code" href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">Value</a>* val)</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_1SVFIR.html">SVFIR</a>* pag = SVFIR::getPAG();</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <a class="code" href="classSVF_1_1SVFVar.html">PAGNode</a>* pNode = pag-><a class="code" href="classSVF_1_1GenericGraph.html#a43c9c773bfa17abf481c33073e30d01b">getGNode</a>(pag-><a class="code" href="classSVF_1_1IRGraph.html#abffddd41cc308b9b3bd5ad4a7f8f1624">getValueNode</a>(val));</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1VFGNode.html">VFGNode</a>* vNode = vfg-><a class="code" href="classSVF_1_1SVFG.html#a8e7a945f4266e8dc7dcfff2ad6494bfb">getDefSVFGNode</a>(pNode);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <a class="code" href="classSVF_1_1FIFOWorkList.html">FIFOWorkList<const VFGNode*></a> worklist;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const VFGNode*></a> visited;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(vNode);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">while</span> (!worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a7056704c224dfb4b57287fe90c004aa8">empty</a>())</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1VFGNode.html">VFGNode</a>* vNode = worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a8fa72918fce7e9c0b2dc34b683a797c6">pop</a>();</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">for</span> (<a class="code" href="classSVF_1_1VFGNode.html#a3c558955f60c237c558d8faafed781e8">VFGNode::const_iterator</a> it = vNode-><a class="code" href="classSVF_1_1GenericNode.html#aa4f103330118c8976bf95e4bf53416eb">OutEdgeBegin</a>(), eit =</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  vNode-><a class="code" href="classSVF_1_1GenericNode.html#a19a3366fd8a58290d0c740c46c3dcb3d">OutEdgeEnd</a>(); it != eit; ++it)</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>  <a class="code" href="classSVF_1_1VFGEdge.html">VFGEdge</a>* edge = *it;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <a class="code" href="classSVF_1_1VFGNode.html">VFGNode</a>* succNode = edge-><a class="code" href="classSVF_1_1GenericEdge.html#aeaa31a2c8479e831b36ce2e2582ceb86">getDstNode</a>();</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">if</span> (visited.find(succNode) == visited.end())</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>  visited.insert(succNode);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  worklist.<a class="code" href="classSVF_1_1FIFOWorkList.html#a0df409a67428e528321869d201f2a474">push</a>(succNode);</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="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">for</span>(<a class="code" href="namespaceSVF.html#af739db846e47ba6b2fd15eaad31ab7fb">Set<const VFGNode*>::const_iterator</a> it = visited.begin(), eit = visited.end(); it!=eit; ++it)</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  {</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// const VFGNode* node = *it;</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="comment"></span> }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div><div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="svf-ex_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 145</a></span> <span class="keywordtype">int</span> <a class="code" href="svf-ex_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> {</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</span>)</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span> </div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classSVF_1_1SVFIRBuilder.html">SVFIRBuilder</a> builder;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classSVF_1_1SVFIR.html">SVFIR</a>* pag = builder.<a class="code" href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">build</a>(svfModule);</div><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="classSVF_1_1Andersen.html">Andersen</a>* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="classSVF_1_1PTACallGraph.html">PTACallGraph</a>* callgraph = ander-><a class="code" href="classSVF_1_1PointerAnalysis.html#a7c9b7e5fe37ae31ba84d167945ca57df">getPTACallGraph</a>();</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="classSVF_1_1ICFG.html">ICFG</a>* icfg = pag-><a class="code" href="classSVF_1_1SVFIR.html#aa1943d53e75aef9b014953143c6894da">getICFG</a>();</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  icfg-><a class="code" href="classSVF_1_1ICFG.html#a999956500bbd605326531480546db9ba">dump</a>(<span class="stringliteral">"icfg"</span>);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="classSVF_1_1VFG.html">VFG</a>* vfg = <span class="keyword">new</span> <a class="code" href="classSVF_1_1VFG.html">VFG</a>(callgraph);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="classSVF_1_1SVFGBuilder.html">SVFGBuilder</a> svfBuilder(<span class="keyword">true</span>);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="classSVF_1_1SVFG.html">SVFG</a>* svfg = svfBuilder.<a class="code" href="classSVF_1_1SVFGBuilder.html#a54a713e3989597b11cee70864d0197bd">buildFullSVFG</a>(ander);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </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="comment">// clean up memory</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keyword">delete</span> vfg;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keyword">delete</span> svfg;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  AndersenWaveDiff::releaseAndersenWaveDiff();</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  SVFIR::releaseSVFIR();</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  LLVMModuleSet::getLLVMModuleSet()->dumpModulesToFile(<span class="stringliteral">".svf.bc"</span>);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="classSVF_1_1LLVMModuleSet.html#a2f8e91c075d90be66412a079fe73e936">SVF::LLVMModuleSet::releaseLLVMModuleSet</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>  llvm::llvm_shutdown();</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div><div class="ttc" id="Andersen_8h_html"><div class="ttname"><a href="Andersen_8h.html">Andersen.h</a></div></div>
|
|
70
70
|
<div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00044">ICFGEdge.h:44</a></div></div>
|
|
71
71
|
<div class="ttc" id="classSVF_1_1VFG_html"><div class="ttname"><a href="classSVF_1_1VFG.html">SVF::VFG</a></div><div class="ttdef"><b>Definition:</b> <a href="VFG_8h_source.html#l00050">VFG.h:50</a></div></div>
|
|
72
|
-
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#
|
|
72
|
+
<div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00123">CFLGraph.h:123</a></div></div>
|
|
73
73
|
<div class="ttc" id="classSVF_1_1PointerAnalysis_html_a4dfb43679e9fa794ebad99b6584c32ec"><div class="ttname"><a href="classSVF_1_1PointerAnalysis.html#a4dfb43679e9fa794ebad99b6584c32ec">SVF::PointerAnalysis::getPts</a></div><div class="ttdeci">virtual const PointsTo & getPts(NodeID ptr)=0</div><div class="ttdoc">Get points-to targets of a pointer. It needs to be implemented in child class. </div></div>
|
|
74
74
|
<div class="ttc" id="classSVF_1_1SVFIRBuilder_html_aa6d56f9580f76fd09d25ce6cf7541e98"><div class="ttname"><a href="classSVF_1_1SVFIRBuilder.html#aa6d56f9580f76fd09d25ce6cf7541e98">SVF::SVFIRBuilder::build</a></div><div class="ttdeci">virtual SVFIR * build(SVFModule *svfModule)</div><div class="ttdoc">Start building SVFIR here. </div><div class="ttdef"><b>Definition:</b> <a href="SVFIRBuilder_8cpp_source.html#l00050">SVFIRBuilder.cpp:50</a></div></div>
|
|
75
75
|
<div class="ttc" id="namespaceSVF_html_a43a65e0d33af3c743294f7a1139d2301"><div class="ttname"><a href="namespaceSVF.html#a43a65e0d33af3c743294f7a1139d2301">SVF::NodeID</a></div><div class="ttdeci">unsigned NodeID</div><div class="ttdef"><b>Definition:</b> <a href="MTAResultValidator_8h_source.html#l00019">MTAResultValidator.h:19</a></div></div>
|
|
@@ -66,7 +66,7 @@ $(function() {
|
|
|
66
66
|
<div class="title">wpa.cpp</div> </div>
|
|
67
67
|
</div><!--header-->
|
|
68
68
|
<div class="contents">
|
|
69
|
-
<a href="wpa_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- wpa.cpp -- Whole program analysis -------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===-----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> // Whole Program Pointer Analysis</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> //</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="WPAPass_8h.html">WPA/WPAPass.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">using namespace </span><a class="code" href="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">static</span> llvm::cl::opt<std::string> <a class="code" href="wpa_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  llvm::cl::desc(<span class="stringliteral">"<input bitcode>"</span>), llvm::cl::init(<span class="stringliteral">"-"</span>));</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 40</a></span> <span class="keywordtype">int</span> <a class="code" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</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>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><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="classSVF_1_1WPAPass.html">WPAPass</a> *wpa = <span class="keyword">new</span> <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a>();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  wpa-><a class="code" href="classSVF_1_1WPAPass.html#a394dcd976c1ef08d9cadcba8f5d07c75">runOnModule</a>(svfModule);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> }</div><div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#
|
|
69
|
+
<a href="wpa_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//===- wpa.cpp -- Whole program analysis -------------------------------------//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">//</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SVF: Static Value-Flow Analysis</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment">// Copyright (C) <2013-2017> <Yulei Sui></span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment">//</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// This program is free software: you can redistribute it and/or modify</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment">// it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// the Free Software Foundation, either version 3 of the License, or</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">// (at your option) any later version.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment">// This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment">// GNU General Public License for more details.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// You should have received a copy of the GNU General Public License</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment">// along with this program. If not, see <http://www.gnu.org/licenses/>.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">//</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">//===-----------------------------------------------------------------------===//</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment">/*</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> // Whole Program Pointer Analysis</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> //</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> // Author: Yulei Sui,</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="LLVMUtil_8h.html">SVF-FE/LLVMUtil.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="WPAPass_8h.html">WPA/WPAPass.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="Options_8h.html">Util/Options.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">using namespace </span><a class="code" href="namespacellvm.html">llvm</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using namespace </span><a class="code" href="namespaceSVF.html">SVF</a>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">static</span> llvm::cl::opt<std::string> <a class="code" href="wpa_8cpp.html#a139199e1f33675df72b018c31e0be35c">InputFilename</a>(llvm::cl::Positional,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  llvm::cl::desc(<span class="stringliteral">"<input bitcode>"</span>), llvm::cl::init(<span class="stringliteral">"-"</span>));</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 40</a></span> <span class="keywordtype">int</span> <a class="code" href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> ** argv)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordtype">int</span> arg_num = 0;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">char</span> **arg_value = <span class="keyword">new</span> <span class="keywordtype">char</span>*[argc];</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  std::vector<std::string> moduleNameVec;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="namespaceSVF_1_1LLVMUtil.html#accdd44093d6d145dc92edeaaff3f5732">LLVMUtil::processArguments</a>(argc, argv, arg_num, arg_value, moduleNameVec);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  cl::ParseCommandLineOptions(arg_num, arg_value,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="stringliteral">"Whole Program Points-to Analysis\n"</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">if</span> (Options::WriteAnder == <span class="stringliteral">"ir_annotator"</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>  LLVMModuleSet::getLLVMModuleSet()->preProcessBCs(moduleNameVec);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classSVF_1_1SVFModule.html">SVFModule</a>* svfModule = LLVMModuleSet::getLLVMModuleSet()->buildSVFModule(moduleNameVec);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  svfModule-><a class="code" href="classSVF_1_1SVFModule.html#aa03ab5272652290f30870c6e2d053d98">buildSymbolTableInfo</a>();</div><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="classSVF_1_1WPAPass.html">WPAPass</a> *wpa = <span class="keyword">new</span> <a class="code" href="classSVF_1_1WPAPass.html">WPAPass</a>();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  wpa-><a class="code" href="classSVF_1_1WPAPass.html#a394dcd976c1ef08d9cadcba8f5d07c75">runOnModule</a>(svfModule);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> }</div><div class="ttc" id="namespacellvm_html"><div class="ttname"><a href="namespacellvm.html">llvm</a></div><div class="ttdef"><b>Definition:</b> <a href="CFLGraph_8h_source.html#l00123">CFLGraph.h:123</a></div></div>
|
|
70
70
|
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
|
|
71
71
|
<div class="ttc" id="wpa_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="wpa_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdef"><b>Definition:</b> <a href="wpa_8cpp_source.html#l00040">wpa.cpp:40</a></div></div>
|
|
72
72
|
<div class="ttc" id="classSVF_1_1SVFModule_html"><div class="ttname"><a href="classSVF_1_1SVFModule.html">SVF::SVFModule</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00041">SVFModule.h:41</a></div></div>
|
package/include/CFL/CFLAlias.h
CHANGED
|
@@ -30,14 +30,7 @@
|
|
|
30
30
|
#ifndef INCLUDE_CFL_CFLALIAS_H_
|
|
31
31
|
#define INCLUDE_CFL_CFLALIAS_H_
|
|
32
32
|
|
|
33
|
-
#include "CFL/
|
|
34
|
-
#include "CFL/CFGNormalizer.h"
|
|
35
|
-
#include "CFL/GrammarBuilder.h"
|
|
36
|
-
#include "CFL/CFLGraphBuilder.h"
|
|
37
|
-
#include "CFL/CFLGramGraphChecker.h"
|
|
38
|
-
#include "MemoryModel/PointerAnalysis.h"
|
|
39
|
-
#include "Graphs/ConsG.h"
|
|
40
|
-
#include "Util/Options.h"
|
|
33
|
+
#include "CFL/CFLBase.h"
|
|
41
34
|
#include "CFL/CFLStat.h"
|
|
42
35
|
|
|
43
36
|
namespace SVF
|
|
@@ -45,25 +38,27 @@ namespace SVF
|
|
|
45
38
|
|
|
46
39
|
class CFLStat;
|
|
47
40
|
|
|
48
|
-
class CFLAlias : public
|
|
41
|
+
class CFLAlias : public CFLBase
|
|
49
42
|
{
|
|
50
43
|
|
|
51
44
|
public:
|
|
52
45
|
typedef OrderedMap<CallSite, NodeID> CallSite2DummyValPN;
|
|
53
46
|
|
|
54
|
-
CFLAlias(SVFIR* ir) :
|
|
47
|
+
CFLAlias(SVFIR* ir) : CFLBase(ir, PointerAnalysis::CFLFICI_WPA)
|
|
55
48
|
{
|
|
56
49
|
}
|
|
57
50
|
|
|
58
|
-
///
|
|
59
|
-
virtual
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
51
|
+
/// Initialize the grammar, graph, solver
|
|
52
|
+
virtual void initialize();
|
|
53
|
+
|
|
54
|
+
/// Print grammar and graph
|
|
55
|
+
virtual void finalize();
|
|
63
56
|
|
|
64
57
|
/// Start Analysis here (main part of pointer analysis).
|
|
65
58
|
virtual void analyze();
|
|
66
59
|
|
|
60
|
+
virtual void countSumEdges();
|
|
61
|
+
|
|
67
62
|
/// Interface exposed to users of our pointer analysis, given Value infos
|
|
68
63
|
virtual AliasResult alias(const Value* v1, const Value* v2)
|
|
69
64
|
{
|
|
@@ -107,7 +102,6 @@ public:
|
|
|
107
102
|
|
|
108
103
|
/// Need Original one for virtual table
|
|
109
104
|
|
|
110
|
-
|
|
111
105
|
/// Add copy edge on constraint graph
|
|
112
106
|
virtual inline bool addCopyEdge(NodeID src, NodeID dst)
|
|
113
107
|
{
|
|
@@ -142,39 +136,8 @@ public:
|
|
|
142
136
|
|
|
143
137
|
void heapAllocatorViaIndCall(CallSite cs);
|
|
144
138
|
|
|
145
|
-
/// Get CFL graph
|
|
146
|
-
CFLGraph* getCFLGraph()
|
|
147
|
-
{
|
|
148
|
-
return graph;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/// Statistics
|
|
152
|
-
//@{
|
|
153
|
-
static u32_t numOfProcessedAddr; /// Number of processed Addr edge
|
|
154
|
-
static u32_t numOfProcessedCopy; /// Number of processed Copy edge
|
|
155
|
-
static u32_t numOfProcessedGep; /// Number of processed Gep edge
|
|
156
|
-
static u32_t numOfProcessedLoad; /// Number of processed Load edge
|
|
157
|
-
static u32_t numOfProcessedStore; /// Number of processed Store edge
|
|
158
|
-
static u32_t numOfSfrs;
|
|
159
|
-
static u32_t numOfFieldExpand;
|
|
160
|
-
|
|
161
|
-
static u32_t numOfSCCDetection;
|
|
162
|
-
static double timeOfSCCDetection;
|
|
163
|
-
static double timeOfSCCMerges;
|
|
164
|
-
static double timeOfCollapse;
|
|
165
|
-
static u32_t AveragePointsToSetSize;
|
|
166
|
-
static u32_t MaxPointsToSetSize;
|
|
167
|
-
static double timeOfProcessCopyGep;
|
|
168
|
-
static double timeOfProcessLoadStore;
|
|
169
|
-
static double timeOfUpdateCallGraph;
|
|
170
|
-
//@}
|
|
171
|
-
|
|
172
139
|
private:
|
|
173
140
|
CallSite2DummyValPN callsite2DummyValPN; ///< Map an instruction to a dummy obj which created at an indirect callsite, which invokes a heap allocator
|
|
174
|
-
SVFIR* svfir;
|
|
175
|
-
CFLGraph* graph;
|
|
176
|
-
CFLGrammar* grammar;
|
|
177
|
-
CFLSolver *solver;
|
|
178
141
|
};
|
|
179
142
|
|
|
180
143
|
} // End namespace SVF
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
//===----- CFLBase.h -- CFL Analysis Client Base--------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* CFLAlias.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: Oct 12, 2022
|
|
27
|
+
* Author: Pei Xu
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef INCLUDE_CFL_CFLBASE_H_
|
|
31
|
+
#define INCLUDE_CFL_CFLBASE_H_
|
|
32
|
+
|
|
33
|
+
#include "CFL/CFLSolver.h"
|
|
34
|
+
#include "CFL/CFGNormalizer.h"
|
|
35
|
+
#include "CFL/GrammarBuilder.h"
|
|
36
|
+
#include "CFL/CFLGraphBuilder.h"
|
|
37
|
+
#include "CFL/CFLGramGraphChecker.h"
|
|
38
|
+
#include "MemoryModel/PointerAnalysis.h"
|
|
39
|
+
#include "Graphs/ConsG.h"
|
|
40
|
+
#include "Util/Options.h"
|
|
41
|
+
#include "Util/SVFBasicTypes.h"
|
|
42
|
+
|
|
43
|
+
namespace SVF
|
|
44
|
+
{
|
|
45
|
+
|
|
46
|
+
class CFLStat;
|
|
47
|
+
|
|
48
|
+
class CFLBase : public BVDataPTAImpl
|
|
49
|
+
{
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
CFLBase(SVFIR* ir, PointerAnalysis::PTATY pty) : BVDataPTAImpl(ir, pty), svfir(ir), graph(nullptr), grammar(nullptr), solver(nullptr)
|
|
53
|
+
{
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// Destructor
|
|
57
|
+
virtual ~CFLBase()
|
|
58
|
+
{
|
|
59
|
+
delete solver;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/// Initialize the grammar, graph, solver
|
|
63
|
+
virtual void initialize() = 0;
|
|
64
|
+
|
|
65
|
+
/// Print grammar and graph
|
|
66
|
+
virtual void finalize() = 0;
|
|
67
|
+
|
|
68
|
+
/// Start Analysis here (main part of pointer analysis).
|
|
69
|
+
virtual void analyze() = 0;
|
|
70
|
+
|
|
71
|
+
/// Get CFL graph
|
|
72
|
+
CFLGraph* getCFLGraph()
|
|
73
|
+
{
|
|
74
|
+
return graph;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
virtual void countSumEdges() = 0;
|
|
78
|
+
|
|
79
|
+
/// Statistics
|
|
80
|
+
//@{
|
|
81
|
+
static u32_t numOfProcessedAddr; /// Number of processed Addr edge
|
|
82
|
+
static u32_t numOfProcessedCopy; /// Number of processed Copy edge
|
|
83
|
+
static u32_t numOfProcessedGep; /// Number of processed Gep edge
|
|
84
|
+
static u32_t numOfProcessedLoad; /// Number of processed Load edge
|
|
85
|
+
static u32_t numOfProcessedStore; /// Number of processed Store edge
|
|
86
|
+
static u32_t numOfSfrs;
|
|
87
|
+
static u32_t numOfFieldExpand;
|
|
88
|
+
|
|
89
|
+
static u32_t numOfSCCDetection;
|
|
90
|
+
static double timeOfSCCDetection;
|
|
91
|
+
static double timeOfSCCMerges;
|
|
92
|
+
static double timeOfCollapse;
|
|
93
|
+
static u32_t AveragePointsToSetSize;
|
|
94
|
+
static u32_t MaxPointsToSetSize;
|
|
95
|
+
static double timeOfProcessCopyGep;
|
|
96
|
+
static double timeOfProcessLoadStore;
|
|
97
|
+
static double timeOfUpdateCallGraph;
|
|
98
|
+
static double timeOfSolving;
|
|
99
|
+
static double numOfSumEdges;
|
|
100
|
+
//@}
|
|
101
|
+
|
|
102
|
+
protected:
|
|
103
|
+
SVFIR* svfir;
|
|
104
|
+
CFLGraph* graph;
|
|
105
|
+
CFLGrammar* grammar;
|
|
106
|
+
CFLSolver *solver;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
} // End namespace SVF
|
|
110
|
+
|
|
111
|
+
#endif /* INCLUDE_CFL_CFLBASE_H_*/
|
package/include/CFL/CFLStat.h
CHANGED
|
@@ -33,11 +33,13 @@
|
|
|
33
33
|
|
|
34
34
|
#include "Util/PTAStat.h"
|
|
35
35
|
#include "CFL/CFLAlias.h"
|
|
36
|
+
#include "CFL/CFLVF.h"
|
|
36
37
|
|
|
37
38
|
namespace SVF
|
|
38
39
|
{
|
|
39
40
|
|
|
40
41
|
class CFLAlias;
|
|
42
|
+
class CFLVF;
|
|
41
43
|
class SVFIR;
|
|
42
44
|
class ConstraintGraph;
|
|
43
45
|
|
|
@@ -48,7 +50,7 @@ class CFLStat : public PTAStat
|
|
|
48
50
|
{
|
|
49
51
|
|
|
50
52
|
private:
|
|
51
|
-
|
|
53
|
+
CFLBase* pta;
|
|
52
54
|
|
|
53
55
|
public:
|
|
54
56
|
static const char* CollapseTime;
|
|
@@ -65,7 +67,7 @@ public:
|
|
|
65
67
|
/// CFL Stat
|
|
66
68
|
u32_t _NumofCFLGraphNode;
|
|
67
69
|
|
|
68
|
-
CFLStat(
|
|
70
|
+
CFLStat(CFLBase* p);
|
|
69
71
|
|
|
70
72
|
virtual ~CFLStat()
|
|
71
73
|
{
|
package/include/CFL/CFLVF.h
CHANGED
|
@@ -30,44 +30,34 @@
|
|
|
30
30
|
#ifndef INCLUDE_CFL_CFLVF_H_
|
|
31
31
|
#define INCLUDE_CFL_CFLVF_H_
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
#include "CFL/
|
|
35
|
-
#include "CFL/
|
|
36
|
-
#include "CFL/CFLGraphBuilder.h"
|
|
37
|
-
#include "CFL/CFLGramGraphChecker.h"
|
|
38
|
-
#include "MemoryModel/PointerAnalysis.h"
|
|
39
|
-
#include "Graphs/ConsG.h"
|
|
40
|
-
#include "Util/Options.h"
|
|
33
|
+
|
|
34
|
+
#include "CFL/CFLBase.h"
|
|
35
|
+
#include "CFL/CFLStat.h"
|
|
41
36
|
#include "SABER/SaberSVFGBuilder.h"
|
|
37
|
+
#include "WPA/Andersen.h"
|
|
42
38
|
|
|
43
39
|
namespace SVF
|
|
44
40
|
{
|
|
45
|
-
|
|
46
|
-
class CFLVF : public BVDataPTAImpl
|
|
41
|
+
class CFLVF : public CFLBase
|
|
47
42
|
{
|
|
48
43
|
|
|
49
44
|
public:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
CFLVF(SVFIR* ir) : BVDataPTAImpl(ir, PointerAnalysis::CFLFSCS_WPA, false), svfir(ir), graph(nullptr), grammar(nullptr), solver(nullptr)
|
|
45
|
+
CFLVF(SVFIR* ir) : CFLBase(ir, PointerAnalysis::CFLFSCS_WPA)
|
|
53
46
|
{
|
|
54
47
|
}
|
|
55
48
|
|
|
56
|
-
///
|
|
57
|
-
virtual
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
/// Initialize the grammar, graph, solver
|
|
50
|
+
virtual void initialize();
|
|
51
|
+
|
|
52
|
+
/// Print grammar and graph
|
|
53
|
+
virtual void finalize();
|
|
61
54
|
|
|
62
55
|
/// Start Analysis here (main part of pointer analysis).
|
|
63
56
|
virtual void analyze();
|
|
64
57
|
|
|
58
|
+
virtual void countSumEdges();
|
|
59
|
+
|
|
65
60
|
private:
|
|
66
|
-
CallSite2DummyValPN callsite2DummyValPN; ///< Map an instruction to a dummy obj which created at an indirect callsite, which invokes a heap allocator
|
|
67
|
-
SVFIR* svfir;
|
|
68
|
-
CFLGraph* graph;
|
|
69
|
-
CFLGrammar* grammar;
|
|
70
|
-
CFLSolver *solver;
|
|
71
61
|
SaberSVFGBuilder memSSA;
|
|
72
62
|
SVFG* svfg;
|
|
73
63
|
};
|