svf-tools 1.0.327 → 1.0.331

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.
Files changed (270) hide show
  1. package/SVF-doxygen/html/html/AndersenHCD_8cpp_source.html +1 -1
  2. package/SVF-doxygen/html/html/AndersenSCD_8cpp_source.html +1 -1
  3. package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +7 -7
  4. package/SVF-doxygen/html/html/AndersenSFR_8h_source.html +4 -4
  5. package/SVF-doxygen/html/html/AndersenWaveDiff_8cpp_source.html +1 -1
  6. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +38 -38
  7. package/SVF-doxygen/html/html/Andersen_8h_source.html +6 -6
  8. package/SVF-doxygen/html/html/CSC_8cpp_source.html +2 -3
  9. package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +3 -3
  10. package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
  11. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +2 -2
  12. package/SVF-doxygen/html/html/ConsG_8h_source.html +4 -4
  13. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +6 -6
  14. package/SVF-doxygen/html/html/ContextDDA_8h_source.html +1 -1
  15. package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
  16. package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +1 -1
  17. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +6 -6
  18. package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +1 -1
  19. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +2 -2
  20. package/SVF-doxygen/html/html/FlowDDA_8h_source.html +2 -2
  21. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
  22. package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +3 -3
  23. package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +1 -1
  24. package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +6 -7
  25. package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
  26. package/SVF-doxygen/html/html/IRGraph_8h_source.html +1 -1
  27. package/SVF-doxygen/html/html/LocationSet_8cpp.html +1 -0
  28. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +12 -15
  29. package/SVF-doxygen/html/html/LocationSet_8h.html +1 -1
  30. package/SVF-doxygen/html/html/LocationSet_8h_source.html +26 -40
  31. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +5 -5
  32. package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +1 -1
  33. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +2 -2
  34. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +15 -15
  35. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +10 -10
  36. package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +2 -2
  37. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +28 -29
  38. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +29 -29
  39. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +11 -3
  40. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +71 -70
  41. package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +12 -12
  42. package/SVF-doxygen/html/html/SVFIR_8h_source.html +13 -13
  43. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +3 -3
  44. package/SVF-doxygen/html/html/SVFVariables_8cpp_source.html +2 -2
  45. package/SVF-doxygen/html/html/SVFVariables_8h.html +1 -1
  46. package/SVF-doxygen/html/html/SVFVariables_8h_source.html +69 -69
  47. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +4 -4
  48. package/SVF-doxygen/html/html/Steensgaard_8h_source.html +1 -1
  49. package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +21 -21
  50. package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +1 -1
  51. package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +52 -63
  52. package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +72 -79
  53. package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +3 -3
  54. package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +2 -2
  55. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +13 -13
  56. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +2 -2
  57. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +3 -3
  58. package/SVF-doxygen/html/html/annotated.html +6 -6
  59. package/SVF-doxygen/html/html/classSVF_1_1Andersen-members.html +1 -1
  60. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +79 -79
  61. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase-members.html +1 -1
  62. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +23 -24
  63. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD-members.html +1 -1
  64. package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +9 -9
  65. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD-members.html +1 -1
  66. package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +4 -4
  67. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD-members.html +1 -1
  68. package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +11 -11
  69. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD-members.html +1 -1
  70. package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +13 -13
  71. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +1 -1
  72. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +13 -13
  73. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff-members.html +1 -1
  74. package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +11 -11
  75. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl-members.html +1 -1
  76. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +17 -17
  77. package/SVF-doxygen/html/html/classSVF_1_1CSC.html +2 -3
  78. package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar.html +11 -11
  79. package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjVar.html +11 -11
  80. package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar-members.html +56 -55
  81. package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar.html +44 -41
  82. package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar.png +0 -0
  83. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl-members.html +1 -1
  84. package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +7 -7
  85. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +3 -3
  86. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode-members.html +26 -26
  87. package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +43 -43
  88. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA-members.html +1 -1
  89. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +9 -9
  90. package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +3 -3
  91. package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +1 -1
  92. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
  93. package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar.html +11 -11
  94. package/SVF-doxygen/html/html/classSVF_1_1DummyValVar.html +11 -11
  95. package/SVF-doxygen/html/html/classSVF_1_1FIObjVar.html +13 -13
  96. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA-members.html +1 -1
  97. package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +4 -4
  98. package/SVF-doxygen/html/html/classSVF_1_1FlattenedFieldInfo-members.html +85 -0
  99. package/SVF-doxygen/html/html/classSVF_1_1FlattenedFieldInfo.html +254 -0
  100. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA-members.html +1 -1
  101. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +7 -7
  102. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive-members.html +1 -1
  103. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +9 -9
  104. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +3 -3
  105. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC-members.html +1 -1
  106. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +10 -10
  107. package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +1 -1
  108. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +22 -23
  109. package/SVF-doxygen/html/html/classSVF_1_1GenericNode.png +0 -0
  110. package/SVF-doxygen/html/html/classSVF_1_1GepObjPN.html +3 -3
  111. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar-members.html +173 -0
  112. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +813 -0
  113. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.png +0 -0
  114. package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +2 -2
  115. package/SVF-doxygen/html/html/classSVF_1_1IRAnnotator-members.html +1 -1
  116. package/SVF-doxygen/html/html/classSVF_1_1IRAnnotator.html +8 -8
  117. package/SVF-doxygen/html/html/classSVF_1_1LocationSet-members.html +17 -21
  118. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +150 -326
  119. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +6 -6
  120. package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +84 -84
  121. package/SVF-doxygen/html/html/classSVF_1_1NormalGepCGEdge.html +2 -2
  122. package/SVF-doxygen/html/html/classSVF_1_1NormalGepStmt.html +2 -2
  123. package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +96 -96
  124. package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +5 -5
  125. package/SVF-doxygen/html/html/classSVF_1_1ObjVar.png +0 -0
  126. package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +2 -2
  127. package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +15 -15
  128. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis-members.html +1 -1
  129. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +75 -73
  130. package/SVF-doxygen/html/html/classSVF_1_1RetPN.html +11 -11
  131. package/SVF-doxygen/html/html/classSVF_1_1SVFIR-members.html +1 -1
  132. package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +31 -31
  133. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder-members.html +57 -56
  134. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +301 -229
  135. package/SVF-doxygen/html/html/classSVF_1_1SVFVar.html +4 -4
  136. package/SVF-doxygen/html/html/classSVF_1_1SVFVar.png +0 -0
  137. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +4 -4
  138. package/SVF-doxygen/html/html/classSVF_1_1StInfo-members.html +11 -14
  139. package/SVF-doxygen/html/html/classSVF_1_1StInfo.html +70 -168
  140. package/SVF-doxygen/html/html/classSVF_1_1Steensgaard-members.html +1 -1
  141. package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +4 -4
  142. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +30 -30
  143. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo-members.html +20 -24
  144. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +110 -291
  145. package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +3 -3
  146. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis-members.html +1 -1
  147. package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +9 -9
  148. package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +18 -18
  149. package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.html +11 -11
  150. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive-members.html +1 -1
  151. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +3 -3
  152. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +3 -3
  153. package/SVF-doxygen/html/html/classes.html +6 -6
  154. package/SVF-doxygen/html/html/functions_a.html +13 -10
  155. package/SVF-doxygen/html/html/functions_b.html +1 -5
  156. package/SVF-doxygen/html/html/functions_c.html +19 -20
  157. package/SVF-doxygen/html/html/functions_d.html +1 -1
  158. package/SVF-doxygen/html/html/functions_e.html +0 -16
  159. package/SVF-doxygen/html/html/functions_f.html +21 -19
  160. package/SVF-doxygen/html/html/functions_func.html +15 -12
  161. package/SVF-doxygen/html/html/functions_func_c.html +16 -17
  162. package/SVF-doxygen/html/html/functions_func_d.html +1 -1
  163. package/SVF-doxygen/html/html/functions_func_e.html +2 -8
  164. package/SVF-doxygen/html/html/functions_func_f.html +4 -4
  165. package/SVF-doxygen/html/html/functions_func_g.html +36 -58
  166. package/SVF-doxygen/html/html/functions_func_i.html +11 -14
  167. package/SVF-doxygen/html/html/functions_func_r.html +3 -3
  168. package/SVF-doxygen/html/html/functions_func_s.html +6 -9
  169. package/SVF-doxygen/html/html/functions_func_t.html +1 -1
  170. package/SVF-doxygen/html/html/functions_func_w.html +1 -1
  171. package/SVF-doxygen/html/html/functions_g.html +41 -63
  172. package/SVF-doxygen/html/html/functions_i.html +6 -9
  173. package/SVF-doxygen/html/html/functions_l.html +4 -4
  174. package/SVF-doxygen/html/html/functions_n.html +4 -7
  175. package/SVF-doxygen/html/html/functions_o.html +25 -20
  176. package/SVF-doxygen/html/html/functions_p.html +12 -16
  177. package/SVF-doxygen/html/html/functions_r.html +4 -4
  178. package/SVF-doxygen/html/html/functions_s.html +15 -18
  179. package/SVF-doxygen/html/html/functions_t.html +1 -1
  180. package/SVF-doxygen/html/html/functions_type_e.html +0 -4
  181. package/SVF-doxygen/html/html/functions_type_o.html +3 -0
  182. package/SVF-doxygen/html/html/functions_v.html +3 -3
  183. package/SVF-doxygen/html/html/functions_vars_b.html +1 -5
  184. package/SVF-doxygen/html/html/functions_vars_c.html +1 -1
  185. package/SVF-doxygen/html/html/functions_vars_e.html +0 -6
  186. package/SVF-doxygen/html/html/functions_vars_f.html +9 -7
  187. package/SVF-doxygen/html/html/functions_vars_l.html +1 -1
  188. package/SVF-doxygen/html/html/functions_vars_n.html +0 -3
  189. package/SVF-doxygen/html/html/functions_vars_o.html +2 -2
  190. package/SVF-doxygen/html/html/functions_w.html +1 -1
  191. package/SVF-doxygen/html/html/hierarchy.html +64 -64
  192. package/SVF-doxygen/html/html/namespaceSVF.html +3 -3
  193. package/SVF-doxygen/html/html/search/all_1.js +3 -2
  194. package/SVF-doxygen/html/html/search/all_10.js +6 -6
  195. package/SVF-doxygen/html/html/search/all_12.js +3 -3
  196. package/SVF-doxygen/html/html/search/all_13.js +5 -6
  197. package/SVF-doxygen/html/html/search/all_14.js +6 -6
  198. package/SVF-doxygen/html/html/search/all_16.js +2 -2
  199. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  200. package/SVF-doxygen/html/html/search/all_2.js +2 -3
  201. package/SVF-doxygen/html/html/search/all_3.js +5 -5
  202. package/SVF-doxygen/html/html/search/all_4.js +1 -1
  203. package/SVF-doxygen/html/html/search/all_5.js +0 -5
  204. package/SVF-doxygen/html/html/search/all_6.js +6 -5
  205. package/SVF-doxygen/html/html/search/all_7.js +15 -23
  206. package/SVF-doxygen/html/html/search/all_9.js +2 -3
  207. package/SVF-doxygen/html/html/search/all_c.js +4 -4
  208. package/SVF-doxygen/html/html/search/all_e.js +1 -2
  209. package/SVF-doxygen/html/html/search/all_f.js +5 -4
  210. package/SVF-doxygen/html/html/search/classes_5.js +1 -1
  211. package/SVF-doxygen/html/html/search/classes_6.js +1 -1
  212. package/SVF-doxygen/html/html/search/functions_0.js +3 -2
  213. package/SVF-doxygen/html/html/search/functions_10.js +2 -3
  214. package/SVF-doxygen/html/html/search/functions_11.js +1 -1
  215. package/SVF-doxygen/html/html/search/functions_14.js +1 -1
  216. package/SVF-doxygen/html/html/search/functions_2.js +3 -3
  217. package/SVF-doxygen/html/html/search/functions_3.js +1 -1
  218. package/SVF-doxygen/html/html/search/functions_4.js +0 -2
  219. package/SVF-doxygen/html/html/search/functions_5.js +1 -1
  220. package/SVF-doxygen/html/html/search/functions_6.js +15 -23
  221. package/SVF-doxygen/html/html/search/functions_8.js +1 -2
  222. package/SVF-doxygen/html/html/search/functions_a.js +1 -1
  223. package/SVF-doxygen/html/html/search/functions_e.js +1 -1
  224. package/SVF-doxygen/html/html/search/functions_f.js +1 -1
  225. package/SVF-doxygen/html/html/search/typedefs_4.js +0 -1
  226. package/SVF-doxygen/html/html/search/typedefs_e.js +1 -0
  227. package/SVF-doxygen/html/html/search/variables_14.js +3 -3
  228. package/SVF-doxygen/html/html/search/variables_2.js +2 -3
  229. package/SVF-doxygen/html/html/search/variables_3.js +1 -1
  230. package/SVF-doxygen/html/html/search/variables_5.js +0 -2
  231. package/SVF-doxygen/html/html/search/variables_6.js +5 -4
  232. package/SVF-doxygen/html/html/search/variables_c.js +1 -1
  233. package/SVF-doxygen/html/html/search/variables_e.js +0 -1
  234. package/SVF-doxygen/html/html/search/variables_f.js +1 -1
  235. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +1 -1
  236. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +1 -1
  237. package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +1 -1
  238. package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1LocationSet_01_4.html +5 -5
  239. package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
  240. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
  241. package/include/Graphs/ConsG.h +1 -1
  242. package/include/Graphs/ConsGEdge.h +1 -1
  243. package/include/MemoryModel/LocationSet.h +39 -126
  244. package/include/MemoryModel/PointerAnalysis.h +1 -1
  245. package/include/MemoryModel/SVFIR.h +2 -2
  246. package/include/MemoryModel/SVFStatements.h +1 -1
  247. package/include/MemoryModel/SVFVariables.h +17 -11
  248. package/include/MemoryModel/SymbolTableInfo.h +27 -31
  249. package/include/SVF-FE/SVFIRBuilder.h +6 -1
  250. package/include/Util/IRAnnotator.h +3 -3
  251. package/lib/DDA/ContextDDA.cpp +1 -1
  252. package/lib/Graphs/ConsG.cpp +1 -1
  253. package/lib/Graphs/IRGraph.cpp +1 -1
  254. package/lib/Graphs/OfflineConsG.cpp +1 -1
  255. package/lib/MemoryModel/LocationSet.cpp +53 -95
  256. package/lib/MemoryModel/PointerAnalysis.cpp +4 -2
  257. package/lib/MemoryModel/PointerAnalysisImpl.cpp +4 -4
  258. package/lib/MemoryModel/SVFIR.cpp +4 -4
  259. package/lib/MemoryModel/SVFVariables.cpp +2 -2
  260. package/lib/MemoryModel/SymbolTableInfo.cpp +44 -212
  261. package/lib/SABER/SaberSVFGBuilder.cpp +1 -1
  262. package/lib/SVF-FE/SVFIRBuilder.cpp +135 -7
  263. package/lib/SVF-FE/SymbolTableBuilder.cpp +4 -4
  264. package/lib/Util/TypeBasedHeapCloning.cpp +10 -10
  265. package/lib/WPA/Andersen.cpp +1 -5
  266. package/lib/WPA/AndersenSFR.cpp +2 -2
  267. package/lib/WPA/CSC.cpp +1 -1
  268. package/lib/WPA/FlowSensitiveTBHC.cpp +6 -6
  269. package/package.json +1 -1
  270. package/tools/Example/svf-ex.cpp +1 -2
