svf-tools 1.0.381 → 1.0.385

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 (124) hide show
  1. package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +3 -3
  2. package/SVF-doxygen/html/html/Andersen_8cpp_source.html +1 -1
  3. package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
  4. package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +2 -2
  5. package/SVF-doxygen/html/html/ConsG_8cpp_source.html +1 -1
  6. package/SVF-doxygen/html/html/ConsG_8h_source.html +3 -3
  7. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +3 -3
  8. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +6 -6
  9. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +2 -2
  10. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
  11. package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +1 -1
  12. package/SVF-doxygen/html/html/IRGraph_8h_source.html +2 -2
  13. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +14 -14
  14. package/SVF-doxygen/html/html/LocationSet_8h.html +0 -2
  15. package/SVF-doxygen/html/html/LocationSet_8h_source.html +29 -22
  16. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +6 -6
  17. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +2 -2
  18. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +15 -15
  19. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +3 -3
  20. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +6 -6
  21. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +6 -6
  22. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +5 -6
  23. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +35 -35
  24. package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +9 -9
  25. package/SVF-doxygen/html/html/SVFIR_8h_source.html +6 -6
  26. package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +1 -1
  27. package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
  28. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +2 -2
  29. package/SVF-doxygen/html/html/SVFVariables_8h_source.html +8 -8
  30. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
  31. package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +23 -23
  32. package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +1 -1
  33. package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +85 -90
  34. package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +84 -84
  35. package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +3 -3
  36. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +5 -5
  37. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +2 -2
  38. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +3 -3
  39. package/SVF-doxygen/html/html/annotated.html +192 -193
  40. package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +1 -1
  41. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +3 -3
  42. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +4 -4
  43. package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +2 -2
  44. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +1 -1
  45. package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +2 -2
  46. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +3 -3
  47. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
  48. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +2 -2
  49. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +1 -1
  50. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +3 -3
  51. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +8 -8
  52. package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +2 -2
  53. package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +1 -1
  54. package/SVF-doxygen/html/html/classSVF_1_1IRGraph.html +1 -1
  55. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +62 -61
  56. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +7 -7
  57. package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +87 -87
  58. package/SVF-doxygen/html/html/classSVF_1_1NormalGepCGEdge.html +1 -1
  59. package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +88 -92
  60. package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
  61. package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +2 -2
  62. package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +16 -16
  63. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +9 -9
  64. package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +22 -22
  65. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +129 -133
  66. package/SVF-doxygen/html/html/classSVF_1_1SVFModule.html +1 -1
  67. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +1 -1
  68. package/SVF-doxygen/html/html/classSVF_1_1StInfo-members.html +19 -20
  69. package/SVF-doxygen/html/html/classSVF_1_1StInfo.html +60 -84
  70. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +38 -38
  71. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo-members.html +3 -3
  72. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +135 -124
  73. package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +3 -3
  74. package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +6 -6
  75. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +3 -3
  76. package/SVF-doxygen/html/html/classes.html +97 -98
  77. package/SVF-doxygen/html/html/functions_f.html +11 -22
  78. package/SVF-doxygen/html/html/functions_func_f.html +0 -3
  79. package/SVF-doxygen/html/html/functions_func_g.html +24 -31
  80. package/SVF-doxygen/html/html/functions_g.html +22 -29
  81. package/SVF-doxygen/html/html/functions_l.html +5 -5
  82. package/SVF-doxygen/html/html/functions_n.html +3 -3
  83. package/SVF-doxygen/html/html/functions_o.html +3 -3
  84. package/SVF-doxygen/html/html/functions_p.html +10 -10
  85. package/SVF-doxygen/html/html/functions_r.html +2 -2
  86. package/SVF-doxygen/html/html/functions_s.html +14 -12
  87. package/SVF-doxygen/html/html/functions_t.html +3 -3
  88. package/SVF-doxygen/html/html/functions_v.html +3 -3
  89. package/SVF-doxygen/html/html/functions_vars_f.html +1 -7
  90. package/SVF-doxygen/html/html/functions_w.html +9 -5
  91. package/SVF-doxygen/html/html/hierarchy.html +332 -333
  92. package/SVF-doxygen/html/html/namespaceSVF.html +0 -2
  93. package/SVF-doxygen/html/html/search/all_10.js +8 -8
  94. package/SVF-doxygen/html/html/search/all_12.js +3 -3
  95. package/SVF-doxygen/html/html/search/all_13.js +10 -10
  96. package/SVF-doxygen/html/html/search/all_14.js +3 -3
  97. package/SVF-doxygen/html/html/search/all_15.js +1 -1
  98. package/SVF-doxygen/html/html/search/all_16.js +1 -1
  99. package/SVF-doxygen/html/html/search/all_17.js +1 -1
  100. package/SVF-doxygen/html/html/search/all_6.js +1 -4
  101. package/SVF-doxygen/html/html/search/all_7.js +3 -5
  102. package/SVF-doxygen/html/html/search/all_c.js +3 -3
  103. package/SVF-doxygen/html/html/search/all_d.js +2 -2
  104. package/SVF-doxygen/html/html/search/all_e.js +5 -5
  105. package/SVF-doxygen/html/html/search/all_f.js +1 -1
  106. package/SVF-doxygen/html/html/search/classes_5.js +0 -1
  107. package/SVF-doxygen/html/html/search/functions_10.js +1 -1
  108. package/SVF-doxygen/html/html/search/functions_5.js +0 -1
  109. package/SVF-doxygen/html/html/search/functions_6.js +3 -5
  110. package/SVF-doxygen/html/html/search/functions_e.js +1 -1
  111. package/SVF-doxygen/html/html/search/variables_14.js +1 -1
  112. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  113. package/SVF-doxygen/html/html/search/variables_6.js +1 -3
  114. package/SVF-doxygen/html/html/search/variables_d.js +1 -1
  115. package/SVF-doxygen/html/html/search/variables_e.js +3 -3
  116. package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1LocationSet_01_4.html +4 -4
  117. package/include/MemoryModel/LocationSet.h +0 -24
  118. package/include/MemoryModel/SVFVariables.h +1 -1
  119. package/include/MemoryModel/SymbolTableInfo.h +11 -10
  120. package/lib/MemoryModel/LocationSet.cpp +3 -0
  121. package/lib/MemoryModel/SymbolTableInfo.cpp +42 -62
  122. package/lib/SVF-FE/SVFIRBuilder.cpp +21 -50
  123. package/lib/SVF-FE/SymbolTableBuilder.cpp +3 -3
  124. package/package.json +1 -1
@@ -237,11 +237,9 @@ var searchData=
237
237
  ['getflattenedelemidx',['getFlattenedElemIdx',['../classSVF_1_1SymbolTableInfo.html#a6fe89e9d6c18a6aff6dffc1c78d08dff',1,'SVF::SymbolTableInfo']]],
238
238
  ['getflattenedelemidxvec',['getFlattenedElemIdxVec',['../classSVF_1_1StInfo.html#a55e5fd85f232c1867c5c6a73646d53eb',1,'SVF::StInfo']]],
239
239
  ['getflattenedfieldidxvec',['getFlattenedFieldIdxVec',['../classSVF_1_1StInfo.html#aaf05447c20c9f90eea64ab6e88d6ab05',1,'SVF::StInfo']]],
