svf-tools 1.0.1266 → 1.0.1267

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 (129) hide show
  1. package/package.json +1 -1
  2. package/svf/lib/AE/Svfexe/AbstractInterpretation.cpp +1 -0
  3. package/svf/lib/AE/Svfexe/SparseAbstractInterpretation.cpp +1 -0
  4. package/svf/lib/Graphs/ConsG.cpp +1 -0
  5. package/svf/lib/MTA/MHP.cpp +1 -1
  6. package/svf/lib/SVFIR/SVFIR.cpp +3 -1
  7. package/svf-llvm/include/SVF-LLVM/LLVMUtil.h +2 -0
  8. package/svf-llvm/lib/ICFGBuilder.cpp +2 -1
  9. package/svf-llvm/lib/SVFIRBuilder.cpp +32 -18
  10. package/svf-llvm/lib/SymbolTableBuilder.cpp +4 -16
  11. package/SVF-doxygen/doxygen.config +0 -2548
  12. package/SVF-doxygen/wiki/PAG.png +0 -0
  13. package/SVF-doxygen/wiki/andersen.png +0 -0
  14. package/SVF-doxygen/wiki/callgraph.png +0 -0
  15. package/SVF-doxygen/wiki/consG.png +0 -0
  16. package/SVF-doxygen/wiki/cpu2000-flto +0 -432
  17. package/SVF-doxygen/wiki/cpu2006-flto +0 -417
  18. package/SVF-doxygen/wiki/cpu2017-wllvm.cfg +0 -999
  19. package/SVF-doxygen/wiki/database.png +0 -0
  20. package/SVF-doxygen/wiki/framework.png +0 -0
  21. package/SVF-doxygen/wiki/help.png +0 -0
  22. package/SVF-doxygen/wiki/icfg.png +0 -0
  23. package/SVF-doxygen/wiki/mssa-cha.png +0 -0
  24. package/SVF-doxygen/wiki/pagedge.png +0 -0
  25. package/SVF-doxygen/wiki/pagnode.png +0 -0
  26. package/SVF-doxygen/wiki/pt.png +0 -0
  27. package/SVF-doxygen/wiki/setupcmake.png +0 -0
  28. package/SVF-doxygen/wiki/setupconfiguration.png +0 -0
  29. package/SVF-doxygen/wiki/setupdashboard.png +0 -0
  30. package/SVF-doxygen/wiki/setupdebug.png +0 -0
  31. package/SVF-doxygen/wiki/setupenv.png +0 -0
  32. package/SVF-doxygen/wiki/startup.png +0 -0
  33. package/SVF-doxygen/wiki/svf-stat.pdf +0 -0
  34. package/SVF-doxygen/wiki/svfg-framework.png +0 -0
  35. package/SVF-doxygen/wiki/svfg.png +0 -0
  36. package/SVF-doxygen/wiki/svfg_opt.png +0 -0
  37. package/SVF-doxygen/wiki/svfgedge-cha.png +0 -0
  38. package/SVF-doxygen/wiki/svfgnode-cha.png +0 -0
  39. package/SVF-doxygen/wiki/svfpic/README.md +0 -6
  40. package/SVF-doxygen/wiki/svfpic/ass-1debug1.png +0 -0
  41. package/SVF-doxygen/wiki/svfpic/ass-1debug2.png +0 -0
  42. package/SVF-doxygen/wiki/svfpic/build.jpg +0 -0
  43. package/SVF-doxygen/wiki/svfpic/cmd.png +0 -0
  44. package/SVF-doxygen/wiki/svfpic/connect1.jpg +0 -0
  45. package/SVF-doxygen/wiki/svfpic/connect2.png +0 -0
  46. package/SVF-doxygen/wiki/svfpic/connect3.png +0 -0
  47. package/SVF-doxygen/wiki/svfpic/connect4.jpg +0 -0
  48. package/SVF-doxygen/wiki/svfpic/connect5.jpg +0 -0
  49. package/SVF-doxygen/wiki/svfpic/connect6.png +0 -0
  50. package/SVF-doxygen/wiki/svfpic/connect7.jpg +0 -0
  51. package/SVF-doxygen/wiki/svfpic/continue.png +0 -0
  52. package/SVF-doxygen/wiki/svfpic/debug-new.png +0 -0
  53. package/SVF-doxygen/wiki/svfpic/debug-new2.png +0 -0
  54. package/SVF-doxygen/wiki/svfpic/debug1.jpeg +0 -0
  55. package/SVF-doxygen/wiki/svfpic/debug2.jpeg +0 -0
  56. package/SVF-doxygen/wiki/svfpic/debug3.png +0 -0
  57. package/SVF-doxygen/wiki/svfpic/debug4.png +0 -0
  58. package/SVF-doxygen/wiki/svfpic/debug5.jpeg +0 -0
  59. package/SVF-doxygen/wiki/svfpic/debug6.jpeg +0 -0
  60. package/SVF-doxygen/wiki/svfpic/docker_sys_requirement.png +0 -0
  61. package/SVF-doxygen/wiki/svfpic/docker_sys_requirements.png +0 -0
  62. package/SVF-doxygen/wiki/svfpic/dockerbuild.png +0 -0
  63. package/SVF-doxygen/wiki/svfpic/dockerbuild2.jpg +0 -0
  64. package/SVF-doxygen/wiki/svfpic/dockerbuild3.jpg +0 -0
  65. package/SVF-doxygen/wiki/svfpic/dockerbuild4.png +0 -0
  66. package/SVF-doxygen/wiki/svfpic/dockerbuild5.jpg +0 -0
  67. package/SVF-doxygen/wiki/svfpic/dockerbuildimage.png +0 -0
  68. package/SVF-doxygen/wiki/svfpic/dockercmd.png +0 -0
  69. package/SVF-doxygen/wiki/svfpic/dockercmd2.png +0 -0
  70. package/SVF-doxygen/wiki/svfpic/dockercontainer.png +0 -0
  71. package/SVF-doxygen/wiki/svfpic/dockerdb1.jpg +0 -0
  72. package/SVF-doxygen/wiki/svfpic/dockerdb10.jpeg +0 -0
  73. package/SVF-doxygen/wiki/svfpic/dockerdb2.jpg +0 -0
  74. package/SVF-doxygen/wiki/svfpic/dockerdb3.jpg +0 -0
  75. package/SVF-doxygen/wiki/svfpic/dockerdb4.jpg +0 -0
  76. package/SVF-doxygen/wiki/svfpic/dockerdb5.png +0 -0
  77. package/SVF-doxygen/wiki/svfpic/dockerdb6.jpeg +0 -0
  78. package/SVF-doxygen/wiki/svfpic/dockerdb7.png +0 -0
  79. package/SVF-doxygen/wiki/svfpic/dockerdb8.png +0 -0
  80. package/SVF-doxygen/wiki/svfpic/dockerdb9.jpeg +0 -0
  81. package/SVF-doxygen/wiki/svfpic/dockerfinshbuilt.png +0 -0
  82. package/SVF-doxygen/wiki/svfpic/dockerimage.png +0 -0
  83. package/SVF-doxygen/wiki/svfpic/dockernameImage.png +0 -0
  84. package/SVF-doxygen/wiki/svfpic/dockerpull.png +0 -0
  85. package/SVF-doxygen/wiki/svfpic/dockerpull2.png +0 -0
  86. package/SVF-doxygen/wiki/svfpic/download.jpg +0 -0
  87. package/SVF-doxygen/wiki/svfpic/extension1.jpeg +0 -0
  88. package/SVF-doxygen/wiki/svfpic/extension2.jpeg +0 -0
  89. package/SVF-doxygen/wiki/svfpic/graphviz.png +0 -0
  90. package/SVF-doxygen/wiki/svfpic/hellodb.png +0 -0
  91. package/SVF-doxygen/wiki/svfpic/hellodb2.png +0 -0
  92. package/SVF-doxygen/wiki/svfpic/hviz_0.png +0 -0
  93. package/SVF-doxygen/wiki/svfpic/hviz_1.png +0 -0
  94. package/SVF-doxygen/wiki/svfpic/hviz_2.png +0 -0
  95. package/SVF-doxygen/wiki/svfpic/installC:C++Ext.png +0 -0
  96. package/SVF-doxygen/wiki/svfpic/installCMakeExt.png +0 -0
  97. package/SVF-doxygen/wiki/svfpic/installRCext.png +0 -0
  98. package/SVF-doxygen/wiki/svfpic/installdockerext.png +0 -0
  99. package/SVF-doxygen/wiki/svfpic/launch1.png +0 -0
  100. package/SVF-doxygen/wiki/svfpic/openfile.png +0 -0
  101. package/SVF-doxygen/wiki/svfpic/pathfolder.png +0 -0
  102. package/SVF-doxygen/wiki/svfpic/restart.png +0 -0
  103. package/SVF-doxygen/wiki/svfpic/rundocker.png +0 -0
  104. package/SVF-doxygen/wiki/svfpic/runinCLI.png +0 -0
  105. package/SVF-doxygen/wiki/svfpic/screen.png +0 -0
  106. package/SVF-doxygen/wiki/svfpic/settings1.jpg +0 -0
  107. package/SVF-doxygen/wiki/svfpic/settings2.jpg +0 -0
  108. package/SVF-doxygen/wiki/svfpic/settings3.jpg +0 -0
  109. package/SVF-doxygen/wiki/svfpic/shortlists.png +0 -0
  110. package/SVF-doxygen/wiki/svfpic/start.png +0 -0
  111. package/SVF-doxygen/wiki/svfpic/start1.png +0 -0
  112. package/SVF-doxygen/wiki/svfpic/update0.png +0 -0
  113. package/SVF-doxygen/wiki/svfpic/verify_docker.png +0 -0
  114. package/SVF-doxygen/wiki/svfpic/vs_entry_window.png +0 -0
  115. package/SVF-doxygen/wiki/svfpic/wsl.png +0 -0
  116. package/SVF-doxygen/wiki/svfpic/wsl_1.png +0 -0
  117. package/SVF-doxygen/wiki/svfpic/wsl_2.png +0 -0
  118. package/SVF-doxygen/wiki/svfpic/wsl_3.png +0 -0
  119. package/SVF-doxygen/wiki/tools.png +0 -0
  120. package/SVF-doxygen/wiki/users.png +0 -0
  121. package/SVF-doxygen/wiki/vm1.png +0 -0
  122. package/SVF-doxygen/wiki/vm2.png +0 -0
  123. package/SVF-doxygen/wiki/vm3.png +0 -0
  124. package/SVF-doxygen/wiki/vm4.png +0 -0
  125. package/SVF-doxygen/wiki/vm5.png +0 -0
  126. package/SVF-doxygen/wiki/vscode_build_tasks.png +0 -0
  127. package/SVF-doxygen/wiki/vscode_cpp_extension.png +0 -0
  128. package/SVF-doxygen/wiki/vscode_debug_list.png +0 -0
  129. package/SVF-doxygen/wiki/vscode_dir_structure.png +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.1266",
