svf-tools 1.0.355 → 1.0.359

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 (192) hide show
  1. package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +2 -2
  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/CallGraphBuilder_8cpp_source.html +1 -1
  5. package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
  6. package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +3 -3
  7. package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +6 -6
  8. package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +2 -2
  9. package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
  10. package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +2 -4
  11. package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +7 -7
  12. package/SVF-doxygen/html/html/ICFGNode_8h_source.html +3 -3
  13. package/SVF-doxygen/html/html/ICFG_8cpp_source.html +17 -17
  14. package/SVF-doxygen/html/html/ICFG_8h_source.html +17 -18
  15. package/SVF-doxygen/html/html/IRGraph_8h_source.html +2 -2
  16. package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +3 -3
  17. package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +12 -12
  18. package/SVF-doxygen/html/html/LocationSet_8h_source.html +1 -1
  19. package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +1 -1
  20. package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +2 -2
  21. package/SVF-doxygen/html/html/MHP_8h_source.html +2 -2
  22. package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
  23. package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +10 -10
  24. package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +2 -2
  25. package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +1 -1
  26. package/SVF-doxygen/html/html/PCG_8cpp_source.html +1 -1
  27. package/SVF-doxygen/html/html/PCG_8h_source.html +3 -3
  28. package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +15 -15
  29. package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +2 -2
  30. package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +8 -8
  31. package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +5 -5
  32. package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +3 -3
  33. package/SVF-doxygen/html/html/SVFG_8cpp_source.html +5 -5
  34. package/SVF-doxygen/html/html/SVFG_8h_source.html +5 -5
  35. package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +2 -2
  36. package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +2 -2
  37. package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +7 -7
  38. package/SVF-doxygen/html/html/SVFIR_8h_source.html +8 -8
  39. package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +1 -1
  40. package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
  41. package/SVF-doxygen/html/html/SVFStatements_8h_source.html +1 -1
  42. package/SVF-doxygen/html/html/SVFVariables_8h_source.html +5 -5
  43. package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
  44. package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +22 -22
  45. package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +1 -1
  46. package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +52 -50
  47. package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +86 -83
  48. package/SVF-doxygen/html/html/TCT_8cpp_source.html +1 -1
  49. package/SVF-doxygen/html/html/TCT_8h_source.html +2 -2
  50. package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +3 -3
  51. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +3 -3
  52. package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +1 -1
  53. package/SVF-doxygen/html/html/VFG_8cpp_source.html +3 -3
  54. package/SVF-doxygen/html/html/VFG_8h_source.html +6 -6
  55. package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +3 -3
  56. package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +2 -2
  57. package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +5 -5
  58. package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +2 -2
  59. package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +2 -2
  60. package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +2 -2
  61. package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +1 -1
  62. package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +2 -2
  63. package/SVF-doxygen/html/html/classSVF_1_1CallICFGNode-members.html +1 -1
  64. package/SVF-doxygen/html/html/classSVF_1_1CallICFGNode.html +6 -6
  65. package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +3 -3
  66. package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
  67. package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +2 -2
  68. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +1 -1
  69. package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +3 -3
  70. package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +2 -2
  71. package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +4 -4
  72. package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +1 -1
  73. package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +22 -22
  74. package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +234 -234
  75. package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder-members.html +3 -3
  76. package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +48 -51
  77. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +11 -11
  78. package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +17 -17
  79. package/SVF-doxygen/html/html/classSVF_1_1IRGraph.html +1 -1
  80. package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +3 -3
  81. package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +27 -29
  82. package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +8 -8
  83. package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +2 -2
  84. package/SVF-doxygen/html/html/classSVF_1_1MHP.html +2 -2
  85. package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +16 -16
  86. package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +2 -2
  87. package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +87 -87
  88. package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +6 -6
  89. package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +99 -99
  90. package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
  91. package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +1 -1
  92. package/SVF-doxygen/html/html/classSVF_1_1PCG-members.html +1 -1
  93. package/SVF-doxygen/html/html/classSVF_1_1PCG.html +9 -9
  94. package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +16 -16
  95. package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +11 -11
  96. package/SVF-doxygen/html/html/classSVF_1_1RetICFGNode-members.html +1 -1
  97. package/SVF-doxygen/html/html/classSVF_1_1RetICFGNode.html +5 -5
  98. package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +13 -13
  99. package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT.html +3 -3
  100. package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +20 -20
  101. package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +31 -31
  102. package/SVF-doxygen/html/html/classSVF_1_1SVFModule.html +1 -1
  103. package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +1 -1
  104. package/SVF-doxygen/html/html/classSVF_1_1StInfo-members.html +20 -15
  105. package/SVF-doxygen/html/html/classSVF_1_1StInfo.html +239 -89
  106. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +35 -35
  107. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo-members.html +6 -4
  108. package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +178 -130
  109. package/SVF-doxygen/html/html/classSVF_1_1TCT-members.html +1 -1
  110. package/SVF-doxygen/html/html/classSVF_1_1TCT.html +12 -12
  111. package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +3 -3
  112. package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraphBuilder.html +2 -2
  113. package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +4 -4
  114. package/SVF-doxygen/html/html/classSVF_1_1VFG.html +16 -16
  115. package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +3 -3
  116. package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +6 -6
  117. package/SVF-doxygen/html/html/functions_a.html +13 -13
  118. package/SVF-doxygen/html/html/functions_e.html +3 -0
  119. package/SVF-doxygen/html/html/functions_f.html +15 -20
  120. package/SVF-doxygen/html/html/functions_func.html +13 -13
  121. package/SVF-doxygen/html/html/functions_func_g.html +51 -50
  122. package/SVF-doxygen/html/html/functions_func_s.html +8 -5
  123. package/SVF-doxygen/html/html/functions_g.html +45 -44
  124. package/SVF-doxygen/html/html/functions_i.html +3 -3
  125. package/SVF-doxygen/html/html/functions_l.html +6 -6
  126. package/SVF-doxygen/html/html/functions_n.html +6 -0
  127. package/SVF-doxygen/html/html/functions_p.html +9 -9
  128. package/SVF-doxygen/html/html/functions_r.html +2 -4
  129. package/SVF-doxygen/html/html/functions_s.html +22 -19
  130. package/SVF-doxygen/html/html/functions_t.html +7 -7
  131. package/SVF-doxygen/html/html/functions_vars_e.html +3 -0
  132. package/SVF-doxygen/html/html/functions_vars_f.html +0 -3
  133. package/SVF-doxygen/html/html/functions_vars_n.html +6 -0
  134. package/SVF-doxygen/html/html/search/all_1.js +6 -6
  135. package/SVF-doxygen/html/html/search/all_10.js +6 -6
  136. package/SVF-doxygen/html/html/search/all_12.js +2 -2
  137. package/SVF-doxygen/html/html/search/all_13.js +9 -8
  138. package/SVF-doxygen/html/html/search/all_14.js +4 -4
  139. package/SVF-doxygen/html/html/search/all_15.js +1 -1
  140. package/SVF-doxygen/html/html/search/all_16.js +1 -1
  141. package/SVF-doxygen/html/html/search/all_5.js +1 -0
  142. package/SVF-doxygen/html/html/search/all_6.js +0 -1
  143. package/SVF-doxygen/html/html/search/all_7.js +18 -19
  144. package/SVF-doxygen/html/html/search/all_9.js +1 -1
  145. package/SVF-doxygen/html/html/search/all_c.js +2 -2
  146. package/SVF-doxygen/html/html/search/all_d.js +1 -1
  147. package/SVF-doxygen/html/html/search/all_e.js +4 -2
  148. package/SVF-doxygen/html/html/search/functions_0.js +6 -6
  149. package/SVF-doxygen/html/html/search/functions_10.js +1 -0
  150. package/SVF-doxygen/html/html/search/functions_6.js +18 -19
  151. package/SVF-doxygen/html/html/search/functions_e.js +1 -1
  152. package/SVF-doxygen/html/html/search/variables_14.js +2 -2
  153. package/SVF-doxygen/html/html/search/variables_15.js +1 -1
  154. package/SVF-doxygen/html/html/search/variables_5.js +1 -0
  155. package/SVF-doxygen/html/html/search/variables_6.js +0 -1
  156. package/SVF-doxygen/html/html/search/variables_d.js +1 -1
  157. package/SVF-doxygen/html/html/search/variables_e.js +3 -1
  158. package/SVF-doxygen/html/html/svf-ex_8cpp.html +2 -2
  159. package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +2 -2
  160. package/include/Graphs/ICFG.h +18 -18
  161. package/include/Graphs/ICFGNode.h +2 -2
  162. package/include/Graphs/SVFG.h +4 -4
  163. package/include/Graphs/SVFGOPT.h +2 -2
  164. package/include/Graphs/VFG.h +7 -7
  165. package/include/MTA/LockResultValidator.h +1 -1
  166. package/include/MTA/MHP.h +2 -2
  167. package/include/MTA/PCG.h +2 -2
  168. package/include/MTA/TCT.h +2 -2
  169. package/include/MemoryModel/SVFIR.h +2 -2
  170. package/include/MemoryModel/SymbolTableInfo.h +37 -41
  171. package/include/SVF-FE/ICFGBuilder.h +5 -5
  172. package/include/SVF-FE/SVFIRBuilder.h +1 -1
  173. package/lib/Graphs/ICFG.cpp +23 -23
  174. package/lib/Graphs/SVFG.cpp +4 -4
  175. package/lib/Graphs/VFG.cpp +3 -3
  176. package/lib/MSSA/MemRegion.cpp +7 -7
  177. package/lib/MSSA/MemSSA.cpp +3 -3
  178. package/lib/MTA/LockAnalysis.cpp +4 -4
  179. package/lib/MTA/MTAResultValidator.cpp +1 -1
  180. package/lib/MTA/PCG.cpp +1 -1
  181. package/lib/MTA/TCT.cpp +2 -2
  182. package/lib/MemoryModel/LocationSet.cpp +42 -37
  183. package/lib/MemoryModel/PointerAnalysis.cpp +1 -1
  184. package/lib/MemoryModel/SymbolTableInfo.cpp +71 -8
  185. package/lib/SABER/LeakChecker.cpp +3 -3
  186. package/lib/SVF-FE/CallGraphBuilder.cpp +4 -4
  187. package/lib/SVF-FE/ICFGBuilder.cpp +19 -27
  188. package/lib/SVF-FE/SVFIRBuilder.cpp +15 -15
  189. package/lib/WPA/Andersen.cpp +3 -3
  190. package/lib/WPA/WPAPass.cpp +4 -4
  191. package/package.json +1 -1
  192. package/tools/Example/svf-ex.cpp +1 -1