240
- ['getflattenedfieldinfovec',['getFlattenedFieldInfoVec',['../classSVF_1_1SymbolTableInfo.html#a9ca564bdc1f40a2ccd30d98e0e4075b0',1,'SVF::SymbolTableInfo::getFlattenedFieldInfoVec()'],['../classSVF_1_1StInfo.html#ab5908115f11eccee61bd0759a51d5af0',1,'SVF::StInfo::getFlattenedFieldInfoVec()']]],
241
240
  ['getflattenelementtypes',['getFlattenElementTypes',['../classSVF_1_1StInfo.html#ae46e3a2f3eb02e9facf3e317faaf337d',1,'SVF::StInfo']]],
242
- ['getflattenelemty',['getFlattenElemTy',['../classSVF_1_1FlattenedFieldInfo.html#a92c1b65c36feeabf09541c9af4650f14',1,'SVF::FlattenedFieldInfo']]],
243
- ['getflattenfldidx',['getFlattenFldIdx',['../classSVF_1_1FlattenedFieldInfo.html#a34759f793f0445d2941c9a7d1413b7b2',1,'SVF::FlattenedFieldInfo']]],
244
- ['getflatternedfieldtype',['getFlatternedFieldType',['../classSVF_1_1SymbolTableInfo.html#a666d1dff7a629bd34abbd2031c1037a4',1,'SVF::SymbolTableInfo::getFlatternedFieldType()'],['../classSVF_1_1StInfo.html#aecd92dab41e8200a5dd4a10085ad882b',1,'SVF::StInfo::getFlatternedFieldType()']]],
241
+ ['getflattenfieldtypes',['getFlattenFieldTypes',['../classSVF_1_1SymbolTableInfo.html#abdd4abea485b94ae31fd9b75dd3866de',1,'SVF::SymbolTableInfo::getFlattenFieldTypes()'],['../classSVF_1_1StInfo.html#a7fe5593e487a04e8f0eb28ca7bc31fe9',1,'SVF::StInfo::getFlattenFieldTypes()']]],
242
+ ['getflatternedelemtype',['getFlatternedElemType',['../classSVF_1_1SymbolTableInfo.html#a87ee08e81de307eb9c02889b6ed98dd5',1,'SVF::SymbolTableInfo']]],
245
243
  ['getfollowers',['getFollowers',['../classSVF_1_1PCG.html#a1312d734609f82230d3c00a99b189db9',1,'SVF::PCG']]],
246
244
  ['getforkedfun',['getForkedFun',['../classSVF_1_1ThreadAPI.html#a7ddc0c71aeae315af21972a4905b3456',1,'SVF::ThreadAPI::getForkedFun(const Instruction *inst) const'],['../classSVF_1_1ThreadAPI.html#aff38fda045d0016660710ab9124da13c',1,'SVF::ThreadAPI::getForkedFun(CallSite cs) const'],['../namespaceSVF_1_1SVFUtil.html#ac840e43fa58a90099de99a1953f091ac',1,'SVF::SVFUtil::getForkedFun(const CallSite cs)'],['../namespaceSVF_1_1SVFUtil.html#a4cc8c549625712e006079642c656ec83',1,'SVF::SVFUtil::getForkedFun(const Instruction *inst)']]],
247
245
  ['getforkedgebegin',['getForkEdgeBegin',['../classSVF_1_1ThreadCallGraph.html#a8721610a39212613ad55bbd46a35c576',1,'SVF::ThreadCallGraph']]],
@@ -462,7 +460,7 @@ var searchData=
462
460
  ['getoraddintrablockicfgnode',['getOrAddIntraBlockICFGNode',['../classSVF_1_1ICFGBuilder.html#a91599e3ddb71462ec61a50fad91288da',1,'SVF::ICFGBuilder']]],
463
461
  ['getorcreatenode',['getOrCreateNode',['../classSVF_1_1DCHGraph.html#a9ed6b91fad334605f514049a2072b538',1,'SVF::DCHGraph']]],
464
462
  ['getorcreatetctnode',['getOrCreateTCTNode',['../classSVF_1_1TCT.html#a787e815e9c7e53566ce56127dd31a3a9',1,'SVF::TCT']]],
465
- ['getoriginalfieldtype',['getOriginalFieldType',['../classSVF_1_1SymbolTableInfo.html#a866085ff37b7841606c523817c621f49',1,'SVF::SymbolTableInfo::getOriginalFieldType()'],['../classSVF_1_1StInfo.html#acf1ba3bc3ffbd2f7d457b613b6c5f4be',1,'SVF::StInfo::getOriginalFieldType()']]],
463
+ ['getoriginalelemtype',['getOriginalElemType',['../classSVF_1_1SymbolTableInfo.html#abffa6bdac98c5e64615291e8f2537caa',1,'SVF::SymbolTableInfo::getOriginalElemType()'],['../classSVF_1_1StInfo.html#a828941e63c26448bc9ace9adb72db454',1,'SVF::StInfo::getOriginalElemType()']]],
466
464
  ['getoriginalobj',['getOriginalObj',['../classSVF_1_1TypeBasedHeapCloning.html#aeea7089c6f54b44f0509d41686b649f6',1,'SVF::TypeBasedHeapCloning']]],
467
465
  ['getoutedges',['getOutEdges',['../classSVF_1_1GenericNode.html#a2d9cd758d6f8c5189d9b90b74f43e009',1,'SVF::GenericNode']]],
468
466
  ['getoutgoingedges',['getOutgoingEdges',['../classSVF_1_1SVFVar.html#a927733580b47be5ffcfced44ba9fd6c3',1,'SVF::SVFVar']]],
@@ -37,7 +37,7 @@ var searchData=
37
37
  ['plainmap',['plainMap',['../classSVF_1_1FlowSensitive.html#a5a8688102f3675cf414b01dc2ae51c6b',1,'SVF::FlowSensitive']]],
38
38
  ['pmx',['PMX',['../cuddInt_8c.html#a6e6108316d27c8e3b393f65362e5e37b',1,'cuddInt.c']]],
39
39
  ['pointeranalysis',['PointerAnalysis',['../classSVF_1_1PointerAnalysis.html#a14e2a209cb594f91a24ef09b12f82f3f',1,'SVF::PointerAnalysis']]],