@@ -419,7 +419,7 @@ public:
419
419
  /// offset of the base value variable
420
420
  inline u32_t getOffset() const
421
421
  {
422
- return ls.getOffset();
422
+ return ls.accumulateConstantOffset();
423
423
  }
424
424
 
425
425
  /// Return name of a LLVM value
@@ -448,7 +448,7 @@ public:
448
448
  * Gep Obj variable, this is dynamic generated for field sensitive analysis
449
449
  * Each gep obj variable is one field of a MemObj (base)
450
450
  */
451
- class GepObjPN: public ObjVar
451
+ class GepObjVar: public ObjVar
452
452
  {
453
453
  private:
454
454
  LocationSet ls;
@@ -457,7 +457,7 @@ private:
457
457
  public:
458
458
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
459
459
  //@{
460
- static inline bool classof(const GepObjPN *)
460
+ static inline bool classof(const GepObjVar *)
461
461
  {
462
462
  return true;
463
463
  }
@@ -479,7 +479,7 @@ public:
479
479
  //@}
480
480
 
481
481
  /// Constructor
482
- GepObjPN(const MemObj* mem, NodeID i, const LocationSet& l, PNODEK ty = GepObjNode) :
482
+ GepObjVar(const MemObj* mem, NodeID i, const LocationSet& l, PNODEK ty = GepObjNode) :
483
483
  ObjVar(mem->getValue(), i, mem, ty), ls(l)
484
484
  {
485
485
  base = mem->getId();
@@ -491,6 +491,12 @@ public:
491
491
  return ls;
492
492
  }
493
493
 
494
+ /// offset of the mem object
495
+ inline u32_t getOffset() const
496
+ {
497
+ return ls.accumulateConstantOffset();
498
+ }
499
+
494
500
  /// Set the base object from which this GEP node came from.
495
501
  inline void setBaseNode(NodeID base)
496
502
  {
@@ -504,17 +510,17 @@ public:
504
510
  }
505
511
 
506
512
  /// Return the type of this gep object
507
- inline virtual const llvm::Type* getType() const
513
+ inline virtual const Type* getType() const
508
514
  {
509
- return SymbolTableInfo::SymbolInfo()->getOrigSubTypeWithByteOffset(mem->getType(), ls.getByteOffset());
515
+ return SymbolTableInfo::SymbolInfo()->getOriginalFieldType(mem->getType(), ls.accumulateConstantOffset());
510
516
  }
511
517
 
512
518
  /// Return name of a LLVM value
513
519
  inline const std::string getValueName() const
514
520
  {
515
521
  if (value && value->hasName())
516
- return value->getName().str() + "_" + llvm::itostr(ls.getOffset());
517
- return "offset_" + llvm::itostr(ls.getOffset());
522
+ return value->getName().str() + "_" + llvm::itostr(ls.accumulateConstantOffset());
523
+ return "offset_" + llvm::itostr(ls.accumulateConstantOffset());
518
524
  }
519
525
 
520
526
  virtual const std::string toString() const;
@@ -766,7 +772,7 @@ public:
766
772
  /*
767
773
  * Clone object for GEP objects.
768
774
  */
769
- class CloneGepObjVar : public GepObjPN
775
+ class CloneGepObjVar : public GepObjVar
770
776
  {
771
777
  public:
772
778
  //@{ Methods to support type inquiry through isa, cast, and dyn_cast:
@@ -786,14 +792,14 @@ public:
786
792
 
787
793
  /// Constructor
788
794
  CloneGepObjVar(const MemObj* mem, NodeID i, const LocationSet& l, PNODEK ty = CloneGepObjNode) :
789
- GepObjPN(mem, i, l, ty)
795
+ GepObjVar(mem, i, l, ty)
790
796
  {
791
797
  }
792
798
 
793
799
  /// Return name of this node
794
800
  inline const std::string getValueName() const
795
801
  {
796
- return "clone (gep) of " + GepObjPN::getValueName();
802
+ return "clone (gep) of " + GepObjVar::getValueName();
797
803
  }
798
804
 
799
805
  virtual const std::string toString() const;
@@ -364,19 +364,16 @@ public:
364
364
  }
365
365
 
366
366
  ///Get a reference to the components of struct_info.
367
- const std::vector<u32_t>& getFattenFieldIdxVec(const Type *T);
368
- const std::vector<u32_t>& getFattenFieldOffsetVec(const Type *T);
369
- const std::vector<FieldInfo>& getFlattenFieldInfoVec(const Type *T);
370
- const Type* getOrigSubTypeWithFldInx(const Type* baseType, u32_t field_idx);
371
- const Type* getOrigSubTypeWithByteOffset(const Type* baseType, u32_t byteOffset);
367
+ const std::vector<u32_t>& getFlattenedFieldIdxVec(const Type *T);
368
+ const std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec(const Type *T);
369
+
370
+ /// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
371
+ /// OriginalFieldType of b with field_idx 1 : Struct A
372
+ /// FlatternedFieldType of b with field_idx 1 : int
373
+ const Type* getOriginalFieldType(const Type* baseType, u32_t field_idx);
374
+ const Type* getFlatternedFieldType(const Type* baseType, u32_t field_idx);
372
375
  //@}
373
376
 
374
- /// Compute gep offset
375
- virtual bool computeGepOffset(const User *V, LocationSet& ls);
376
- /// Get the base type and max offset
377
- const Type *getBaseTypeAndFlattenedFields(const Value *V, std::vector<LocationSet> &fields);
378
- /// Replace fields with flatten fields of T if the number of its fields is larger than msz.
379
- u32_t getFields(std::vector<LocationSet>& fields, const Type* T, u32_t msz);
380
377
  /// Collect type info
381
378
  void collectTypeInfo(const Type* T);
382
379
  /// Given an offset from a Gep Instruction, return it modulus offset by considering memory layout
@@ -511,14 +508,10 @@ class StInfo
511
508
  private:
512
509
  /// flattened field indices of a struct
513
510
  std::vector<u32_t> fldIdxVec;
514
- /// flattened field offsets of of a struct
515
- std::vector<u32_t> foffset;
516
511
  /// Types of all fields of a struct
517
- Map<u32_t, const llvm::Type*> fldIdx2TypeMap;
518
- /// Types of all fields of a struct
519
- Map<u32_t, const llvm::Type*> offset2TypeMap;
512
+ Map<u32_t, const Type*> fldIdx2TypeMap;
520
513
  /// All field infos after flattening a struct
521
- std::vector<FieldInfo> finfo;
514
+ std::vector<FlattenedFieldInfo> finfo;
522
515
 
523
516
  /// Max field limit
524
517
  static u32_t maxFieldLimit;
@@ -543,37 +536,40 @@ public:
543
536
  return maxFieldLimit;
544
537
  }