@@ -408,13 +408,13 @@ protected:
408
408
  }
409
409
  else
410
410
  {
411
- assert((it->second == node->getId()) && "a SVFIR node can only have unique definition ");
411
+ assert((it->second == node->getId()) && "a SVFVar can only have unique definition ");
412
412
  }
413
413
  }
414
414
  inline NodeID getDef(const PAGNode* pagNode) const
415
415
  {
416
416
  PAGNodeToDefMapTy::const_iterator it = PAGNodeToDefMap.find(pagNode);
417
- assert(it!=PAGNodeToDefMap.end() && "SVFIR node does not have a definition??");
417
+ assert(it!=PAGNodeToDefMap.end() && "SVFVar does not have a definition??");
418
418
  return it->second;
419
419
  }
420
420
  inline bool hasDef(const PAGNode* pagNode) const
@@ -479,7 +479,7 @@ protected:
479
479
  inline void addNullPtrVFGNode(const PAGNode* pagNode)
480
480
  {
481
481
  NullPtrVFGNode* sNode = new NullPtrVFGNode(totalVFGNode++,pagNode);
482
- addVFGNode(sNode, pag->getICFG()->getGlobalBlockNode());
482
+ addVFGNode(sNode, pag->getICFG()->getGlobalICFGNode());
483
483
  setDef(pagNode,sNode);
484
484
  }