40
- ['pointsto',['pointsTo',['../classSVF_1_1CondPointsToSet.html#a63f09ca69e00b317de29af6a6a12daac',1,'SVF::CondPointsToSet::pointsTo(void)'],['../classSVF_1_1CondPointsToSet.html#ada240bc77570174a1d17ac097583fa78',1,'SVF::CondPointsToSet::pointsTo(void) const'],['../classSVF_1_1CondPointsToSet.html#a03311162626acf16ad05b7b93248a92b',1,'SVF::CondPointsToSet::pointsTo(Cond cond) const'],['../classSVF_1_1CondPointsToSet.html#a8775ef2c073af6c8055c3f5b0035288f',1,'SVF::CondPointsToSet::pointsTo(Cond cond)'],['../classSVF_1_1PointsTo.html#a05aa807f21f311eb50ff11dde98b8d22',1,'SVF::PointsTo::PointsTo(void)'],['../classSVF_1_1PointsTo.html#acef2d3e41263aef641c3411e28ad445c',1,'SVF::PointsTo::PointsTo(const PointsTo &pt)'],['../classSVF_1_1PointsTo.html#a5ecef616428a70e8e7726406dfb43544',1,'SVF::PointsTo::PointsTo(PointsTo &&pt)']]],
40
+ ['pointsto',['PointsTo',['../classSVF_1_1PointsTo.html#a05aa807f21f311eb50ff11dde98b8d22',1,'SVF::PointsTo::PointsTo(void)'],['../classSVF_1_1PointsTo.html#acef2d3e41263aef641c3411e28ad445c',1,'SVF::PointsTo::PointsTo(const PointsTo &pt)'],['../classSVF_1_1PointsTo.html#a5ecef616428a70e8e7726406dfb43544',1,'SVF::PointsTo::PointsTo(PointsTo &&pt)'],['../classSVF_1_1CondPointsToSet.html#a63f09ca69e00b317de29af6a6a12daac',1,'SVF::CondPointsToSet::pointsTo(void)'],['../classSVF_1_1CondPointsToSet.html#ada240bc77570174a1d17ac097583fa78',1,'SVF::CondPointsToSet::pointsTo(void) const'],['../classSVF_1_1CondPointsToSet.html#a03311162626acf16ad05b7b93248a92b',1,'SVF::CondPointsToSet::pointsTo(Cond cond) const'],['../classSVF_1_1CondPointsToSet.html#a8775ef2c073af6c8055c3f5b0035288f',1,'SVF::CondPointsToSet::pointsTo(Cond cond)']]],
41
41
  ['pointstoiterator',['PointsToIterator',['../classSVF_1_1PointsTo_1_1PointsToIterator.html#a3974dee7680da3a43b58932766e77a16',1,'SVF::PointsTo::PointsToIterator::PointsToIterator(void)=delete'],['../classSVF_1_1PointsTo_1_1PointsToIterator.html#a19f371ccb5b1c84fb4adfd5b0c8a3eec',1,'SVF::PointsTo::PointsToIterator::PointsToIterator(const PointsToIterator &pt)'],['../classSVF_1_1PointsTo_1_1PointsToIterator.html#abe128c47fb16093756195f789e5f68d5',1,'SVF::PointsTo::PointsToIterator::PointsToIterator(PointsToIterator &&pt)'],['../classSVF_1_1PointsTo_1_1PointsToIterator.html#ad9efcd9fb0c8201b9166a1560d06a71b',1,'SVF::PointsTo::PointsToIterator::PointsToIterator(const PointsTo *pt, bool end=false)']]],
42
42
  ['pop',['pop',['../classSVF_1_1List.html#a6e85bd3d8b23ccc7752a72e2a5b171ab',1,'SVF::List::pop()'],['../classSVF_1_1FIFOWorkList.html#a8fa72918fce7e9c0b2dc34b683a797c6',1,'SVF::FIFOWorkList::pop()'],['../classSVF_1_1FILOWorkList.html#a3fd9acb6d09fd142bfd402fdf8cac93b',1,'SVF::FILOWorkList::pop()']]],
43
43
  ['popen',['popen',['../util_8h.html#a7a377e01cff8d8243569ddc8bfef959b',1,'util.h']]],
@@ -27,7 +27,7 @@ var searchData=
27
27
  ['timeofcollapse',['timeOfCollapse',['../classSVF_1_1AndersenBase.html#ad40b196c2c699bd115529b806d20de25',1,'SVF::AndersenBase']]],
28
28
  ['timeofcreatemuchi',['TimeOfCreateMUCHI',['../classSVF_1_1MemSSAStat.html#a48c70f0ed1c7d031a3cd528035162e52',1,'SVF::MemSSAStat::TimeOfCreateMUCHI()'],['../classSVF_1_1MemSSA.html#a4d2418b7df74f23d8fd328f66e29f198',1,'SVF::MemSSA::timeOfCreateMUCHI()']]],
29
29
  ['timeofgeneratingmemregions',['TimeOfGeneratingMemRegions',['../classSVF_1_1MemSSAStat.html#a74c36654b7452aa94aa241881f0a83c5',1,'SVF::MemSSAStat::TimeOfGeneratingMemRegions()'],['../classSVF_1_1MemSSA.html#a37dca8a7d155de4870358146d219b5e5',1,'SVF::MemSSA::timeOfGeneratingMemRegions()']]],
30
- ['timeofinsertingphi',['TimeOfInsertingPHI',['../classSVF_1_1MemSSAStat.html#a0c24822c8549af6a96e82312954fab9b',1,'SVF::MemSSAStat::TimeOfInsertingPHI()'],['../classSVF_1_1MemSSA.html#a3c7b5fa73fdc7c805ee3673fbe812b44',1,'SVF::MemSSA::timeOfInsertingPHI()']]],
30
+ ['timeofinsertingphi',['timeOfInsertingPHI',['../classSVF_1_1MemSSA.html#a3c7b5fa73fdc7c805ee3673fbe812b44',1,'SVF::MemSSA::timeOfInsertingPHI()'],['../classSVF_1_1MemSSAStat.html#a0c24822c8549af6a96e82312954fab9b',1,'SVF::MemSSAStat::TimeOfInsertingPHI()']]],
31
31
  ['timeofprocesscopygep',['timeOfProcessCopyGep',['../classSVF_1_1AndersenBase.html#aae14de6fbca9280d8d0290326aa493f0',1,'SVF::AndersenBase']]],
32
32
  ['timeofprocessloadstore',['timeOfProcessLoadStore',['../classSVF_1_1AndersenBase.html#a9fe738f1e11c80006d540f246a80bfdf',1,'SVF::AndersenBase']]],
33
33
  ['timeofsccdetection',['timeOfSCCDetection',['../classSVF_1_1AndersenBase.html#a6b7d0e57f741c446d0bf178939960143',1,'SVF::AndersenBase']]],
@@ -8,7 +8,7 @@ var searchData=
8
8
  ['uniqueunions',['uniqueUnions',['../classSVF_1_1PersistentPointsToCache.html#aacebdd87b1dd45250391d035b032f9d4',1,'SVF::PersistentPointsToCache']]],
9
9
  ['univ',['univ',['../structDdManager.html#ab21d56989b9a13502aeb84228de45df0',1,'DdManager']]],
10
10
  ['unlocksites',['unlocksites',['../classSVF_1_1LockAnalysis.html#aec459af1d1624df55ffc95cd75655780',1,'SVF::LockAnalysis']]],
11
- ['updatecallgraphtime',['UpdateCallGraphTime',['../classSVF_1_1PTAStat.html#a8aedfeb35f76e6d33135637156468894',1,'SVF::PTAStat::UpdateCallGraphTime()'],['../classSVF_1_1FlowSensitive.html#afc140b6c8e78dc2d962f64fdf53b1e07',1,'SVF::FlowSensitive::updateCallGraphTime()']]],
11
+ ['updatecallgraphtime',['updateCallGraphTime',['../classSVF_1_1FlowSensitive.html#afc140b6c8e78dc2d962f64fdf53b1e07',1,'SVF::FlowSensitive::updateCallGraphTime()'],['../classSVF_1_1PTAStat.html#a8aedfeb35f76e6d33135637156468894',1,'SVF::PTAStat::UpdateCallGraphTime()']]],
12
12
  ['updatetime',['updateTime',['../classSVF_1_1FlowSensitive.html#af5a94d14096ae2bbc47b3b3b9f723226',1,'SVF::FlowSensitive']]],