545
538
 
546
- /// Get method for fields of a struct
539
+ /// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
540
+ /// OriginalFieldType of b with field_idx 1 : Struct A
541
+ /// FlatternedFieldType of b with field_idx 1 : int
547
542
  //{@
548
- inline const llvm::Type* getFieldTypeWithFldIdx(u32_t fldIdx)
543
+ inline const Type* getOriginalFieldType(u32_t fldIdx)
549
544
  {
550
- return fldIdx2TypeMap[fldIdx];
545
+ Map<u32_t, const Type*>::const_iterator it = fldIdx2TypeMap.find(fldIdx);
546
+ if(it!=fldIdx2TypeMap.end())
547
+ return it->second;
548
+ return nullptr;
551
549
  }
552
- inline const llvm::Type* getFieldTypeWithByteOffset(u32_t offset)
550
+ inline const Type* getFlatternedFieldType(u32_t fldIdx)
553
551
  {
554
- return offset2TypeMap[offset];
552
+ for(FlattenedFieldInfo& fallenedFld : finfo){
553
+ if(fallenedFld.getFlattenFldIdx() == fldIdx)
554
+ return fallenedFld.getFlattenElemTy();
555
+ }
556
+ return nullptr;
555
557
  }
556
- inline std::vector<u32_t>& getFieldIdxVec()
558
+ inline std::vector<u32_t>& getFlattenedFieldIdxVec()
557
559
  {
558
560
  return fldIdxVec;
559
561
  }