3
+ "version": "1.0.1267",
4
4
  "description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -970,6 +970,7 @@ void AbstractInterpretation::handleSVFStatement(const SVFStmt *stmt)
970
970
  {
971
971
  const auto& vmap = getAbsState(stmt->getICFGNode()).getVarToVal();
972
972
  auto it = vmap.find(IRGraph::NullPtr);
973
+ (void)it; // Suppress warning of unused variable under release build
973
974
  assert(it == vmap.end() ||
974
975
  (!it->second.isInterval() && !it->second.isAddr()));
975
976
  }
@@ -168,6 +168,7 @@ void FullSparseAbstractInterpretation::pullObjValueFlows(const ICFGNode* node)
168
168
 
169
169
  const ICFGNode* srcICFG = src->getICFGNode();
170
170
  const ICFGNode* dstICFG = v->getICFGNode();
171
+ (void)dstICFG; // Suppress warning of unused variable under release build
171
172
  assert(srcICFG && "SVFG source node must have an ICFG node");
172
173
  assert(dstICFG &&
173
174
  "SVFG destination node must have an ICFG node");
@@ -191,6 +191,7 @@ AddrCGEdge::AddrCGEdge(ConstraintNode* s, ConstraintNode* d, EdgeID id)
191
191
  {
192
192
  // Retarget addr edges may lead s to be a dummy node
193
193
  const SVFVar* node = SVFIR::getPAG()->getSVFVar(s->getId());
194
+ (void)node; // Suppress warning of unused variable under release build
194
195
  if (!SVFIR::pagReadFromTXT())
195
196
  {
196
197
  assert(!SVFUtil::isa<DummyValVar>(node) && "a dummy node??");
@@ -419,7 +419,7 @@ void MHP::updateAncestorThreads(NodeID curTid)
419
419
  {
420
420
  NodeBS ancestorAndSelfTids = tct->getAncestorThreads(curTid);
421
421
  DBOUT(DMTA, outs() << "##Ancestor thread of " << curTid << " is : ");
422
- DBOUT(DMTA, dumpSet(tds));
422
+ DBOUT(DMTA, dumpSet(ancestorAndSelfTids));
423
423
  DBOUT(DMTA, outs() << "\n");
424
424
  ancestorAndSelfTids.set(curTid);
425
425
 
@@ -581,6 +581,7 @@ NodeBS& SVFIR::getAllFieldsObjVars(const BaseObjVar* obj)
581
581
  NodeBS& SVFIR::getAllFieldsObjVars(NodeID id)
582
582
  {
583
583
  const SVFVar* node = pag->getSVFVar(id);
584
+ (void)node; // Suppress warning of unused variable under release build
584
585
  assert(SVFUtil::isa<ObjVar>(node) && "need an object node");
585
586
  return getAllFieldsObjVars(getBaseObject(id));
586
587
  }
@@ -593,6 +594,7 @@ NodeBS& SVFIR::getAllFieldsObjVars(NodeID id)
593
594
  NodeBS SVFIR::getFieldsAfterCollapse(NodeID id)
594
595
  {
595
596
  const SVFVar* node = pag->getSVFVar(id);
597
+ (void)node; // Suppress warning of unused variable under release build
596
598
  assert(SVFUtil::isa<ObjVar>(node) && "need an object node");
597
599
  const BaseObjVar* obj = getBaseObject(id);
598
600
  if(obj->isFieldInsensitive())
@@ -802,4 +804,4 @@ NodeID SVFIR::addObjNode(ObjVar* node)
802
804
  NodeID SVFIR::addDummyObjNode(DummyObjVar* node)
803
805
  {
804
806
  return addObjNode(node);
805
- }
807
+ }
@@ -137,7 +137,9 @@ static inline Type* getPtrElementType(const PointerType* pty)
137
137
  assert(!pty->isOpaque() && "Opaque Pointer is used, please recompile the source adding '-Xclang -no-opaque-pointers'");
138
138
  return pty->getNonOpaquePointerElementType();
139
139
  #else
140
+ (void)pty; // Suppress warning of unused variable under release build
140
141
  assert(false && "llvm version 17+ only support opaque pointers!");
142
+ return nullptr;
141
143
  #endif
142
144
  }
143
145
 
@@ -343,6 +343,7 @@ inline ICFGNode* ICFGBuilder::addBlockICFGNode(const Instruction* inst)
343
343
  IntraICFGNode* ICFGBuilder::addIntraBlockICFGNode(const Instruction* inst)
344
344
  {
345
345
  IntraICFGNode* node = llvmModuleSet()->getIntraBlock(inst);
346
+ (void)node; // Suppress warning of unused variable under release build
346
347
  assert (node==nullptr && "no IntraICFGNode for this instruction?");
347
348
  IntraICFGNode* sNode = icfg->addIntraICFGNode(
348
349
  llvmModuleSet()->getSVFBasicBlock(inst->getParent()), SVFUtil::isa<ReturnInst>(inst));
@@ -360,4 +361,4 @@ inline FunExitICFGNode* ICFGBuilder::addFunExitBlock(const Function* fun)
360
361
  {
361
362
  return llvmModuleSet()->FunToFunExitNodeMap[fun] =
362
363
  icfg->addFunExitICFGNode(llvmModuleSet()->getFunObjVar(fun));
363
- }
364
+ }
@@ -757,7 +757,8 @@ void SVFIRBuilder::processCE(const Value* val)
757
757
  {
758
758
  if (const ConstantExpr* gepce = isGepConstantExpr(ref))
759
759
  {
760
- DBOUT(DPAGBuild, outs() << "handle gep constant expression " << llvmModuleSet()->getSVFValue(ref)->toString() << "\n");
760
+ DBOUT(DPAGBuild, outs() << "handle gep constant expression "
761
+ << LLVMUtil::dumpValue(ref) << "\n");
761
762
  const Constant* opnd = gepce->getOperand(0);
762
763
  // handle recursive constant express case (gep (bitcast (gep X 1)) 1)
763
764
  processCE(opnd);
@@ -778,7 +779,8 @@ void SVFIRBuilder::processCE(const Value* val)
778
779
  }
779
780
  else if (const ConstantExpr* castce = isCastConstantExpr(ref))
780
781
  {
781
- DBOUT(DPAGBuild, outs() << "handle cast constant expression " << llvmModuleSet()->getSVFValue(ref)->toString() << "\n");
782
+ DBOUT(DPAGBuild, outs() << "handle cast constant expression "
783
+ << LLVMUtil::dumpValue(ref) << "\n");
782
784
  const Constant* opnd = castce->getOperand(0);
783
785
  processCE(opnd);
784
786
  const Value* cval = getCurrentValue();
@@ -789,7 +791,8 @@ void SVFIRBuilder::processCE(const Value* val)
789
791
  }
790
792
  else if (const ConstantExpr* selectce = isSelectConstantExpr(ref))
791
793
  {
792
- DBOUT(DPAGBuild, outs() << "handle select constant expression " << llvmModuleSet()->getSVFValue(ref)->toString() << "\n");
794
+ DBOUT(DPAGBuild, outs() << "handle select constant expression "
795
+ << LLVMUtil::dumpValue(ref) << "\n");
793
796
  const Constant* src1 = selectce->getOperand(1);
794
797
  const Constant* src2 = selectce->getOperand(2);
795
798
  processCE(src1);
@@ -912,7 +915,9 @@ NodeID SVFIRBuilder::getGlobalVarField(const GlobalVariable *gvar, u32_t offset,
912
915
  void SVFIRBuilder::InitialGlobal(const GlobalVariable *gvar, Constant *C,
913
916
  u32_t offset)
914
917
  {
915
- DBOUT(DPAGBuild, outs() << "global " << llvmModuleSet()->getSVFValue(gvar)->toString() << " constant initializer: " << llvmModuleSet()->getSVFValue(C)->toString() << "\n");
918
+ DBOUT(DPAGBuild, outs() << "global " << LLVMUtil::dumpValue(gvar)
919
+ << " constant initializer: "
920
+ << LLVMUtil::dumpValue(C) << "\n");
916
921
  if (C->getType()->isSingleValueType())
917
922
  {
918
923
  NodeID src = getValueNode(C);
@@ -1005,7 +1010,8 @@ void SVFIRBuilder::visitGlobal()
1005
1010
  if (gvar->hasInitializer())
1006
1011
  {
1007
1012
  Constant *C = gvar->getInitializer();
1008
- DBOUT(DPAGBuild, outs() << "add global var node " << llvmModuleSet()->getSVFValue(gvar)->toString() << "\n");
1013
+ DBOUT(DPAGBuild, outs() << "add global var node "
1014
+ << LLVMUtil::dumpValue(gvar) << "\n");
1009
1015
  InitialGlobal(gvar, C, 0);
1010
1016
  }
1011
1017
  }
@@ -1046,7 +1052,8 @@ void SVFIRBuilder::visitAllocaInst(AllocaInst &inst)
1046
1052
  // AllocaInst should always be a pointer type
1047
1053
  assert(SVFUtil::isa<PointerType>(inst.getType()));
1048
1054
 
1049
- DBOUT(DPAGBuild, outs() << "process alloca " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1055
+ DBOUT(DPAGBuild,
1056
+ outs() << "process alloca " << LLVMUtil::dumpValue(&inst) << "\n");
1050
1057
  NodeID dst = getValueNode(&inst);
1051
1058
 
1052
1059
  NodeID src = getObjectNode(&inst);
@@ -1061,7 +1068,8 @@ void SVFIRBuilder::visitAllocaInst(AllocaInst &inst)
1061
1068
  void SVFIRBuilder::visitPHINode(PHINode &inst)
1062
1069
  {
1063
1070
 
1064
- DBOUT(DPAGBuild, outs() << "process phi " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1071
+ DBOUT(DPAGBuild,
1072
+ outs() << "process phi " << LLVMUtil::dumpValue(&inst) << "\n");
1065
1073
 
1066
1074
  NodeID dst = getValueNode(&inst);
1067
1075
 
@@ -1085,7 +1093,8 @@ void SVFIRBuilder::visitPHINode(PHINode &inst)
1085
1093
  */
1086
1094
  void SVFIRBuilder::visitLoadInst(LoadInst &inst)
1087
1095
  {
1088
- DBOUT(DPAGBuild, outs() << "process load " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1096
+ DBOUT(DPAGBuild,
1097
+ outs() << "process load " << LLVMUtil::dumpValue(&inst) << "\n");
1089
1098
 
1090
1099
  NodeID dst = getValueNode(&inst);
1091
1100
 
@@ -1105,7 +1114,8 @@ void SVFIRBuilder::visitStoreInst(StoreInst &inst)
1105
1114
  // StoreInst itself should always not be a pointer type
1106
1115
  assert(!SVFUtil::isa<PointerType>(inst.getType()));
1107
1116
 
1108
- DBOUT(DPAGBuild, outs() << "process store " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1117
+ DBOUT(DPAGBuild,
1118
+ outs() << "process store " << LLVMUtil::dumpValue(&inst) << "\n");
1109
1119
 
1110
1120
  NodeID dst = getValueNode(inst.getPointerOperand());
1111
1121
  const Type* storedTy = inst.getValueOperand()->getType();
@@ -1135,7 +1145,8 @@ void SVFIRBuilder::visitGetElementPtrInst(GetElementPtrInst &inst)
1135
1145
 
1136
1146
  assert(SVFUtil::isa<PointerType>(inst.getType()));
1137
1147
 
1138
- DBOUT(DPAGBuild, outs() << "process gep " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1148
+ DBOUT(DPAGBuild,
1149
+ outs() << "process gep " << LLVMUtil::dumpValue(&inst) << "\n");
1139
1150
 
1140
1151
  NodeID src = getValueNode(inst.getPointerOperand());
1141
1152
 
@@ -1163,7 +1174,8 @@ void SVFIRBuilder::visitGetElementPtrInst(GetElementPtrInst &inst)
1163
1174
  void SVFIRBuilder::visitCastInst(CastInst &inst)
1164
1175
  {
1165
1176
 
1166
- DBOUT(DPAGBuild, outs() << "process cast " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1177
+ DBOUT(DPAGBuild,
1178
+ outs() << "process cast " << LLVMUtil::dumpValue(&inst) << "\n");
1167
1179
  NodeID dst = getValueNode(&inst);
1168
1180
 
1169
1181
  const Value* opnd = inst.getOperand(0);
@@ -1221,7 +1233,8 @@ void SVFIRBuilder::visitCmpInst(CmpInst &inst)
1221
1233
  void SVFIRBuilder::visitSelectInst(SelectInst &inst)
1222
1234
  {
1223
1235
 
1224
- DBOUT(DPAGBuild, outs() << "process select " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1236
+ DBOUT(DPAGBuild,
1237
+ outs() << "process select " << LLVMUtil::dumpValue(&inst) << "\n");
1225
1238
 
1226
1239
  NodeID dst = getValueNode(&inst);
1227
1240
  NodeID src1 = getValueNode(inst.getTrueValue());
@@ -1257,8 +1270,7 @@ void SVFIRBuilder::visitCallSite(CallBase* cs)
1257
1270
  return;
1258
1271
 
1259
1272
  DBOUT(DPAGBuild,
1260
- outs() << "process callsite " << svfcall->valueOnlyToString() << "\n");
1261
-
1273
+ outs() << "process callsite " << LLVMUtil::dumpValue(cs) << "\n");
1262
1274
 
1263
1275
  CallICFGNode* callBlockNode = llvmModuleSet()->getCallICFGNode(cs);
1264
1276
  RetICFGNode* retBlockNode = llvmModuleSet()->getRetICFGNode(cs);
@@ -1306,7 +1318,8 @@ void SVFIRBuilder::visitReturnInst(ReturnInst &inst)
1306
1318
  // ReturnInst itself should always not be a pointer type
1307
1319
  assert(!SVFUtil::isa<PointerType>(inst.getType()));
1308
1320
 
1309
- DBOUT(DPAGBuild, outs() << "process return " << llvmModuleSet()->getSVFValue(&inst)->toString() << " \n");
1321
+ DBOUT(DPAGBuild,
1322
+ outs() << "process return " << LLVMUtil::dumpValue(&inst) << "\n");
1310
1323
 
1311
1324
  if(Value* src = inst.getReturnValue())
1312
1325
  {
@@ -1504,8 +1517,8 @@ void SVFIRBuilder::handleDirectCall(CallBase* cs, const Function *F)
1504
1517
  assert(F);
1505
1518
  CallICFGNode* callICFGNode = llvmModuleSet()->getCallICFGNode(cs);
1506
1519
  const FunObjVar* svffun = llvmModuleSet()->getFunObjVar(F);
1507
- DBOUT(DPAGBuild,
1508
- outs() << "handle direct call " << LLVMUtil::dumpValue(cs) << " callee " << F->getName().str() << "\n");
1520
+ DBOUT(DPAGBuild, outs() << "handle direct call " << LLVMUtil::dumpValue(cs)
1521
+ << " callee " << F->getName().str() << "\n");
1509
1522
 
1510
1523
  //Only handle the ret.val. if it's used as a ptr.
1511
1524
  NodeID dstrec = getValueNode(cs);
@@ -1531,7 +1544,8 @@ void SVFIRBuilder::handleDirectCall(CallBase* cs, const Function *F)
1531
1544
  }
1532
1545
  const Value* AA = cs->getArgOperand(itA), *FA = &*itF; //current actual/formal arg
1533
1546
 
1534
- DBOUT(DPAGBuild, outs() << "process actual parm " << llvmModuleSet()->getSVFValue(AA)->toString() << " \n");
1547
+ DBOUT(DPAGBuild, outs() << "process actual parm "
1548
+ << LLVMUtil::dumpValue(AA) << "\n");
1535
1549
 
1536
1550
  NodeID dstFA = getValueNode(FA);
1537
1551
  NodeID srcAA = getValueNode(AA);
@@ -275,10 +275,7 @@ void SymbolTableBuilder::collectSym(const Value* val)
275
275
  //TODO: filter the non-pointer type // if (!SVFUtil::isa<PointerType>(val->getType())) return;
276
276
 
277
277
  DBOUT(DMemModel,
278
- outs()
279
- << "collect sym from ##"
280
- << llvmModuleSet()->getSVFValue(val)->toString()
281
- << " \n");
278
+ outs() << "collect sym from ##" << LLVMUtil::dumpValue(val) << "\n");
282
279
  //TODO handle constant expression value here??
283
280
  handleCE(val);
284
281
 
@@ -395,10 +392,7 @@ void SymbolTableBuilder::handleCE(const Value* val)
395
392
  if (const ConstantExpr* ce = isGepConstantExpr(ref))
396
393
  {
397
394
  DBOUT(DMemModelCE, outs() << "handle constant expression "
398
- << llvmModuleSet()
399
- ->getSVFValue(ref)
400
- ->toString()
401
- << "\n");
395
+ << LLVMUtil::dumpValue(ref) << "\n");
402
396
  collectVal(ce);
403
397
 
404
398
  // handle the recursive constant express case
@@ -412,10 +406,7 @@ void SymbolTableBuilder::handleCE(const Value* val)
412
406
  else if (const ConstantExpr* ce = isCastConstantExpr(ref))
413
407
  {
414
408
  DBOUT(DMemModelCE, outs() << "handle constant expression "
415
- << llvmModuleSet()
416
- ->getSVFValue(ref)
417
- ->toString()
418
- << "\n");
409
+ << LLVMUtil::dumpValue(ref) << "\n");
419
410
  collectVal(ce);
420
411
  collectVal(ce->getOperand(0));
421
412
  // handle the recursive constant express case
@@ -425,10 +416,7 @@ void SymbolTableBuilder::handleCE(const Value* val)
425
416
  else if (const ConstantExpr* ce = isSelectConstantExpr(ref))
426
417
  {
427
418
  DBOUT(DMemModelCE, outs() << "handle constant expression "
428
- << llvmModuleSet()
429
- ->getSVFValue(ref)
430
- ->toString()
431
- << "\n");
419
+ << LLVMUtil::dumpValue(ref) << "\n");
432
420
  collectVal(ce);
433
421
  collectVal(ce->getOperand(0));
434
422
  collectVal(ce->getOperand(1));