13
13
  ['usedregs',['usedRegs',['../classSVF_1_1MemSSA.html#acf840b71b67cabe831f01f2d358f27fa',1,'SVF::MemSSA']]],
14
14
  ['usepcg',['UsePCG',['../classSVF_1_1Options.html#af2f66307e1d51947676f622c98ef0762',1,'SVF::Options']]],
@@ -8,14 +8,12 @@ var searchData=
8
8
  ['file',['file',['../classSVF_1_1PAGBuilderFromFile.html#a9ce304b448de65fbde586655dce885a4',1,'SVF::PAGBuilderFromFile']]],
9
9
  ['filterfun',['filterFun',['../classSVF_1_1LockResultValidator.html#a70cdb993b3e90c70cc083fb8ed93fb91',1,'SVF::LockResultValidator']]],
10
10
  ['finalcond',['finalCond',['../classSVF_1_1ProgSlice.html#a06d79a32f9f550b068813324dac41460',1,'SVF::ProgSlice']]],
11
- ['finfo',['finfo',['../classSVF_1_1StInfo.html#a3ecda817de388504648fa444312a2974',1,'SVF::StInfo']]],
11
+ ['finfo',['finfo',['../classSVF_1_1StInfo.html#a08cf9420a9c7d4019abee8b42fb578bf',1,'SVF::StInfo']]],
12
12
  ['first',['first',['../structDdLevelQueue.html#abeda70ee389be7223f6a0ac4eb6cca82',1,'DdLevelQueue']]],
13
13
  ['firstfieldeqbase',['FirstFieldEqBase',['../classSVF_1_1Options.html#a8dc477d83a142a62b63207f6f240f224',1,'SVF::Options']]],
14
14
  ['fja',['fja',['../classSVF_1_1MHP.html#a98857a1837cef5519c938d07bb771a60',1,'SVF::MHP']]],
15
15
  ['fkjntoptascevmap',['fkjnToPTASCEVMap',['../classSVF_1_1ForkJoinAnalysis.html#a4207948054a0f98560922f3f07ada10f',1,'SVF::ForkJoinAnalysis']]],
16
16
  ['flags',['flags',['../structMove.html#a279868fb9de35a14b9b4a066487a5e68',1,'Move::flags()'],['../structMtrNode.html#a729ce47dfa70a8e041a89d478c6565f5',1,'MtrNode::flags()'],['../classSVF_1_1CHNode.html#a6844c89f715979709dc52d4854373e72',1,'SVF::CHNode::flags()'],['../classSVF_1_1ObjTypeInfo.html#abf6bbcccf73bfcd5b950803d349c4eb1',1,'SVF::ObjTypeInfo::flags()'],['../classSVF_1_1RaceResultValidator_1_1AccessPair.html#aafb0a0cd068e1632f0d643233cad8ad9',1,'SVF::RaceResultValidator::AccessPair::flags()'],['../classSVF_1_1DCHNode.html#a0b2c21429fd28c50965737a0baa2e90b',1,'SVF::DCHNode::flags()']]],
17
- ['flattenedelemty',['flattenedElemTy',['../classSVF_1_1FlattenedFieldInfo.html#a186f54bc7c43d9ca8c6d1ab152fb36fe',1,'SVF::FlattenedFieldInfo']]],
18
- ['flattenedfldidx',['flattenedFldIdx',['../classSVF_1_1FlattenedFieldInfo.html#a14d271fe9ce4a7d989871088d9daf83a',1,'SVF::FlattenedFieldInfo']]],
19
17
  ['flattenelementtypes',['flattenElementTypes',['../classSVF_1_1StInfo.html#a8b24c6a35701a719cd5f1deef62421cd',1,'SVF::StInfo']]],
20
18
  ['fldidx',['fldIdx',['../classSVF_1_1LocationSet.html#a1937e1b9513135cb46c7f3f02fbe7d03',1,'SVF::LocationSet']]],
21
19
  ['fldidx2typemap',['fldIdx2TypeMap',['../classSVF_1_1StInfo.html#a3da859dcf2a5fe7078b1257dd5f1e479',1,'SVF::StInfo']]],
@@ -39,7 +39,7 @@ var searchData=
39
39
  ['maxpointstosetsize',['MaxPointsToSetSize',['../classSVF_1_1PTAStat.html#af2b45aab2eee96a1cabba3025e4375a2',1,'SVF::PTAStat::MaxPointsToSetSize()'],['../classSVF_1_1AndersenBase.html#abd73e930450b7c605f478672bdf9bdae',1,'SVF::AndersenBase::MaxPointsToSetSize()']]],
40
40
  ['maxreorderings',['maxReorderings',['../structDdManager.html#a61170edf6d08bb1c4bacab68823a825d',1,'DdManager']]],
41
41
  ['maxsccsize',['maxSCCSize',['../classSVF_1_1FlowSensitive.html#aa3d4703756a6297ab5c0756172024fe4',1,'SVF::FlowSensitive']]],
42
- ['maxsize',['maxsize',['../structDdHashTable.html#aba376a6d310dcead9f74cfc459f4a248',1,'DdHashTable::maxsize()'],['../structDdLevelQueue.html#acb7146e9f3dd73a052340c0e4010e6b6',1,'DdLevelQueue::maxsize()'],['../structDdManager.html#aa4d0701dc4e6f11b30085ae30c09fab6',1,'DdManager::maxSize()']]],
42
+ ['maxsize',['maxSize',['../structDdManager.html#aa4d0701dc4e6f11b30085ae30c09fab6',1,'DdManager::maxSize()'],['../structDdHashTable.html#aba376a6d310dcead9f74cfc459f4a248',1,'DdHashTable::maxsize()'],['../structDdLevelQueue.html#acb7146e9f3dd73a052340c0e4010e6b6',1,'DdLevelQueue::maxsize()']]],
43
43
  ['maxsizez',['maxSizeZ',['../structDdManager.html#a4a0b8f95d02bc99557fb55140e9b0963',1,'DdManager']]],
44
44
  ['maxslots',['maxslots',['../structDdLocalCache.html#af4379636b29a9bfe4a55708ac637545a',1,'DdLocalCache']]],
45
45
  ['maxstepinwrapper',['MaxStepInWrapper',['../classSVF_1_1Options.html#a0b82f16ee0c7e6566a6ae20662525e84',1,'SVF::Options']]],
@@ -41,7 +41,7 @@ var searchData=
41
41
  ['numinit',['numInit',['../classSVF_1_1TypeBasedHeapCloning.html#a4c658be1ade99ad1e848cd80332e38ce',1,'SVF::TypeBasedHeapCloning']]],
42
42
  ['numnodes',['numNodes',['../classSVF_1_1NodeIDAllocator.html#a8e76e0da58f0a5bdbd8118ac419cfa62',1,'SVF::NodeIDAllocator']]],