485
485
  /// Add an Address VFG node
@@ -524,7 +524,7 @@ protected:
524
524
  inline void addActualParmVFGNode(const PAGNode* aparm, const CallICFGNode* cs)
525
525
  {
526
526
  ActualParmVFGNode* sNode = new ActualParmVFGNode(totalVFGNode++,aparm,cs);
527
- addVFGNode(sNode, pag->getICFG()->getCallBlockNode(cs->getCallSite()));
527
+ addVFGNode(sNode, pag->getICFG()->getCallICFGNode(cs->getCallSite()));
528
528
  PAGNodeToActualParmMap[std::make_pair(aparm->getId(),cs)] = sNode;
529
529
  /// do not set def here, this node is not a variable definition
530
530
  }
@@ -532,7 +532,7 @@ protected:
532
532
  inline void addFormalParmVFGNode(const PAGNode* fparm, const SVFFunction* fun, CallPESet& callPEs)
533
533
  {
534
534
  FormalParmVFGNode* sNode = new FormalParmVFGNode(totalVFGNode++,fparm,fun);
535
- addVFGNode(sNode, pag->getICFG()->getFunEntryBlockNode(fun));
535
+ addVFGNode(sNode, pag->getICFG()->getFunEntryICFGNode(fun));
536
536
  for(CallPESet::const_iterator it = callPEs.begin(), eit=callPEs.end();
537
537
  it!=eit; ++it)
538
538
  sNode->addCallPE(*it);
@@ -546,7 +546,7 @@ protected:
546
546
  inline void addFormalRetVFGNode(const PAGNode* uniqueFunRet, const SVFFunction* fun, RetPESet& retPEs)
547
547
  {
548
548
  FormalRetVFGNode *sNode = new FormalRetVFGNode(totalVFGNode++, uniqueFunRet, fun);
549
- addVFGNode(sNode, pag->getICFG()->getFunExitBlockNode(fun));
549
+ addVFGNode(sNode, pag->getICFG()->getFunExitICFGNode(fun));
550
550
  for (RetPESet::const_iterator it = retPEs.begin(), eit = retPEs.end(); it != eit; ++it)
551
551
  sNode->addRetPE(*it);
552
552
 
@@ -564,7 +564,7 @@ protected:
564
564
  inline void addActualRetVFGNode(const PAGNode* ret,const CallICFGNode* cs)
565
565
  {
566
566
  ActualRetVFGNode* sNode = new ActualRetVFGNode(totalVFGNode++,ret,cs);
567
- addVFGNode(sNode, pag->getICFG()->getRetBlockNode(cs->getCallSite()));
567
+ addVFGNode(sNode, pag->getICFG()->getRetICFGNode(cs->getCallSite()));
568
568
  setDef(ret,sNode);
569
569
  PAGNodeToActualRetMap[ret] = sNode;
570
570
  }
@@ -35,7 +35,7 @@ public:
35
35
  private:
36
36
  // Get CallICFGNode
37
37
  inline CallICFGNode* getCBN(const Instruction* inst) {
38
- return _la->getTCT()->getCallBlockNode(inst);
38
+ return _la->getTCT()->getCallICFGNode(inst);
39
39
  }
40
40
  const Instruction *getPreviousMemoryAccessInst( const Instruction *I) {
41
41
  I = I->getPrevNode();
package/include/MTA/MHP.h CHANGED
@@ -63,7 +63,7 @@ public:
63
63
 
64
64
  // Get CallICFGNode
65
65
  inline CallICFGNode* getCBN(const Instruction* inst) {
66
- return tct->getCallBlockNode(inst);
66
+ return tct->getCallICFGNode(inst);
67
67
  }
68
68
 
69
69
  /// Whether the function is connected from main function in thread call graph
@@ -381,7 +381,7 @@ private:
381
381
  }
382
382
  // Get CallICFGNode
383
383
  inline CallICFGNode* getCBN(const Instruction* inst) {
384
- return tct->getCallBlockNode(inst);
384
+ return tct->getCallICFGNode(inst);
385
385
  }
386
386
  /// Mark thread flags for cxtStmt
387
387
  //@{
package/include/MTA/PCG.h CHANGED
@@ -123,8 +123,8 @@ public:
123
123
  {
124
124
  }
125
125
 
126
- CallICFGNode* getCallBlockNode(const Instruction* inst) {
127
- return pta->getICFG()->getCallBlockNode(inst);
126
+ CallICFGNode* getCallICFGNode(const Instruction* inst) {
127
+ return pta->getICFG()->getCallICFGNode(inst);
128
128
  }
129
129
  const SVFFunction* getSVFFun(const Function* fun) const {
130
130
  return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(fun);
package/include/MTA/TCT.h CHANGED
@@ -148,8 +148,8 @@ public:
148
148
  destroy();
149
149
  }
150
150
  /// Get CallICFGNode given inst
151
- CallICFGNode* getCallBlockNode(const Instruction* inst) {
152
- return pta->getICFG()->getCallBlockNode(inst);
151
+ CallICFGNode* getCallICFGNode(const Instruction* inst) {
152
+ return pta->getICFG()->getCallICFGNode(inst);
153
153
  }
154
154
  /// Get SVFFuntion given Function
155
155
  const SVFFunction* getSVFFun(const Function* fun) const {
@@ -493,14 +493,14 @@ private:
493
493
  /// Add function arguments
494
494
  inline void addFunArgs(const SVFFunction* fun, const SVFVar* arg)
495
495
  {
496
- FunEntryICFGNode* funEntryBlockNode = icfg->getFunEntryBlockNode(fun);
496
+ FunEntryICFGNode* funEntryBlockNode = icfg->getFunEntryICFGNode(fun);
497
497
  funEntryBlockNode->addFormalParms(arg);
498
498
  funArgsListMap[fun].push_back(arg);
499
499
  }
500
500
  /// Add function returns
501
501
  inline void addFunRet(const SVFFunction* fun, const SVFVar* ret)
502
502
  {
503
- FunExitICFGNode* funExitBlockNode = icfg->getFunExitBlockNode(fun);
503
+ FunExitICFGNode* funExitBlockNode = icfg->getFunExitICFGNode(fun);
504
504
  funExitBlockNode->addFormalRet(ret);
505
505
  funRetMap[fun] = ret;
506
506
  }
@@ -344,18 +344,7 @@ public:
344
344
  /// Get struct info
345
345
  //@{
346
346
  ///Get an iterator for StructInfo, designed as internal methods
347
- TypeToFieldInfoMap::iterator getStructInfoIter(const Type *T)
348
- {
349
- assert(T);
350
- TypeToFieldInfoMap::iterator it = typeToFieldInfo.find(T);
351
- if (it != typeToFieldInfo.end())
352
- return it;
353
- else
354
- {
355
- collectTypeInfo(T);
356
- return typeToFieldInfo.find(T);
357
- }
358
- }
347
+ TypeToFieldInfoMap::iterator getStructInfoIter(const Type *T);
359
348
 
360
349
  ///Get a reference to StructInfo.
361
350
  inline StInfo* getStructInfo(const Type *T)
@@ -364,8 +353,12 @@ public:
364
353
  }
365
354
 
366
355
  ///Get a reference to the components of struct_info.
367
- /// Flatterned full offset information of a struct including its array fields
368
- const std::vector<u32_t>& getFlattenedOffsetVec(const StructType *T);
356
+ /// Number of flattenned elements of an array or struct
357
+ const u32_t getNumOfFlattenElements(const Type *T);
358
+ /// Number of flattenned fields of a struct
359
+ const u32_t getNumOfFlattenFields(const StructType *T);
360
+ /// Flatterned element idx of an array or struct by considering stride
361
+ const std::vector<u32_t>& getFlattenedElemIdxVec(const Type *T);
369
362
  /// Flatterned field index information of a struct ignoring any array field
370
363
  const std::vector<u32_t>& getFlattenedFieldIdxVec(const StructType *T);
371
364
 
@@ -513,14 +506,18 @@ class StInfo
513
506
  private:
514
507
  /// flattened field indices of a struct (ignoring arrays)
515
508
  std::vector<u32_t> fldIdxVec;
516
- /// flattened full offset (including array strides)
517
- std::vector<u32_t> fullOffsetVec;
509
+ /// flattened element indices including structs and arrays by considering strides
510
+ std::vector<u32_t> elemIdxVec;
518
511
  /// Types of all fields of a struct
519
512
  Map<u32_t, const Type*> fldIdx2TypeMap;
520
513
  /// All field infos after flattening a struct
521
514
  std::vector<FlattenedFieldInfo> finfo;
522
515
  /// stride represents the number of repetitive elements if this StInfo represent an ArrayType. stride is 1 by default.
523
516
  u32_t stride;
517
+ /// number of elements after flattenning (including array elements)
518
+ u32_t numOfFlattenElements;
519
+ /// number of fields after flattenning (ignoring array elements)
520
+ u32_t numOfFlattenFields;
524
521
  /// Max field limit
525
522
  static u32_t maxFieldLimit;
526
523
 
@@ -530,7 +527,7 @@ private:
530
527
 
531
528
  public:
532
529
  /// Constructor
533
- StInfo(u32_t s) : stride(s)
530
+ StInfo(u32_t s) : stride(s), numOfFlattenElements(s), numOfFlattenFields(s)
534
531
  {
535
532
  }
536
533
  /// Destructor
@@ -552,28 +549,16 @@ public:
552
549
  /// OriginalFieldType of b with field_idx 1 : Struct A
553
550
  /// FlatternedFieldType of b with field_idx 1 : int
554
551
  //{@
555
- inline const Type* getOriginalFieldType(u32_t fldIdx)
556
- {
557
- Map<u32_t, const Type*>::const_iterator it = fldIdx2TypeMap.find(fldIdx);
558
- if(it!=fldIdx2TypeMap.end())
559
- return it->second;
560
- return nullptr;
561
- }
562
- inline const Type* getFlatternedFieldType(u32_t fldIdx)
563
- {
564
- for(FlattenedFieldInfo& fallenedFld : finfo){
565
- if(fallenedFld.getFlattenFldIdx() == fldIdx)
566
- return fallenedFld.getFlattenElemTy();
567
- }
568
- return nullptr;
569
- }
552
+ const Type* getOriginalFieldType(u32_t fldIdx);
553
+ const Type* getFlatternedFieldType(u32_t fldIdx);
554
+
570
555
  inline std::vector<u32_t>& getFlattenedFieldIdxVec()
571
556
  {
572
557
  return fldIdxVec;
573
558
  }
574
- inline std::vector<u32_t>& getFlattenedOffsetVec()
559
+ inline std::vector<u32_t>& getFlattenedElemIdxVec()
575
560
  {
576
- return fullOffsetVec;
561
+ return elemIdxVec;
577
562
  }
578
563
  inline std::vector<FlattenedFieldInfo>& getFlattenedFieldInfoVec()
579
564
  {
@@ -581,16 +566,27 @@ public:
581
566
  }
582
567
  //@}
583
568
 
584
- /// Add field (index and offset) with its corresponding type
585
- inline void addFldWithType(u32_t fldIdx, const Type* type, u32_t fullOffset)
569
+ /// Add field index and element index and their corresponding type
570
+ void addFldWithType(u32_t fldIdx, const Type* type, u32_t elemIdx);
571
+
572
+ /// Set number of fields and elements of an aggrate
573
+ inline void setNumOfFieldsAndElems(u32_t nf, u32_t ne)
586
574
  {
587
- fldIdxVec.push_back(fldIdx);
588
- fullOffsetVec.push_back(fullOffset);
589
- fldIdx2TypeMap[fldIdx] = type;
575
+ numOfFlattenFields = nf;
576
+ numOfFlattenElements = ne;
590
577
  }
591
578
 
592
- /// Array Type can have
593
- inline u32_t getStride() const {
579
+ /// Return number of elements after flattenning (including array elements)
580
+ inline u32_t getNumOfFlattenElements() const {
581
+ return numOfFlattenElements;
582
+ }
583
+
584
+ /// Return the number of fields after flattenning (ignoring array elements)
585
+ inline u32_t getNumOfFlattenFields() const {
586
+ return numOfFlattenFields;
587
+ }
588
+ /// Return the stride
589
+ inline u32_t getStride() const{
594
590
  return stride;
595
591
  }
596
592
  };
@@ -84,20 +84,20 @@ private:
84
84
  void addICFGInterEdges(const Instruction* cs, const SVFFunction* callee);
85
85
 
86
86
  /// Add a call node
87
- inline CallICFGNode* getOrAddCallICFGNode(const Instruction* cs)
87
+ inline CallICFGNode* getCallICFGNode(const Instruction* cs)
88
88
  {
89
- return icfg->getCallBlockNode(cs);
89
+ return icfg->getCallICFGNode(cs);
90
90
  }
91
91
  /// Add a return node
92
- inline RetICFGNode* getOrAddRetICFGNode(const Instruction* cs)
92
+ inline RetICFGNode* getRetICFGNode(const Instruction* cs)
93
93
  {
94
- return icfg->getRetBlockNode(cs);
94
+ return icfg->getRetICFGNode(cs);
95
95
  }
96
96
 
97
97
  /// Add and get IntraBlock ICFGNode
98
98
  IntraICFGNode* getOrAddIntraBlockICFGNode(const Instruction* inst)
99
99
  {
100
- return icfg->getIntraBlockNode(inst);
100
+ return icfg->getIntraICFGNode(inst);
101
101
  }
102
102
  };
103
103
 
@@ -348,7 +348,7 @@ public:
348
348
  {
349
349
  IntraICFGNode* node;
350
350
  if(const Instruction* inst = SVFUtil::dyn_cast<Instruction>(curVal))
351
- node = pag->getICFG()->getIntraBlockNode(inst);
351
+ node = pag->getICFG()->getIntraICFGNode(inst);
352
352
  else
353
353
  node = nullptr;
354
354
  StoreStmt *edge = pag->addStoreStmt(src, dst, node);
@@ -190,69 +190,69 @@ ICFG::ICFG(): totalICFGNode(0)
190
190
 
191
191
 
192
192
  /// Get a basic block ICFGNode
193
- ICFGNode* ICFG::getBlockICFGNode(const Instruction* inst)
193
+ ICFGNode* ICFG::getICFGNode(const Instruction* inst)
194
194
  {
195
195
  ICFGNode* node;
196
196
  if(SVFUtil::isNonInstricCallSite(inst))
197
- node = getCallBlockNode(inst);
197
+ node = getCallICFGNode(inst);
198
198
  else if(SVFUtil::isIntrinsicInst(inst))
199
- node = getIntraBlockNode(inst);
199
+ node = getIntraICFGNode(inst);
200
200
  // assert (false && "associating an intrinsic instruction with an ICFGNode!");
201
201
  else
202
- node = getIntraBlockNode(inst);
202
+ node = getIntraICFGNode(inst);
203
203
 
204
204
  assert (node!=nullptr && "no ICFGNode for this instruction?");
205
205
  return node;
206
206
  }
207
207
 
208
208
 
209
- CallICFGNode* ICFG::getCallBlockNode(const Instruction* inst)
209
+ CallICFGNode* ICFG::getCallICFGNode(const Instruction* inst)
210
210
  {
211
211
  if(SVFUtil::isCallSite(inst) ==false)
212
212
  outs() << *inst << "\n";
213
213
  assert(SVFUtil::isCallSite(inst) && "not a call instruction?");
214
214
  assert(SVFUtil::isNonInstricCallSite(inst) && "associating an intrinsic debug instruction with an ICFGNode!");
215
- CallICFGNode* node = getCallICFGNode(inst);
215
+ CallICFGNode* node = getCallBlock(inst);
216
216
  if(node==nullptr)
217
- node = addCallICFGNode(inst);
217
+ node = addCallBlock(inst);
218
218
  assert (node!=nullptr && "no CallICFGNode for this instruction?");
219
219
  return node;
220
220
  }
221
221
 
222
- RetICFGNode* ICFG::getRetBlockNode(const Instruction* inst)
222
+ RetICFGNode* ICFG::getRetICFGNode(const Instruction* inst)
223
223
  {
224
224
  assert(SVFUtil::isCallSite(inst) && "not a call instruction?");
225
225
  assert(SVFUtil::isNonInstricCallSite(inst) && "associating an intrinsic debug instruction with an ICFGNode!");
226
- RetICFGNode* node = getRetICFGNode(inst);
226
+ RetICFGNode* node = getRetBlock(inst);
227
227
  if(node==nullptr)
228
- node = addRetICFGNode(inst);
228
+ node = addRetBlock(inst);
229
229
  assert (node!=nullptr && "no RetICFGNode for this instruction?");
230
230
  return node;
231
231
  }
232
232
 
233
- IntraICFGNode* ICFG::getIntraBlockNode(const Instruction* inst)
233
+ IntraICFGNode* ICFG::getIntraICFGNode(const Instruction* inst)
234
234
  {
235
- IntraICFGNode* node = getIntraBlockICFGNode(inst);
235
+ IntraICFGNode* node = getIntraBlock(inst);
236
236
  if(node==nullptr)
237
- node = addIntraBlockICFGNode(inst);
237
+ node = addIntraBlock(inst);
238
238
  return node;
239
239
  }
240
240
 
241
241
  /// Add a function entry node
242
- FunEntryICFGNode* ICFG::getFunEntryBlockNode(const SVFFunction* fun)
242
+ FunEntryICFGNode* ICFG::getFunEntryICFGNode(const SVFFunction* fun)
243
243
  {
244
- FunEntryICFGNode* b = getFunEntryICFGNode(fun);
244
+ FunEntryICFGNode* b = getFunEntryBlock(fun);
245
245
  if (b == nullptr)
246
- return addFunEntryICFGNode(fun);
246
+ return addFunEntryBlock(fun);
247
247
  else
248
248
  return b;
249
249
  }
250
250
  /// Add a function exit node
251
- FunExitICFGNode* ICFG::getFunExitBlockNode(const SVFFunction* fun)
251
+ FunExitICFGNode* ICFG::getFunExitICFGNode(const SVFFunction* fun)
252
252
  {
253
- FunExitICFGNode* b = getFunExitICFGNode(fun);
253
+ FunExitICFGNode* b = getFunExitBlock(fun);
254
254
  if (b == nullptr)
255
- return addFunExitICFGNode(fun);
255
+ return addFunExitBlock(fun);
256
256
  else
257
257
  return b;
258
258
  }
@@ -436,10 +436,10 @@ void ICFG::updateCallGraph(PTACallGraph* callgraph)
436
436
  for (PTACallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
437
437
  {
438
438
  const SVFFunction* callee = *func_iter;
439
- CallICFGNode* callBlockNode = getCallBlockNode(cs);
440
- RetICFGNode* retBlockNode = getRetBlockNode(cs);
441
- FunEntryICFGNode* calleeEntryNode = getFunEntryICFGNode(callee);
442
- FunExitICFGNode* calleeExitNode = getFunExitICFGNode(callee);
439
+ CallICFGNode* callBlockNode = getCallICFGNode(cs);
440
+ RetICFGNode* retBlockNode = getRetICFGNode(cs);
441
+ FunEntryICFGNode* calleeEntryNode = getFunEntryBlock(callee);
442
+ FunExitICFGNode* calleeExitNode = getFunExitBlock(callee);
443
443
  addCallEdge(callBlockNode, calleeEntryNode, cs);
444
444
  addRetEdge(calleeExitNode, retBlockNode, cs);
445
445
 
@@ -242,7 +242,7 @@ void SVFG::addSVFGNodesForAddrTakenVars()
242
242
  {
243
243
  for(PHISet::iterator pi = it->second.begin(), epi = it->second.end(); pi!=epi; ++pi){
244
244
  MemSSA::PHI* phi = *pi;
245
- addIntraMSSAPHISVFGNode(pag->getICFG()->getBlockICFGNode(&(phi->getBasicBlock()->front())), phi->opVerBegin(), phi->opVerEnd(),phi->getResVer(), totalVFGNode++);
245
+ addIntraMSSAPHISVFGNode(pag->getICFG()->getICFGNode(&(phi->getBasicBlock()->front())), phi->opVerBegin(), phi->opVerEnd(),phi->getResVer(), totalVFGNode++);
246
246
  }
247
247
  }
248
248
  /// initialize memory SSA entry chi nodes
@@ -251,7 +251,7 @@ void SVFG::addSVFGNodesForAddrTakenVars()
251
251
  {
252
252
  for(CHISet::iterator pi = it->second.begin(), epi = it->second.end(); pi!=epi; ++pi){
253
253
  const MemSSA::ENTRYCHI* chi = SVFUtil::cast<ENTRYCHI>(*pi);
254
- addFormalINSVFGNode(pag->getICFG()->getFunEntryBlockNode(chi->getFunction()), chi->getResVer(), totalVFGNode++);
254
+ addFormalINSVFGNode(pag->getICFG()->getFunEntryICFGNode(chi->getFunction()), chi->getResVer(), totalVFGNode++);
255
255
  }
256
256
  }
257
257
  /// initialize memory SSA return mu nodes
@@ -260,7 +260,7 @@ void SVFG::addSVFGNodesForAddrTakenVars()
260
260
  {
261
261
  for(MUSet::iterator pi = it->second.begin(), epi = it->second.end(); pi!=epi; ++pi){
262
262
  const MemSSA::RETMU* mu = SVFUtil::cast<RETMU>(*pi);
263
- addFormalOUTSVFGNode(pag->getICFG()->getFunExitBlockNode(mu->getFunction()), mu->getMRVer(), totalVFGNode++);
263
+ addFormalOUTSVFGNode(pag->getICFG()->getFunExitICFGNode(mu->getFunction()), mu->getMRVer(), totalVFGNode++);
264
264
  }
265
265
  }
266
266
  /// initialize memory SSA callsite mu nodes
@@ -567,7 +567,7 @@ std::set<const SVFGNode*> SVFG::fromValue(const llvm::Value* value) const
567
567
  void SVFG::getInterVFEdgesForIndirectCallSite(const CallICFGNode* callBlockNode, const SVFFunction* callee, SVFGEdgeSetTy& edges)
568
568
  {
569
569
  CallSiteID csId = getCallSiteID(callBlockNode, callee);
570
- RetICFGNode* retBlockNode = pag->getICFG()->getRetBlockNode(callBlockNode->getCallSite());
570
+ RetICFGNode* retBlockNode = pag->getICFG()->getRetICFGNode(callBlockNode->getCallSite());
571
571
 
572
572
  // Find inter direct call edges between actual param and formal param.
573
573
  if (pag->hasCallSiteArgsMap(callBlockNode) && pag->hasFunArgsList(callee))
@@ -407,7 +407,7 @@ void VFG::addVFGNodes()
407
407
  if(isInterestedPAGNode(it->second) == false || hasDef(it->second))
408
408
  continue;
409
409
 
410
- addActualRetVFGNode(it->second,it->first->getCallBlockNode());
410
+ addActualRetVFGNode(it->second,it->first->getCallICFGNode());
411
411
  }
412
412
 
413
413
  // initialize formal parameter nodes
@@ -674,7 +674,7 @@ void VFG::connectDirectVFGEdges()
674
674
  {
675
675
  ActualRetVFGNode* callsiteRev = getActualRetVFGNode((*it)->getLHSVar());
676
676
  const CallICFGNode* retBlockNode = (*it)->getCallSite();
677
- CallICFGNode* callBlockNode = pag->getICFG()->getCallBlockNode(retBlockNode->getCallSite());
677
+ CallICFGNode* callBlockNode = pag->getICFG()->getCallICFGNode(retBlockNode->getCallSite());
678
678
  addInterEdgeFromFRToAR(calleeRet,callsiteRev, getCallSiteID(callBlockNode, calleeRet->getFun()));
679
679
  }
680
680
  }
@@ -813,7 +813,7 @@ void VFG::connectCallerAndCallee(const CallICFGNode* callBlockNode, const SVFFun
813
813
  SVFIR * pag = SVFIR::getPAG();
814
814
  ICFG * icfg = pag->getICFG();
815
815
  CallSiteID csId = getCallSiteID(callBlockNode, callee);
816
- RetICFGNode* retBlockNode = icfg->getRetBlockNode(callBlockNode->getCallSite());
816
+ RetICFGNode* retBlockNode = icfg->getRetICFGNode(callBlockNode->getCallSite());
817
817
  // connect actual and formal param
818
818
  if (pag->hasCallSiteArgsMap(callBlockNode) && pag->hasFunArgsList(callee))
819
819
  {
@@ -152,18 +152,18 @@ bool MRGenerator::hasSVFStmtList(const Instruction* inst)
152
152
  {
153
153
  SVFIR* pag = pta->getPAG();
154
154
  if (ptrOnlyMSSA)
155
- return pag->hasPTASVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
155
+ return pag->hasPTASVFStmtList(pag->getICFG()->getICFGNode(inst));
156
156
  else
157
- return pag->hasSVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
157
+ return pag->hasSVFStmtList(pag->getICFG()->getICFGNode(inst));
158
158
  }
159
159
 
160
160
  SVFIR::SVFStmtList& MRGenerator::getPAGEdgesFromInst(const Instruction* inst)
161
161
  {
162
162
  SVFIR* pag = pta->getPAG();
163
163
  if (ptrOnlyMSSA)
164
- return pag->getPTASVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
164
+ return pag->getPTASVFStmtList(pag->getICFG()->getICFGNode(inst));
165
165
  else
166
- return pag->getSVFStmtList(pag->getICFG()->getBlockICFGNode(inst));
166
+ return pag->getSVFStmtList(pag->getICFG()->getICFGNode(inst));
167
167
  }
168
168
 
169
169
  /*!
@@ -259,7 +259,7 @@ void MRGenerator::collectModRefForCall()
259
259
 
260
260
  for (CallSite cs : SymbolTableInfo::SymbolInfo()->getCallSiteSet())
261
261
  {
262
- const CallICFGNode* callBlockNode = pta->getPAG()->getICFG()->getCallBlockNode(cs.getInstruction());
262
+ const CallICFGNode* callBlockNode = pta->getPAG()->getICFG()->getCallICFGNode(cs.getInstruction());
263
263
  if(hasRefSideEffectOfCallSite(callBlockNode))
264
264
  {
265
265
  NodeBS refs = getRefSideEffectOfCallSite(callBlockNode);
@@ -481,8 +481,8 @@ void MRGenerator::collectCallSitePts(const CallICFGNode* cs)
481
481
  /// collect the pts chain of the callsite arguments
482
482
  NodeBS& argsPts = csToCallSiteArgsPtsMap[cs];
483
483
  SVFIR* pag = pta->getPAG();
484
- CallICFGNode* callBlockNode = pag->getICFG()->getCallBlockNode(cs->getCallSite());
485
- RetICFGNode* retBlockNode = pag->getICFG()->getRetBlockNode(cs->getCallSite());
484
+ CallICFGNode* callBlockNode = pag->getICFG()->getCallICFGNode(cs->getCallSite());
485
+ RetICFGNode* retBlockNode = pag->getICFG()->getRetICFGNode(cs->getCallSite());
486
486
 
487
487
  WorkList worklist;
488
488
  if (pag->hasCallSiteArgsMap(callBlockNode))
@@ -174,7 +174,7 @@ void MemSSA::createMUCHI(const SVFFunction& fun)
174
174
  }
175
175
  if (isNonInstricCallSite(inst))
176
176
  {
177
- const CallICFGNode* cs = pag->getICFG()->getCallBlockNode(inst);
177
+ const CallICFGNode* cs = pag->getICFG()->getCallICFGNode(inst);
178
178
  if(mrGen->hasRefMRSet(cs))
179
179
  AddCallSiteMU(cs,mrGen->getCallSiteRefMRSet(cs));
180
180
 
@@ -318,7 +318,7 @@ void MemSSA::SSARenameBB(const BasicBlock& bb)
318
318
  }
319
319
  if (isNonInstricCallSite(inst))
320
320
  {
321
- const CallICFGNode* cs = pag->getICFG()->getCallBlockNode(inst);
321
+ const CallICFGNode* cs = pag->getICFG()->getCallICFGNode(inst);
322
322
  if(mrGen->hasRefMRSet(cs))
323
323
  RenameMuSet(getMUSet(cs));
324
324
 
@@ -634,7 +634,7 @@ void MemSSA::dumpMSSA(raw_ostream& Out)
634
634
  bool isAppCall = isNonInstricCallSite(&inst) && !isExtCall(&inst);
635
635
  if (isAppCall || isHeapAllocExtCall(&inst))
636
636
  {
637
- const CallICFGNode* cs = pag->getICFG()->getCallBlockNode(&inst);
637
+ const CallICFGNode* cs = pag->getICFG()->getCallICFGNode(&inst);
638
638
  if(hasMU(cs))
639
639
  {
640
640
  if (!last_is_chi)
@@ -406,7 +406,7 @@ void LockAnalysis::handleFork(const CxtStmt& cts)
406
406
  {
407
407
  const CallInst* call = SVFUtil::cast<CallInst>(cts.getStmt());
408
408
  const CallStrCxt& curCxt = cts.getContext();
409
- CallICFGNode* cbn = tct->getCallBlockNode(call);
409
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
410
410
  if(getTCG()->hasThreadForkEdge(cbn))
411
411
  {
412
412
  for (ThreadCallGraph::ForkEdgeSet::const_iterator cgIt = getTCG()->getForkEdgeBegin(cbn),
@@ -429,7 +429,7 @@ void LockAnalysis::handleCall(const CxtStmt& cts)
429
429
 
430
430
  const CallInst* call = SVFUtil::cast<CallInst>(cts.getStmt());
431
431
  const CallStrCxt& curCxt = cts.getContext();
432
- CallICFGNode* cbn = tct->getCallBlockNode(call);
432
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
433
433
  if (getTCG()->hasCallGraphEdge(cbn))
434
434
  {
435
435
  for (PTACallGraph::CallGraphEdgeSet::const_iterator cgIt = getTCG()->getCallEdgeBegin(cbn), ecgIt = getTCG()->getCallEdgeEnd(cbn);
@@ -518,7 +518,7 @@ void LockAnalysis::pushCxt(CallStrCxt& cxt, const Instruction* call, const Funct
518
518
  const Function* caller = call->getParent()->getParent();
519
519
  const SVFFunction* svfcallee = tct->getSVFFun(callee);
520
520
  const SVFFunction* svfcaller = tct->getSVFFun(caller);
521
- CallICFGNode* cbn = tct->getCallBlockNode(call);
521
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
522
522
  CallSiteID csId = getTCG()->getCallSiteID(cbn, svfcallee);
523
523
 
524
524
  // /// handle calling context for candidate functions only
@@ -537,7 +537,7 @@ bool LockAnalysis::matchCxt(CallStrCxt& cxt, const Instruction* call, const Func
537
537
  const Function* caller = call->getParent()->getParent();
538
538
  const SVFFunction* svfcallee = tct->getSVFFun(callee);
539
539
  const SVFFunction* svfcaller = tct->getSVFFun(caller);
540
- CallICFGNode* cbn = tct->getCallBlockNode(call);
540
+ CallICFGNode* cbn = tct->getCallICFGNode(call);
541
541
  CallSiteID csId = getTCG()->getCallSiteID(cbn, svfcallee);
542
542
 
543
543
  // /// handle calling context for candidate functions only
@@ -96,7 +96,7 @@ CallStrCxt MTAResultValidator::getCxtArg(const Instruction* inst, unsigned int a
96
96
  const SVFFunction* callee = SVFUtil::getFunction(y[1]);
97
97
  CallSite cs = SVFUtil::getLLVMCallSite(csnumToInstMap[atoi(y[0].c_str())]);
98
98
  assert(callee && "callee error");
99
- CallICFGNode* cbn = mhp->getTCT()->getCallBlockNode(cs.getInstruction());
99
+ CallICFGNode* cbn = mhp->getTCT()->getCallICFGNode(cs.getInstruction());
100
100
  CallSiteID csId = tcg->getCallSiteID(cbn, callee);
101
101
  cxt.push_back(csId);
102
102
  }
package/lib/MTA/PCG.cpp CHANGED
@@ -206,7 +206,7 @@ void PCG::identifyFollowers()
206
206
  // if this is an call/invoke instruction but not a spawn site
207
207
  if ((SVFUtil::isa<CallInst>(inst) || SVFUtil::isa<InvokeInst>(inst)) && !isSpawnsite(inst))
208
208
  {
209
- CallICFGNode* cbn = getCallBlockNode(inst);
209
+ CallICFGNode* cbn = getCallICFGNode(inst);
210
210
  if (callgraph->hasCallGraphEdge(cbn))
211
211
  {
212
212
  for (PTACallGraph::CallGraphEdgeSet::const_iterator cgIt = callgraph->getCallEdgeBegin(cbn),
package/lib/MTA/TCT.cpp CHANGED
@@ -476,7 +476,7 @@ void TCT::pushCxt(CallStrCxt& cxt, const Instruction* call, const Function* call
476
476
  const Function* caller = call->getParent()->getParent();
477
477
  const SVFFunction* svfcaller = getSVFFun(caller);
478
478
  const SVFFunction* svfcallee = getSVFFun(callee);
479
- CallSiteID csId = tcg->getCallSiteID(getCallBlockNode(call), svfcallee);
479
+ CallSiteID csId = tcg->getCallSiteID(getCallICFGNode(call), svfcallee);
480
480
 
481
481
  /// handle calling context for candidate functions only
482
482
  if(isCandidateFun(caller) == false)
@@ -498,7 +498,7 @@ bool TCT::matchCxt(CallStrCxt& cxt, const Instruction* call, const Function* cal
498
498
 
499
499
  const Function* caller = call->getParent()->getParent();
500
500
  const SVFFunction* svfcallee = getSVFFun(callee);
501
- CallSiteID csId = tcg->getCallSiteID(getCallBlockNode(call), svfcallee);
501
+ CallSiteID csId = tcg->getCallSiteID(getCallICFGNode(call), svfcallee);
502
502
 
503
503
  /// handle calling context for candidate functions only
504
504
  if(isCandidateFun(caller) == false)