560
- inline std::vector<u32_t>& getFieldOffsetVec()
561
- {
562
- return foffset;
563
- }
564
- inline std::vector<FieldInfo>& getFlattenFieldInfoVec()
562
+ inline std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec()
565
563
  {
566
564
  return finfo;
567
565
  }
568
566
  //@}
569
567
 
570
568
  /// Add field (index and offset) with its corresponding type
571
- inline void addFldWithType(u32_t fldIdx, u32_t offset, const llvm::Type* type)
569
+ inline void addFldWithType(u32_t fldIdx, const Type* type)
572
570
  {
573
571
  fldIdxVec.push_back(fldIdx);
574
- foffset.push_back(offset);
575
572
  fldIdx2TypeMap[fldIdx] = type;
576
- offset2TypeMap[offset] = type;
577
573
  }
578
574
  };
579
575
 
@@ -124,6 +124,12 @@ public:
124
124
  /// Compute offset of a gep instruction or gep constant expression
125
125
  bool computeGepOffset(const User *V, LocationSet& ls);
126
126
 
127
+ /// Get the base type and max offset
128
+ const Type *getBaseTypeAndFlattenedFields(const Value *V, std::vector<LocationSet> &fields);
129
+
130
+ /// Replace fields with flatten fields of T if the number of its fields is larger than msz.
131
+ u32_t getFields(std::vector<LocationSet>& fields, const Type* T, u32_t msz);
132
+
127
133
  /// Handle direct call