43
43
  ['numnontrivialregionobjects',['NumNonTrivialRegionObjects',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#a1bf9461c717e8dabaee6a57f3d76d61f',1,'SVF::NodeIDAllocator::Clusterer']]],
44
- ['numobjects',['numObjects',['../classSVF_1_1NodeIDAllocator.html#a190c729a3f3f622f82cee4917946b50f',1,'SVF::NodeIDAllocator::numObjects()'],['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#afa74c5ccd22bebe0b76db33066d8b498',1,'SVF::NodeIDAllocator::Clusterer::NumObjects()']]],
44
+ ['numobjects',['NumObjects',['../classSVF_1_1NodeIDAllocator_1_1Clusterer.html#afa74c5ccd22bebe0b76db33066d8b498',1,'SVF::NodeIDAllocator::Clusterer::NumObjects()'],['../classSVF_1_1NodeIDAllocator.html#a190c729a3f3f622f82cee4917946b50f',1,'SVF::NodeIDAllocator::numObjects()']]],
45
45
  ['numofactualin',['numOfActualIn',['../classSVF_1_1SVFGStat.html#a5365744d2ec3594e2255d274f7256569',1,'SVF::SVFGStat']]],
46
46
  ['numofactualout',['numOfActualOut',['../classSVF_1_1SVFGStat.html#a122555f5c4b9746cc2b7f38c7cd6b505',1,'SVF::SVFGStat']]],
47
47
  ['numofactualparam',['numOfActualParam',['../classSVF_1_1SVFGStat.html#a0494c59483520b57acdca95952c93d76',1,'SVF::SVFGStat']]],
@@ -71,7 +71,7 @@ var searchData=
71
71
  ['numofentrychi',['NumOfEntryChi',['../classSVF_1_1MemSSAStat.html#ad96437d0c28f8088c711a718d2f2730e',1,'SVF::MemSSAStat']]],
72
72
  ['numofentrynodes',['numOfEntryNodes',['../classSVF_1_1ICFGStat.html#ad37793e64fe58a8faba201c18d876685',1,'SVF::ICFGStat']]],
73
73
  ['numofexitnodes',['numOfExitNodes',['../classSVF_1_1ICFGStat.html#ad7e00680fb8ca31afbd166f9a4adc5ec',1,'SVF::ICFGStat']]],
74
- ['numoffieldexpand',['numOfFieldExpand',['../classSVF_1_1AndersenBase.html#a9f453ec1b4236b8194ae590981217259',1,'SVF::AndersenBase::numOfFieldExpand()'],['../classSVF_1_1PTAStat.html#a1745e5c3c026a130a70954da9c0074b1',1,'SVF::PTAStat::NumOfFieldExpand()']]],
74
+ ['numoffieldexpand',['NumOfFieldExpand',['../classSVF_1_1PTAStat.html#a1745e5c3c026a130a70954da9c0074b1',1,'SVF::PTAStat::NumOfFieldExpand()'],['../classSVF_1_1AndersenBase.html#a9f453ec1b4236b8194ae590981217259',1,'SVF::AndersenBase::numOfFieldExpand()']]],
75
75
  ['numofflattenelements',['numOfFlattenElements',['../classSVF_1_1StInfo.html#a7aa5b5018b4dec4913eb6aecf25568a4',1,'SVF::StInfo']]],
76
76
  ['numofflattenfields',['numOfFlattenFields',['../classSVF_1_1StInfo.html#aa9b4e659f4a4421aadf736a3de24ca50',1,'SVF::StInfo']]],
77
77
  ['numofformalin',['numOfFormalIn',['../classSVF_1_1SVFGStat.html#abc5e079242666bb55ec7dbc7f258b3db',1,'SVF::SVFGStat']]],
@@ -142,7 +142,7 @@ var searchData=
142
142
  ['numofretnodes',['numOfRetNodes',['../classSVF_1_1ICFGStat.html#ac9bfce40c058ed7ab178fe1f1818e9de',1,'SVF::ICFGStat']]],
143
143
  ['numofreturns',['NumOfReturns',['../classSVF_1_1PTAStat.html#a0a552611fcd20e1310290bdae404a514',1,'SVF::PTAStat']]],
144
144
  ['numofscc',['numOfSCC',['../classSVF_1_1FlowSensitive.html#a0ac955bf06261eec1c6bb78ec99652e3',1,'SVF::FlowSensitive']]],
145
- ['numofsccdetection',['numOfSCCDetection',['../classSVF_1_1AndersenBase.html#a0d7298cbf83568f24fd2bd1926a32968',1,'SVF::AndersenBase::numOfSCCDetection()'],['../classSVF_1_1PTAStat.html#ad1731b88c24bb79728f62cd3e9c55699',1,'SVF::PTAStat::NumOfSCCDetection()']]],
145
+ ['numofsccdetection',['NumOfSCCDetection',['../classSVF_1_1PTAStat.html#ad1731b88c24bb79728f62cd3e9c55699',1,'SVF::PTAStat::NumOfSCCDetection()'],['../classSVF_1_1AndersenBase.html#a0d7298cbf83568f24fd2bd1926a32968',1,'SVF::AndersenBase::numOfSCCDetection()']]],
146
146
  ['numofsfr',['NumOfSfr',['../classSVF_1_1PTAStat.html#a07a1db62ddba50bda787b2985ef8d135',1,'SVF::PTAStat']]],
147
147
  ['numofsfrs',['numOfSfrs',['../classSVF_1_1AndersenBase.html#a25b00d9ca71cbdd27530fc5d0dc84ee5',1,'SVF::AndersenBase']]],
148
148
  ['numofstackobjs',['NumOfStackObjs',['../classSVF_1_1PTAStat.html#ae05503909688a17dc1f282d1d029d24e',1,'SVF::PTAStat']]],
@@ -82,7 +82,7 @@ Public Member Functions</h2></td></tr>
82
82
  struct std::hash&lt; SVF::LocationSet &gt;</h3>
83
83
 
84
84
 
85
- <p class="definition">Definition at line <a class="el" href="LocationSet_8h_source.html#l00162">162</a> of file <a class="el" href="LocationSet_8h_source.html">LocationSet.h</a>.</p>
85
+ <p class="definition">Definition at line <a class="el" href="LocationSet_8h_source.html#l00138">138</a> of file <a class="el" href="LocationSet_8h_source.html">LocationSet.h</a>.</p>
86
86
  </div><h2 class="groupheader">Member Function Documentation</h2>
87
87
  <a id="a701401db0e876205424e9cc797fb5984"></a>
88
88
  <h2 class="memtitle"><span class="permalink"><a href="#a701401db0e876205424e9cc797fb5984">&#9670;&nbsp;</a></span>operator()()</h2>
@@ -108,10 +108,10 @@ struct std::hash&lt; SVF::LocationSet &gt;</h3>
108
108
  </table>
109
109
  </div><div class="memdoc">
110
110
 
111
- <p class="definition">Definition at line <a class="el" href="LocationSet_8h_source.html#l00163">163</a> of file <a class="el" href="LocationSet_8h_source.html">LocationSet.h</a>.</p>
112
- <div class="fragment"><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; {</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <a class="code" href="structSVF_1_1Hash.html">SVF::Hash&lt;std::pair&lt;SVF::NodeID, SVF::NodeID&gt;</a>&gt; h;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; std::hash&lt;SVF::LocationSet::OffsetValueVec&gt; v;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordflow">return</span> h(std::make_pair(ls.<a class="code" href="classSVF_1_1LocationSet.html#ab987c41ffdae931d941f89d03ed09146">accumulateConstantFieldIdx</a>(), v(ls.<a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>())));</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; }</div><div class="ttc" id="classSVF_1_1LocationSet_html_ab987c41ffdae931d941f89d03ed09146"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ab987c41ffdae931d941f89d03ed09146">SVF::LocationSet::accumulateConstantFieldIdx</a></div><div class="ttdeci">s64_t accumulateConstantFieldIdx() const</div><div class="ttdoc">Get methods. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00114">LocationSet.h:114</a></div></div>
111
+ <p class="definition">Definition at line <a class="el" href="LocationSet_8h_source.html#l00139">139</a> of file <a class="el" href="LocationSet_8h_source.html">LocationSet.h</a>.</p>
112
+ <div class="fragment"><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; {</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <a class="code" href="structSVF_1_1Hash.html">SVF::Hash&lt;std::pair&lt;SVF::NodeID, SVF::NodeID&gt;</a>&gt; h;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; std::hash&lt;SVF::LocationSet::OffsetValueVec&gt; v;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordflow">return</span> h(std::make_pair(ls.<a class="code" href="classSVF_1_1LocationSet.html#ab987c41ffdae931d941f89d03ed09146">accumulateConstantFieldIdx</a>(), v(ls.<a class="code" href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">getOffsetValueVec</a>())));</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; }</div><div class="ttc" id="classSVF_1_1LocationSet_html_ab987c41ffdae931d941f89d03ed09146"><div class="ttname"><a href="classSVF_1_1LocationSet.html#ab987c41ffdae931d941f89d03ed09146">SVF::LocationSet::accumulateConstantFieldIdx</a></div><div class="ttdeci">s64_t accumulateConstantFieldIdx() const</div><div class="ttdoc">Get methods. </div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00090">LocationSet.h:90</a></div></div>
113
113
  <div class="ttc" id="structSVF_1_1Hash_html"><div class="ttname"><a href="structSVF_1_1Hash.html">SVF::Hash</a></div><div class="ttdoc">provide extra hash function for std::pair handling </div><div class="ttdef"><b>Definition:</b> <a href="SVFBasicTypes_8h_source.html#l00052">SVFBasicTypes.h:52</a></div></div>
114
- <div class="ttc" id="classSVF_1_1LocationSet_html_a5a5ca0b81da0b34ab426bc6a28ed346c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">SVF::LocationSet::getOffsetValueVec</a></div><div class="ttdeci">const OffsetValueVec &amp; getOffsetValueVec() const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00122">LocationSet.h:122</a></div></div>
114
+ <div class="ttc" id="classSVF_1_1LocationSet_html_a5a5ca0b81da0b34ab426bc6a28ed346c"><div class="ttname"><a href="classSVF_1_1LocationSet.html#a5a5ca0b81da0b34ab426bc6a28ed346c">SVF::LocationSet::getOffsetValueVec</a></div><div class="ttdeci">const OffsetValueVec &amp; getOffsetValueVec() const</div><div class="ttdef"><b>Definition:</b> <a href="LocationSet_8h_source.html#l00098">LocationSet.h:98</a></div></div>
115
115
  </div><!-- fragment -->
116
116
  </div>
117
117
  </div>
@@ -39,30 +39,6 @@
39
39
  namespace SVF
40
40
  {
41
41
 
42
- /*!
43
- * Field information of an aggregate object
44
- */
45
- class FlattenedFieldInfo
46
- {
47
- private:
48
- u32_t flattenedFldIdx;
49
- const Type* flattenedElemTy;
50
- public:
51
- FlattenedFieldInfo(u32_t idx, const Type* ty) :
52
- flattenedFldIdx(idx), flattenedElemTy(ty)
53
- {
54
- }
55
- inline u32_t getFlattenFldIdx() const
56
- {
57
- return flattenedFldIdx;
58
- }
59
- inline const Type* getFlattenElemTy() const
60
- {
61
- return flattenedElemTy;
62
- }
63
- };
64
-
65
-
66
42
  /*
67
43
  * Location set represents a set of locations in a memory block with following offsets:
68
44
  * { offset + \sum_{i=0}^N (stride_i * j_i) | 0 \leq j_i < M_i }
@@ -503,7 +503,7 @@ public:
503
503
  /// Return the type of this gep object
504
504
  inline virtual const Type* getType() const
505
505
  {
506
- return SymbolTableInfo::SymbolInfo()->getOriginalFieldType(mem->getType(), ls.accumulateConstantFieldIdx());
506
+ return SymbolTableInfo::SymbolInfo()->getFlatternedElemType(mem->getType(), ls.accumulateConstantFieldIdx());
507
507
  }
508
508
 
509
509
  /// Return name of a LLVM value
@@ -358,13 +358,12 @@ public:
358
358
  /// Flatterned element idx of an array or struct by considering stride
359
359
  u32_t getFlattenedElemIdx(const Type *T, s64_t origId);
360
360
 
361
- const std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec(const Type *T);
362
-
363
361
  /// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
364
- /// OriginalFieldType of b with field_idx 1 : Struct A
365
- /// FlatternedFieldType of b with field_idx 1 : int
366
- const Type* getOriginalFieldType(const Type* baseType, u32_t field_idx);
367
- const Type* getFlatternedFieldType(const Type* baseType, u32_t field_idx);
362
+ /// OriginalElemType of b with field_idx 1 : Struct A
363
+ /// FlatternedElemType of b with field_idx 1 : int
364
+ const Type* getOriginalElemType(const Type* baseType, u32_t origId);
365
+ /// Return the type of a flattened element given a flattened index
366
+ const Type* getFlatternedElemType(const Type* baseType, u32_t flatten_idx);
368
367
  //@}
369
368
 
370
369
  /// Collect type info
@@ -381,6 +380,9 @@ public:
381
380
  virtual void dump();
382
381
 
383
382
  protected:
383
+ /// Return the flattened field type for struct type only
384
+ const std::vector<const Type*>& getFlattenFieldTypes(const StructType *T);
385
+
384
386
  /// Collect the struct info
385
387
  virtual void collectStructInfo(const StructType *T);
386
388
  /// Collect the array info
@@ -507,7 +509,7 @@ private:
507
509
  /// Types of all fields of a struct
508
510
  Map<u32_t, const Type*> fldIdx2TypeMap;
509
511
  /// All field infos after flattening a struct
510
- std::vector<FlattenedFieldInfo> finfo;
512
+ std::vector<const Type*> finfo;
511
513
  /// stride represents the number of repetitive elements if this StInfo represent an ArrayType. stride is 1 by default.
512
514
  u32_t stride;
513
515
  /// number of elements after flattenning (including array elements)
@@ -547,8 +549,7 @@ public:
547
549
  /// OriginalFieldType of b with field_idx 1 : Struct A
548
550
  /// FlatternedFieldType of b with field_idx 1 : int
549
551
  //{@
550
- const Type* getOriginalFieldType(u32_t fldIdx);
551
- const Type* getFlatternedFieldType(u32_t fldIdx);
552
+ const Type* getOriginalElemType(u32_t fldIdx);
552
553
 
553
554
  inline std::vector<u32_t>& getFlattenedFieldIdxVec()
554
555
  {
@@ -562,7 +563,7 @@ public:
562
563
  {
563
564
  return flattenElementTypes;
564
565
  }
565
- inline std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec()
566
+ inline std::vector<const Type*>& getFlattenFieldTypes()
566
567
  {
567
568
  return finfo;
568
569
  }
@@ -112,6 +112,9 @@ s64_t LocationSet::accumulateConstantOffset() const{
112
112
 
113
113
  assert(isConstantOffset() && "not a constant offset");
114
114
 
115
+ if(offsetValues.empty())
116
+ return accumulateConstantFieldIdx();
117
+
115
118
  s64_t totalConstOffset = 0;
116
119
  for(int i = offsetValues.size() - 1; i >= 0; i--){
117
120
  const Value* value = offsetValues[i].first;
@@ -67,21 +67,13 @@ void StInfo::addFldWithType(u32_t fldIdx, const Type* type, u32_t elemIdx)
67
67
  /// OriginalFieldType of b with field_idx 1 : Struct A
68
68
  /// FlatternedFieldType of b with field_idx 1 : int
69
69
  //{@
70
- const Type* StInfo::getOriginalFieldType(u32_t fldIdx)
70
+ const Type* StInfo::getOriginalElemType(u32_t fldIdx)
71
71
  {
72
72
  Map<u32_t, const Type*>::const_iterator it = fldIdx2TypeMap.find(fldIdx);
73
73
  if(it!=fldIdx2TypeMap.end())
74
74
  return it->second;
75
75
  return nullptr;
76
76
  }
77
- const Type* StInfo::getFlatternedFieldType(u32_t fldIdx)
78
- {
79
- for(FlattenedFieldInfo& fallenedFld : finfo){
80
- if(fallenedFld.getFlattenFldIdx() == fldIdx)
81
- return fallenedFld.getFlattenElemTy();
82
- }
83
- return nullptr;
84
- }
85
77
 
86
78
  SymbolTableInfo::TypeToFieldInfoMap::iterator SymbolTableInfo::getStructInfoIter(const Type *T)
87
79
  {
@@ -158,8 +150,7 @@ void SymbolTableInfo::collectArrayInfo(const ArrayType* ty)
158
150
  if(totalElemNum==0){
159
151
  stinfo->addFldWithType(0, elemTy, 0);
160
152
  stinfo->setNumOfFieldsAndElems(1, 1);
161
- FlattenedFieldInfo field(0, elemTy);
162
- stinfo->getFlattenedFieldInfoVec().push_back(field);
153
+ stinfo->getFlattenFieldTypes().push_back(elemTy);
163
154
  stinfo->getFlattenElementTypes().push_back(elemTy);
164
155
  return;
165
156
  }
@@ -170,10 +161,8 @@ void SymbolTableInfo::collectArrayInfo(const ArrayType* ty)
170
161
  u32_t nfE = elemStInfo->getNumOfFlattenFields();
171
162
  for (u32_t j = 0; j < nfE; j++)
172
163
  {
173
- u32_t idx = elemStInfo->getFlattenedFieldInfoVec()[j].getFlattenFldIdx();
174
- const Type* fieldTy = elemStInfo->getFlattenedFieldInfoVec()[j].getFlattenElemTy();
175
- FlattenedFieldInfo field(idx, fieldTy);
176
- stinfo->getFlattenedFieldInfoVec().push_back(field);
164
+ const Type* fieldTy = elemStInfo->getFlattenFieldTypes()[j];
165
+ stinfo->getFlattenFieldTypes().push_back(fieldTy);
177
166
  }
178
167
 
179
168
  /// Flatten arrays, map each array element index `i` to flattened index `(i * nfE * totalElemNum)/outArrayElemNum`
@@ -184,12 +173,11 @@ void SymbolTableInfo::collectArrayInfo(const ArrayType* ty)
184
173
 
185
174
  for(u32_t i = 0; i < totalElemNum; i++){
186
175
  for(u32_t j = 0; j < nfE; j++){
187
- stinfo->getFlattenElementTypes().push_back(elemStInfo->getFlattenedFieldInfoVec()[j].getFlattenElemTy());
176
+ stinfo->getFlattenElementTypes().push_back(elemStInfo->getFlattenFieldTypes()[j]);
188
177
  }
189
178
  }
190
179
 
191
180
  assert(stinfo->getFlattenElementTypes().size() == nfE * totalElemNum && "typeForArray size incorrect!!!");
192
-
193
181
  stinfo->setNumOfFieldsAndElems(nfE, nfE * totalElemNum);
194
182
  }
195
183
 
@@ -222,31 +210,27 @@ void SymbolTableInfo::collectStructInfo(const StructType *sty)
222
210
  //Copy ST's info, whose element 0 is the size of ST itself.
223
211
  for (u32_t j = 0; j < nfE; j++)
224
212
  {
225
- u32_t fldIdx = nf + subStinfo->getFlattenedFieldInfoVec()[j].getFlattenFldIdx();
226
- const Type* elemTy = subStinfo->getFlattenedFieldInfoVec()[j].getFlattenElemTy();
227
- FlattenedFieldInfo field(fldIdx, elemTy);
228
- stinfo->getFlattenedFieldInfoVec().push_back(field);
213
+ const Type* elemTy = subStinfo->getFlattenFieldTypes()[j];
214
+ stinfo->getFlattenFieldTypes().push_back(elemTy);
229
215
  }
230
216
  nf += nfE;
231
217
  strideOffset += nfE * subStinfo->getStride();
232
218
  for(u32_t tpi = 0; tpi < subStinfo->getStride(); tpi++){
233
219
  for(u32_t tpj = 0; tpj < nfE; tpj++){
234
- stinfo->getFlattenElementTypes().push_back(subStinfo->getFlattenedFieldInfoVec()[tpj].getFlattenElemTy());
220
+ stinfo->getFlattenElementTypes().push_back(subStinfo->getFlattenFieldTypes()[tpj]);
235
221
  }
236
222
  }
237
223
  }
238
224
  else //simple type
239
225
  {
240
- FlattenedFieldInfo field(nf, et);
241
- stinfo->getFlattenedFieldInfoVec().push_back(field);
242
226
  nf += 1;
243
227
  strideOffset += 1;
228
+ stinfo->getFlattenFieldTypes().push_back(et);
244
229
  stinfo->getFlattenElementTypes().push_back(et);
245
230
  }
246
231
  }
247
232
 
248
233
  assert(stinfo->getFlattenElementTypes().size() == strideOffset && "typeForStruct size incorrect!");
249
-
250
234
  stinfo->setNumOfFieldsAndElems(nf,strideOffset);
251
235
 
252
236
  //Record the size of the complete struct and update max_struct.
@@ -269,11 +253,8 @@ void SymbolTableInfo::collectSimpleTypeInfo(const Type* ty)
269
253
  /// Only one field
270
254
  stinfo->addFldWithType(0, ty, 0);
271
255
 
272
- FlattenedFieldInfo field(0, ty);
273
- stinfo->getFlattenedFieldInfoVec().push_back(field);
274
-
256
+ stinfo->getFlattenFieldTypes().push_back(ty);
275
257
  stinfo->getFlattenElementTypes().push_back(ty);
276
-
277
258
  stinfo->setNumOfFieldsAndElems(1,1);
278
259
  }
279
260
 
@@ -372,11 +353,10 @@ bool SymbolTableInfo::isConstantObjSym(const Value *val)
372
353
  else
373
354
  {
374
355
  StInfo *stInfo = getStructInfo(v->getInitializer()->getType());
375
- const std::vector<FlattenedFieldInfo> &fields = stInfo->getFlattenedFieldInfoVec();
376
- for (std::vector<FlattenedFieldInfo>::const_iterator it = fields.begin(), eit = fields.end(); it != eit; ++it)
356
+ const std::vector<const Type*> &fields = stInfo->getFlattenFieldTypes();
357
+ for (std::vector<const Type*>::const_iterator it = fields.begin(), eit = fields.end(); it != eit; ++it)
377
358
  {
378
- const FlattenedFieldInfo &field = *it;
379
- const Type *elemTy = field.getFlattenElemTy();
359
+ const Type *elemTy = *it;
380
360
  assert(!SVFUtil::isa<FunctionType>(elemTy) && "Initializer of a global is a function?");
381
361
  if (SVFUtil::isa<PointerType>(elemTy))
382
362
  return false;
@@ -429,7 +409,7 @@ u32_t SymbolTableInfo::getFlattenedElemIdx(const Type *T, s64_t origId)
429
409
  {
430
410
  if(Options::ModelArrays){
431
411
  std::vector<u32_t>& so = getStructInfoIter(T)->second->getFlattenedElemIdxVec();
432
- assert ((unsigned)origId <= so.size() && !so.empty() && "Array index out of bounds, can't get flattened index!");
412
+ assert ((unsigned)origId <= so.size() && !so.empty() && "element index out of bounds, can't get flattened index!");
433
413
  return so[origId];
434
414
  }
435
415
  else{
@@ -446,18 +426,29 @@ u32_t SymbolTableInfo::getFlattenedElemIdx(const Type *T, s64_t origId)
446
426
  }
447
427
  }
448
428
 
449
- const std::vector<FlattenedFieldInfo>& SymbolTableInfo::getFlattenedFieldInfoVec(const Type *T)
429
+ const Type* SymbolTableInfo::getOriginalElemType(const Type* baseType, u32_t origId)
450
430
  {
451
- return getStructInfoIter(T)->second->getFlattenedFieldInfoVec();
431
+ return getStructInfoIter(baseType)->second->getOriginalElemType(origId);
452
432
  }
453
433
 
454
- const Type* SymbolTableInfo::getOriginalFieldType(const Type* baseType, u32_t field_idx)
455
- {
456
- return getStructInfoIter(baseType)->second->getOriginalFieldType(field_idx);
434
+ /// Return the type of a flattened element given a flattened index
435
+ const Type* SymbolTableInfo::getFlatternedElemType(const Type* baseType, u32_t flatten_idx){
436
+ if(Options::ModelArrays){
437
+ const std::vector<const Type*>& so = getStructInfoIter(baseType)->second->getFlattenElementTypes();
438
+ assert (flatten_idx <= so.size() && !so.empty() && "element index out of bounds, can't get element type!");
439
+ return so[flatten_idx];
440
+ }
441
+ else{
442
+ const std::vector<const Type*>& so = getStructInfoIter(baseType)->second->getFlattenFieldTypes();
443
+ assert (flatten_idx <= so.size() && !so.empty() && "element index out of bounds, can't get element type!");
444
+ return so[flatten_idx];
445
+ }
457
446
  }
458
447
 
459
- const Type* SymbolTableInfo::getFlatternedFieldType(const Type* baseType, u32_t field_idx){
460
- return getStructInfoIter(baseType)->second->getFlattenElementTypes()[field_idx];
448
+
449
+ const std::vector<const Type*>& SymbolTableInfo::getFlattenFieldTypes(const StructType *T)
450
+ {
451
+ return getStructInfoIter(T)->second->getFlattenFieldTypes();
461
452
  }
462
453
 
463
454
  /*
@@ -481,15 +472,15 @@ void SymbolTableInfo::printFlattenFields(const Type* type)
481
472
  outs() <<" {Type: ";
482
473
  st->print(outs());
483
474
  outs() << "}\n";
484
- std::vector<FlattenedFieldInfo>& finfo = getStructInfo(st)->getFlattenedFieldInfoVec();
475
+ std::vector<const Type*>& finfo = getStructInfo(st)->getFlattenFieldTypes();
485
476
  int field_idx = 0;
486
- for(std::vector<FlattenedFieldInfo>::iterator it = finfo.begin(), eit = finfo.end();
477
+ for(std::vector<const Type*>::const_iterator it = finfo.begin(), eit = finfo.end();
487
478
  it!=eit; ++it, field_idx++)
488
479
  {
489
- outs() << " \tField_idx = " << (*it).getFlattenFldIdx();
480
+ outs() << " \tField_idx = " << field_idx;
490
481
  outs() << ", field type: ";
491
- (*it).getFlattenElemTy()->print(outs());
492
- outs() << ", field size: " << getTypeSizeInBytes((*it).getFlattenElemTy());
482
+ (*it)->print(outs());
483
+ outs() << ", field size: " << getTypeSizeInBytes((*it));
493
484
  outs() << "\n";
494
485
  }
495
486
  outs() << "\n";
@@ -644,22 +635,11 @@ bool ObjTypeInfo::isNonPtrFieldObj(const LocationSet& ls)
644
635
 
645
636
  if (SVFUtil::isa<StructType>(ety) || SVFUtil::isa<ArrayType>(ety))
646
637
  {
647
- bool hasIntersection = false;
648
- const vector<FlattenedFieldInfo> &infovec = SymbolTableInfo::SymbolInfo()->getFlattenedFieldInfoVec(ety);
649
- vector<FlattenedFieldInfo>::const_iterator it = infovec.begin();
650
- vector<FlattenedFieldInfo>::const_iterator eit = infovec.end();
651
- for (; it != eit; ++it)
652
- {
653
- const FlattenedFieldInfo& fieldLS = *it;
654
- if (ls.intersects(LocationSet(fieldLS.getFlattenFldIdx())))
655
- {
656
- hasIntersection = true;
657
- if (fieldLS.getFlattenElemTy()->isPointerTy())
658
- return false;
659
- }
660
- }
661
- //assert(hasIntersection && "cannot find field of specified offset");
662
- return true;
638
+ const Type* elemTy = SymbolTableInfo::SymbolInfo()->getFlatternedElemType(ety, ls.accumulateConstantFieldIdx());
639
+ if(elemTy->isPointerTy())
640
+ return false;
641
+ else
642
+ return true;
663
643
  }
664
644
  else
665
645
  {