128
134
  void handleDirectCall(CallSite cs, const SVFFunction *F);
129
135
 
@@ -133,7 +139,6 @@ public:
133
139
  /// Handle external call
134
140
  //@{
135
141
  virtual void handleExtCall(CallSite cs, const SVFFunction *F);
136
- const Type *getBaseTypeAndFlattenedFields(Value* v, std::vector<LocationSet> &fields);
137
142
  void addComplexConsForExt(Value *D, Value *S,u32_t sz = 0);
138
143
  //@}
139
144
 
@@ -42,7 +42,7 @@ public:
42
42
  {
43
43
  auto nodeId = it->first;
44
44
  auto pagNode = it->second;
45
- auto gepNode = SVFUtil::dyn_cast<GepObjPN>(pagNode);
45
+ auto gepNode = SVFUtil::dyn_cast<GepObjVar>(pagNode);
46
46
 
47
47
  if (gepNode && writeFlag)
48
48
  {
@@ -61,10 +61,10 @@ public:
61
61
  private:
62
62
  // Write the PAGgepNode to the IR such that metadata name is the SVFIR node id and the operands
63
63
  // are its base node's id and location offset
64
- void writePAGgepNode(SVF::NodeID nodeId, GepObjPN* gepNode)
64
+ void writePAGgepNode(SVF::NodeID nodeId, GepObjVar* gepNode)
65
65
  {
66
66
  auto baseNodeId = gepNode->getBaseNode();
67
- auto locationSetOffset = gepNode->getLocationSet().getOffset();
67
+ auto locationSetOffset = gepNode->getOffset();
68
68
 
69
69
  LLVMContext &context = mainModule->getContext();
70
70
  llvm::SmallVector<llvm::Metadata *, 32> operands;
@@ -318,7 +318,7 @@ bool ContextDDA::isHeapCondMemObj(const CxtVar& var, const StoreSVFGNode*)
318
318
  {
319
319
  if (!mem->getValue()) {
320
320
  PAGNode *pnode = _pag->getGNode(getPtrNodeID(var));
321
- if(GepObjPN* gepobj = SVFUtil::dyn_cast<GepObjPN>(pnode)){
321
+ if(GepObjVar* gepobj = SVFUtil::dyn_cast<GepObjVar>(pnode)){
322
322
  assert(SVFUtil::isa<DummyObjVar>(_pag->getGNode(gepobj->getBaseNode())) && "emtpy refVal in a gep object whose base is a non-dummy object");
323
323
  }
324
324
  else{
@@ -681,7 +681,7 @@ struct DOTGraphTraits<ConstraintGraph*> : public DOTGraphTraits<SVFIR*>
681
681
  }
682
682
  else if (SVFUtil::isa<ObjVar>(node))
683
683
  {
684
- if(SVFUtil::isa<GepObjPN>(node))
684
+ if(SVFUtil::isa<GepObjVar>(node))
685
685
  return "shape=doubleoctagon";
686
686
  else if(SVFUtil::isa<FIObjVar>(node))
687
687
  return "shape=box3d";
@@ -174,7 +174,7 @@ struct DOTGraphTraits<IRGraph*> : public DefaultDOTGraphTraits
174
174
  }
175
175
  else if (SVFUtil::isa<ObjVar>(node))
176
176
  {
177
- if(SVFUtil::isa<GepObjPN>(node))
177
+ if(SVFUtil::isa<GepObjVar>(node))
178
178
  return "shape=doubleoctagon";
179
179
  else if(SVFUtil::isa<FIObjVar>(node))
180
180
  return "shape=box3d";
@@ -254,7 +254,7 @@ struct DOTGraphTraits<OfflineConsG*> : public DOTGraphTraits<SVFIR*>
254
254
  }
255
255
  else if (SVFUtil::isa<ObjVar>(node))
256
256
  {
257
- if(SVFUtil::isa<GepObjPN>(node))
257
+ if(SVFUtil::isa<GepObjVar>(node))
258
258
  return "shape=doubleoctagon";
259
259
  else if(SVFUtil::isa<FIObjVar>(node))
260
260
  return "shape=box3d";
@@ -31,122 +31,80 @@
31
31
 
32
32
  #include "Util/Options.h"
33
33
  #include "MemoryModel/LocationSet.h"
34
+ #include "Util/SVFUtil.h"
34
35
 
35
36
  using namespace SVF;
36
-
37
+ using namespace SVFUtil;
37
38
 
38
39
  /*!
39
- * Add element num and stride pair
40
+ * Add offset value to vector offsetValues
40
41
  */
41
- void LocationSet::addElemNumStridePair(const NodePair& pair)
42
+ bool LocationSet::addOffsetValue(const Value* offsetVal)
42
43
  {
43
- /// The pair will not be added if any number of a stride is zero,
44
- /// because they will not have effect on the locations represented by this LocationSet.
45
- if (pair.first == 0 || pair.second == 0)
46
- return;
47
-
48
- if (Options::SingleStride)
49
- {
50
- if (numStridePair.empty())
51
- numStridePair.push_back(std::make_pair(StInfo::getMaxFieldLimit(),pair.second));
52
- else
53
- {
54
- /// Find the GCD stride
55
- NodeID existStride = (*numStridePair.begin()).second;
56
- NodeID newStride = gcd(pair.second, existStride);
57
- if (newStride != existStride)
58
- {
59
- numStridePair.pop_back();
60
- numStridePair.push_back(std::make_pair(StInfo::getMaxFieldLimit(),newStride));
61
- }
62
- }
63
- }
64
- else
65
- {
66
- numStridePair.push_back(pair);
44
+ for(const Value* val : offsetValues){
45
+ if(val==offsetVal)
46
+ return false;
67
47
  }
48
+ offsetValues.push_back(offsetVal);
49
+ return true;
68
50
  }
69
51
 
70
-
71
- /*!
72
- * Return TRUE if it successfully increases any index by 1
73
- */
74
- bool LocationSet::increaseIfNotReachUpperBound(std::vector<NodeID>& indices,
75
- const ElemNumStridePairVec& pairVec) const
52
+ /// Return TRUE if all offset values are constants
53
+ bool LocationSet::isConstantOffset() const
76
54
  {
77
- assert(indices.size() == pairVec.size() && "vector size not match");
78
-
79
- /// Check if all indices reach upper bound
80
- bool reachUpperBound = true;
81
- for (u32_t i = 0; i < indices.size(); i++)
82
- {
83
- assert(pairVec[i].first > 0 && "number must be greater than 0");
84
- if (indices[i] < (pairVec[i].first - 1))
85
- reachUpperBound = false;
55
+ for(const Value* val : offsetValues){
56
+ if(SVFUtil::isa<ConstantInt>(val) == false)
57
+ return false;
86
58
  }
87
-
88
- /// Increase index if not reach upper bound
89
- bool increased = false;
90
- if (reachUpperBound == false)
91
- {
92
- u32_t i = 0;
93
- while (increased == false)
94
- {
95
- if (indices[i] < (pairVec[i].first - 1))
96
- {
97
- indices[i] += 1;
98
- increased = true;
99
- }
100
- else
101
- {
102
- indices[i] = 0;
103
- i++;
104
- }
105
- }
106
- }
107
-
108
- return increased;
59
+ return true;
109
60
  }
110
61
 
111
-
112
62
  /*!
113
63
  * Compute all possible locations according to offset and number-stride pairs.
114
64
  */
115
65
  NodeBS LocationSet::computeAllLocations() const
116
66
  {
117
-
118
67
  NodeBS result;
119
- result.set(getOffset());
68
+ result.set(accumulateConstantOffset());
69
+ return result;
70
+ }
120
71
 
121
- if (isConstantOffset() == false)
72
+ SVF::LocationSet::LSRelation LocationSet::checkRelation(const LocationSet& LHS, const LocationSet& RHS)
73
+ {
74
+ NodeBS lhsLocations = LHS.computeAllLocations();
75
+ NodeBS rhsLocations = RHS.computeAllLocations();
76
+ if (lhsLocations.intersects(rhsLocations))
122
77
  {
123
- const ElemNumStridePairVec& lhsVec = getNumStridePair();
124
- std::vector<NodeID> indices;
125
- u32_t size = lhsVec.size();
126
- while (size)
127
- {
128
- indices.push_back(0);
129
- size--;
130
- }
131
-
132
- do
133
- {
134
- u32_t i = 0;
135
- NodeID ofst = getOffset();
136
- while (i < lhsVec.size())
137
- {
138
- ofst += (lhsVec[i].second * indices[i]);
139
- i++;
140
- }
141
-
142
- result.set(ofst);
143
-
144
- }
145
- while (increaseIfNotReachUpperBound(indices, lhsVec));
78
+ if (lhsLocations == rhsLocations)
79
+ return Same;
80
+ else if (lhsLocations.contains(rhsLocations))
81
+ return Superset;
82
+ else if (rhsLocations.contains(lhsLocations))
83
+ return Subset;
84
+ else
85
+ return Overlap;
86
+ }
87
+ else
88
+ {
89
+ return NonOverlap;
146
90
  }
147
-
148
- return result;
149
91
  }
150
92
 
151
-
152
-
93
+ /// Dump location set
94
+ std::string LocationSet::dump() const
95
+ {
96
+ std::string str;
97
+ raw_string_ostream rawstr(str);
98
+
99
+ rawstr << "LocationSet\tField_Index: " << accumulateConstantOffset();
100
+ rawstr << ",\tNum-Stride: {";
101
+ const OffsetValueVec& vec = getOffsetValueVec();
102
+ OffsetValueVec::const_iterator it = vec.begin();
103
+ OffsetValueVec::const_iterator eit = vec.end();
104
+ for (; it != eit; ++it)
105
+ {
106
+ rawstr << " (" << value2String(*it) << ")";
107
+ }
108
+ rawstr << " }\n";
109
+ return rawstr.str();
110
+ }
@@ -53,7 +53,6 @@ using namespace SVFUtil;
53
53
  using namespace cppUtil;
54
54
 
55
55
 
56
- CommonCHGraph* PointerAnalysis::chgraph = nullptr;
57
56
  SVFIR* PointerAnalysis::pag = nullptr;
58
57
 
59
58
  const std::string PointerAnalysis::aliasTestMayAlias = "MAYALIAS";
@@ -73,7 +72,7 @@ const std::string PointerAnalysis::aliasTestFailNoAliasMangled = "_Z20EXPECTEDF
73
72
  * Constructor
74
73
  */
75
74
  PointerAnalysis::PointerAnalysis(SVFIR* p, PTATY ty, bool alias_check) :
76
- svfMod(nullptr),ptaTy(ty),stat(nullptr),ptaCallGraph(nullptr),callGraphSCC(nullptr),icfg(nullptr),typeSystem(nullptr)
75
+ svfMod(nullptr),ptaTy(ty),stat(nullptr),ptaCallGraph(nullptr),callGraphSCC(nullptr),icfg(nullptr),typeSystem(nullptr), chgraph(nullptr)
77
76
  {
78
77
  pag = p;
79
78
  OnTheFlyIterBudgetForStat = Options::StatBudget;
@@ -103,6 +102,9 @@ void PointerAnalysis::destroy()
103
102
 
104
103
  delete stat;
105
104
  stat = nullptr;
105
+
106
+ delete chgraph;
107
+ chgraph = nullptr;
106
108
  }
107
109
 
108
110
  /*!
@@ -150,11 +150,11 @@ void BVDataPTAImpl::writeToFile(const string& filename)
150
150
  for (auto it = pag->begin(), ie = pag->end(); it != ie; ++it)
151
151
  {
152
152
  PAGNode* pagNode = it->second;
153
- if (GepObjPN *gepObjPN = SVFUtil::dyn_cast<GepObjPN>(pagNode))
153
+ if (GepObjVar *gepObjPN = SVFUtil::dyn_cast<GepObjVar>(pagNode))
154
154
  {
155
155
  F.os() << it->first << " ";
156
156
  F.os() << pag->getBaseObjVar(it->first) << " ";
157
- F.os() << gepObjPN->getLocationSet().getOffset() << "\n";
157
+ F.os() << gepObjPN->getOffset() << "\n";
158
158
  }
159
159
  }
160
160
 
@@ -411,7 +411,7 @@ void BVDataPTAImpl::normalizePointsTo() {
411
411
  assert(memObj && "Invalid memobj in memToFieldsMap");
412
412
  if (memObj->isFieldInsensitive()) {
413
413
  for (NodeID id : t.second) {
414
- if (SVFUtil::isa<GepObjPN>(pag->getGNode(id))) {
414
+ if (SVFUtil::isa<GepObjVar>(pag->getGNode(id))) {
415
415
  dropNodes.set(id);
416
416
  } else
417
417
  assert(id == base && "Not a GepObj Node or a baseObj Node?");
@@ -437,7 +437,7 @@ void BVDataPTAImpl::normalizePointsTo() {
437
437
  // and remove those nodes from pag
438
438
  for (NodeID n: dropNodes) {
439
439
  NodeID base = pag->getBaseObjVar(n);
440
- GepObjPN *gepNode = SVFUtil::dyn_cast<GepObjPN>(pag->getGNode(n));
440
+ GepObjVar *gepNode = SVFUtil::dyn_cast<GepObjVar>(pag->getGNode(n));
441
441
  const LocationSet ls = gepNode->getLocationSet();
442
442
  GepObjVarMap.erase(std::make_pair(base, ls));
443
443
  memToFieldsMap[base].reset(n);
@@ -383,7 +383,7 @@ NodeID SVFIR::addGepValNode(const Value* curInst,const Value* gepVal, const Loca
383
383
  NodeID SVFIR::getGepObjVar(NodeID id, const LocationSet& ls)
384
384
  {
385
385
  SVFVar* node = pag->getGNode(id);
386
- if (GepObjPN* gepNode = SVFUtil::dyn_cast<GepObjPN>(node))
386
+ if (GepObjVar* gepNode = SVFUtil::dyn_cast<GepObjVar>(node))
387
387
  return getGepObjVar(gepNode->getMemObj(), gepNode->getLocationSet() + ls);
388
388
  else if (FIObjVar* baseNode = SVFUtil::dyn_cast<FIObjVar>(node))
389
389
  return getGepObjVar(baseNode->getMemObj(), ls);
@@ -413,7 +413,7 @@ NodeID SVFIR::getGepObjVar(const MemObj* obj, const LocationSet& ls)
413
413
  LocationSet newLS = SymbolTableInfo::SymbolInfo()->getModulusOffset(obj,ls);
414
414
 
415
415
  // Base and first field are the same memory location.
416
- if (Options::FirstFieldEqBase && newLS.getOffset() == 0) return base;
416
+ if (Options::FirstFieldEqBase && newLS.accumulateConstantOffset() == 0) return base;
417
417
 
418
418
  NodeLocationSetMap::iterator iter = GepObjVarMap.find(std::make_pair(base, newLS));
419
419
  if (iter == GepObjVarMap.end())
@@ -433,9 +433,9 @@ NodeID SVFIR::addGepObjNode(const MemObj* obj, const LocationSet& ls)
433
433
  assert(0==GepObjVarMap.count(std::make_pair(base, ls))
434
434
  && "this node should not be created before");
435
435
 
436
- NodeID gepId = NodeIDAllocator::get()->allocateGepObjectId(base, ls.getOffset(), StInfo::getMaxFieldLimit());
436
+ NodeID gepId = NodeIDAllocator::get()->allocateGepObjectId(base, ls.accumulateConstantOffset(), StInfo::getMaxFieldLimit());
437
437
  GepObjVarMap[std::make_pair(base, ls)] = gepId;
438
- GepObjPN *node = new GepObjPN(obj, gepId, ls);
438
+ GepObjVar *node = new GepObjVar(obj, gepId, ls);
439
439
  memToFieldsMap[base].set(gepId);
440
440
  return addObjNode(obj->getValue(), node, gepId);
441
441
  }
@@ -141,10 +141,10 @@ const std::string GepValVar::toString() const {
141
141
  return rawstr.str();
142
142
  }
143
143
 
144
- const std::string GepObjPN::toString() const {
144
+ const std::string GepObjVar::toString() const {
145
145
  std::string str;
146
146
  raw_string_ostream rawstr(str);
147
- rawstr << "GepObjPN ID: " << getId() << " with offset_" + llvm::itostr(ls.getOffset());
147
+ rawstr << "GepObjVar ID: " << getId() << " with offset_" + llvm::itostr(ls.accumulateConstantOffset());
148
148
  if (Options::PAGDotGraphShorter) {
149
149
  rawstr << "\n";
150
150
  }