svf-lib 1.0.2213 → 1.0.2215

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 (72) hide show
  1. package/SVF-linux/Release-build/bin/ae +0 -0
  2. package/SVF-linux/Release-build/bin/cfl +0 -0
  3. package/SVF-linux/Release-build/bin/dvf +0 -0
  4. package/SVF-linux/Release-build/bin/llvm2svf +0 -0
  5. package/SVF-linux/Release-build/bin/mta +0 -0
  6. package/SVF-linux/Release-build/bin/saber +0 -0
  7. package/SVF-linux/Release-build/bin/svf-ex +0 -0
  8. package/SVF-linux/Release-build/bin/wpa +0 -0
  9. package/SVF-linux/Release-build/include/DDA/DDAClient.h +6 -11
  10. package/SVF-linux/Release-build/include/DDA/DDAPass.h +1 -1
  11. package/SVF-linux/Release-build/include/Graphs/CHG.h +2 -3
  12. package/SVF-linux/Release-build/include/Graphs/GenericGraph.h +1 -286
  13. package/SVF-linux/Release-build/include/MTA/MTA.h +2 -2
  14. package/SVF-linux/Release-build/include/MTA/TCT.h +0 -6
  15. package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysis.h +1 -7
  16. package/SVF-linux/Release-build/include/SABER/DoubleFreeChecker.h +1 -1
  17. package/SVF-linux/Release-build/include/SABER/FileChecker.h +1 -1
  18. package/SVF-linux/Release-build/include/SABER/LeakChecker.h +1 -1
  19. package/SVF-linux/Release-build/include/SABER/SaberCondAllocator.h +1 -2
  20. package/SVF-linux/Release-build/include/SABER/SrcSnkDDA.h +2 -2
  21. package/SVF-linux/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
  22. package/SVF-linux/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
  23. package/SVF-linux/Release-build/include/SVF-LLVM/DCHG.h +1 -1
  24. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMLoopAnalysis.h +1 -1
  25. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMModule.h +2 -2
  26. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMUtil.h +1 -1
  27. package/SVF-linux/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
  28. package/SVF-linux/Release-build/include/{SVFIR → SVF-LLVM}/SVFModule.h +1 -36
  29. package/SVF-linux/Release-build/include/SVFIR/ObjTypeInfo.h +0 -1
  30. package/SVF-linux/Release-build/include/SVFIR/SVFIR.h +38 -11
  31. package/SVF-linux/Release-build/include/SVFIR/SVFStatements.h +1 -0
  32. package/SVF-linux/Release-build/include/SVFIR/SVFValue.h +202 -799
  33. package/SVF-linux/Release-build/include/Util/CDGBuilder.h +1 -1
  34. package/SVF-linux/Release-build/include/Util/GeneralType.h +1 -0
  35. package/SVF-linux/Release-build/include/Util/SVFLoopAndDomInfo.h +169 -0
  36. package/SVF-linux/Release-build/include/Util/SVFUtil.h +3 -1
  37. package/SVF-linux/Release-build/include/Util/ThreadAPI.h +2 -1
  38. package/SVF-linux/Release-build/include/WPA/FlowSensitive.h +1 -1
  39. package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
  40. package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
  41. package/SVF-osx/Release-build/bin/ae +0 -0
  42. package/SVF-osx/Release-build/bin/cfl +0 -0
  43. package/SVF-osx/Release-build/bin/dvf +0 -0
  44. package/SVF-osx/Release-build/bin/llvm2svf +0 -0
  45. package/SVF-osx/Release-build/bin/mta +0 -0
  46. package/SVF-osx/Release-build/bin/saber +0 -0
  47. package/SVF-osx/Release-build/bin/svf-ex +0 -0
  48. package/SVF-osx/Release-build/bin/wpa +0 -0
  49. package/SVF-osx/Release-build/include/Graphs/BasicBlockG.h +2 -2
  50. package/SVF-osx/Release-build/include/Graphs/CDG.h +1 -1
  51. package/SVF-osx/Release-build/include/Graphs/CFLGraph.h +1 -1
  52. package/SVF-osx/Release-build/include/Graphs/CHG.h +1 -1
  53. package/SVF-osx/Release-build/include/Graphs/CallGraph.h +1 -1
  54. package/SVF-osx/Release-build/include/Graphs/ConsGNode.h +1 -1
  55. package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +3 -3
  56. package/SVF-osx/Release-build/include/Graphs/ICFGNode.h +6 -6
  57. package/SVF-osx/Release-build/include/Graphs/VFGNode.h +20 -20
  58. package/SVF-osx/Release-build/include/MTA/TCT.h +1 -1
  59. package/SVF-osx/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
  60. package/SVF-osx/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
  61. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +12 -12
  62. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +2 -2
  63. package/SVF-osx/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
  64. package/SVF-osx/Release-build/include/SVF-LLVM/SVFIRBuilder.h +6 -6
  65. package/SVF-osx/Release-build/include/SVF-LLVM/SVFLLVMValue.h +805 -0
  66. package/SVF-osx/Release-build/include/SVF-LLVM/SVFModule.h +1 -1
  67. package/SVF-osx/Release-build/include/SVFIR/SVFValue.h +2 -2
  68. package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +28 -28
  69. package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
  70. package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
  71. package/package.json +1 -1
  72. /package/{SVF-osx → SVF-linux}/Release-build/include/SVF-LLVM/SVFValue.h +0 -0
@@ -55,7 +55,7 @@ public:
55
55
  void build();
56
56
 
57
57
  /// build control dependence for each function
58
- void buildControlDependence(const SVFModule *svfgModule);
58
+ void buildControlDependence();
59
59
 
60
60
  /// build map at icfg node level
61
61
  void buildICFGNodeControlMap();
@@ -38,6 +38,7 @@
38
38
  #include <unordered_map>
39
39
  #include <unordered_set>
40
40
  #include <vector>
41
+ #include <memory>
41
42
  #include "Util/SparseBitVector.h"
42
43
 
43
44
  namespace SVF
@@ -0,0 +1,169 @@
1
+ //===- SVFLoopAndDomInfo.h -- ------------------------------//
2
+ //
3
+ // SVF: Static Value-Flow Analysis
4
+ //
5
+ // Copyright (C) <2013-2017> <Yulei Sui>
6
+ //
7
+
8
+ // This program is free software: you can redistribute it and/or modify
9
+ // it under the terms of the GNU Affero General Public License as published by
10
+ // the Free Software Foundation, either version 3 of the License, or
11
+ // (at your option) any later version.
12
+
13
+ // This program is distributed in the hope that it will be useful,
14
+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ // GNU Affero General Public License for more details.
17
+
18
+ // You should have received a copy of the GNU Affero General Public License
19
+ // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ //
21
+ //===----------------------------------------------------------------------===//
22
+
23
+ /*
24
+ * SVFLoopAndDomInfo.h
25
+ *
26
+ * Created on: Feb 7, 2025
27
+ * Author: Xiao Cheng
28
+ *
29
+ */
30
+
31
+ #ifndef SVFLOOPANDDOMINFO_H
32
+ #define SVFLOOPANDDOMINFO_H
33
+
34
+ #include "SVFIR/SVFType.h"
35
+ #include "Graphs/GraphPrinter.h"
36
+ #include "Util/Casting.h"
37
+ #include "Graphs/BasicBlockG.h"
38
+
39
+ namespace SVF
40
+ {
41
+ class SVFLoopAndDomInfo
42
+ {
43
+ friend class SVFIRWriter;
44
+ friend class SVFIRReader;
45
+ public:
46
+ typedef Set<const SVFBasicBlock*> BBSet;
47
+ typedef std::vector<const SVFBasicBlock*> BBList;
48
+ typedef BBList LoopBBs;
49
+
50
+ private:
51
+ BBList reachableBBs; ///< reachable BasicBlocks from the function entry.
52
+ Map<const SVFBasicBlock*,BBSet> dtBBsMap; ///< map a BasicBlock to BasicBlocks it Dominates
53
+ Map<const SVFBasicBlock*,BBSet> pdtBBsMap; ///< map a BasicBlock to BasicBlocks it PostDominates
54
+ Map<const SVFBasicBlock*,BBSet> dfBBsMap; ///< map a BasicBlock to its Dominate Frontier BasicBlocks
55
+ Map<const SVFBasicBlock*, LoopBBs> bb2LoopMap; ///< map a BasicBlock (if it is in a loop) to all the BasicBlocks in this loop
56
+ Map<const SVFBasicBlock*, u32_t> bb2PdomLevel; ///< map a BasicBlock to its level in pdom tree, used in findNearestCommonPDominator
57
+ Map<const SVFBasicBlock*, const SVFBasicBlock*> bb2PIdom; ///< map a BasicBlock to its immediate dominator in pdom tree, used in findNearestCommonPDominator
58
+
59
+ public:
60
+ SVFLoopAndDomInfo()
61
+ {
62
+ }
63
+
64
+ virtual ~SVFLoopAndDomInfo() {}
65
+
66
+ inline const Map<const SVFBasicBlock*,BBSet>& getDomFrontierMap() const
67
+ {
68
+ return dfBBsMap;
69
+ }
70
+
71
+ inline Map<const SVFBasicBlock*,BBSet>& getDomFrontierMap()
72
+ {
73
+ return dfBBsMap;
74
+ }
75
+
76
+ inline bool hasLoopInfo(const SVFBasicBlock* bb) const
77
+ {
78
+ return bb2LoopMap.find(bb) != bb2LoopMap.end();
79
+ }
80
+
81
+ const LoopBBs& getLoopInfo(const SVFBasicBlock* bb) const;
82
+
83
+ inline const SVFBasicBlock* getLoopHeader(const LoopBBs& lp) const
84
+ {
85
+ assert(!lp.empty() && "this is not a loop, empty basic block");
86
+ return lp.front();
87
+ }
88
+
89
+ inline bool loopContainsBB(const LoopBBs& lp, const SVFBasicBlock* bb) const
90
+ {
91
+ return std::find(lp.begin(), lp.end(), bb) != lp.end();
92
+ }
93
+
94
+ inline void addToBB2LoopMap(const SVFBasicBlock* bb, const SVFBasicBlock* loopBB)
95
+ {
96
+ bb2LoopMap[bb].push_back(loopBB);
97
+ }
98
+
99
+ inline const Map<const SVFBasicBlock*,BBSet>& getPostDomTreeMap() const
100
+ {
101
+ return pdtBBsMap;
102
+ }
103
+
104
+ inline Map<const SVFBasicBlock*,BBSet>& getPostDomTreeMap()
105
+ {
106
+ return pdtBBsMap;
107
+ }
108
+
109
+ inline const Map<const SVFBasicBlock*,u32_t>& getBBPDomLevel() const
110
+ {
111
+ return bb2PdomLevel;
112
+ }
113
+
114
+ inline Map<const SVFBasicBlock*,u32_t>& getBBPDomLevel()
115
+ {
116
+ return bb2PdomLevel;
117
+ }
118
+
119
+ inline const Map<const SVFBasicBlock*,const SVFBasicBlock*>& getBB2PIdom() const
120
+ {
121
+ return bb2PIdom;
122
+ }
123
+
124
+ inline Map<const SVFBasicBlock*,const SVFBasicBlock*>& getBB2PIdom()
125
+ {
126
+ return bb2PIdom;
127
+ }
128
+
129
+
130
+ inline Map<const SVFBasicBlock*,BBSet>& getDomTreeMap()
131
+ {
132
+ return dtBBsMap;
133
+ }
134
+
135
+ inline const Map<const SVFBasicBlock*,BBSet>& getDomTreeMap() const
136
+ {
137
+ return dtBBsMap;
138
+ }
139
+
140
+ inline bool isUnreachable(const SVFBasicBlock* bb) const
141
+ {
142
+ return std::find(reachableBBs.begin(), reachableBBs.end(), bb) ==
143
+ reachableBBs.end();
144
+ }
145
+
146
+ inline const BBList& getReachableBBs() const
147
+ {
148
+ return reachableBBs;
149
+ }
150
+
151
+ inline void setReachableBBs(BBList& bbs)
152
+ {
153
+ reachableBBs = bbs;
154
+ }
155
+
156
+ void getExitBlocksOfLoop(const SVFBasicBlock* bb, BBList& exitbbs) const;
157
+
158
+ bool isLoopHeader(const SVFBasicBlock* bb) const;
159
+
160
+ bool dominate(const SVFBasicBlock* bbKey, const SVFBasicBlock* bbValue) const;
161
+
162
+ bool postDominate(const SVFBasicBlock* bbKey, const SVFBasicBlock* bbValue) const;
163
+
164
+ /// find nearest common post dominator of two basic blocks
165
+ const SVFBasicBlock *findNearestCommonPDominator(const SVFBasicBlock *A, const SVFBasicBlock *B) const;
166
+ };
167
+ }
168
+
169
+ #endif //SVFLOOPANDDOMINFO_H
@@ -32,10 +32,12 @@
32
32
 
33
33
  #include "FastCluster/fastcluster.h"
34
34
  #include "SVFIR/SVFValue.h"
35
- #include "SVFIR/SVFModule.h"
35
+ #include "Util/SVFLoopAndDomInfo.h"
36
36
  #include "Util/ExtAPI.h"
37
37
  #include "MemoryModel/PointsTo.h"
38
38
  #include <time.h>
39
+ #include "Util/NodeIDAllocator.h"
40
+ #include "Util/ThreadAPI.h"
39
41
 
40
42
  namespace SVF
41
43
  {
@@ -41,6 +41,7 @@ class CallICFGNode;
41
41
  class SVFVar;
42
42
  class ValVar;
43
43
  class ObjVar;
44
+ class FunObjVar;
44
45
 
45
46
  /*
46
47
  * ThreadAPI class contains interfaces for pthread programs
@@ -179,7 +180,7 @@ public:
179
180
  bool isTDBarWait(const CallICFGNode *inst) const;
180
181
  //@}
181
182
 
182
- void performAPIStat(SVFModule* m);
183
+ void performAPIStat();
183
184
  void statInit(Map<std::string, u32_t>& tdAPIStatMap);
184
185
  };
185
186
 
@@ -93,7 +93,7 @@ public:
93
93
  }
94
94
 
95
95
  /// We start from here
96
- virtual bool runOnModule(SVFModule*)
96
+ virtual bool runOnModule()
97
97
  {
98
98
  return false;
99
99
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -115,9 +115,9 @@ public:
115
115
 
116
116
  }
117
117
 
118
- static inline bool classof(const SVFBaseNode* node)
118
+ static inline bool classof(const SVFValue* node)
119
119
  {
120
- return node->getNodeKind() == SVFBaseNode::BasicBlockKd;
120
+ return node->getNodeKind() == SVFValue::BasicBlockKd;
121
121
  }
122
122
 
123
123
  static inline bool classof(const SVFBasicBlock* node)
@@ -126,7 +126,7 @@ public:
126
126
  return node->getNodeKind() == CDNodeKd;
127
127
  }
128
128
 
129
- static inline bool classof(const SVFBaseNode* node)
129
+ static inline bool classof(const SVFValue* node)
130
130
  {
131
131
  return node->getNodeKind() == CDNodeKd;
132
132
  }
@@ -160,7 +160,7 @@ public:
160
160
  return node->getNodeKind() == CFLNodeKd;
161
161
  }
162
162
 
163
- static inline bool classof(const SVFBaseNode* node)
163
+ static inline bool classof(const SVFValue* node)
164
164
  {
165
165
  return node->getNodeKind() == CFLNodeKd;
166
166
  }
@@ -204,7 +204,7 @@ public:
204
204
  return node->getNodeKind() == CHNodeKd;
205
205
  }
206
206
 
207
- static inline bool classof(const SVFBaseNode* node)
207
+ static inline bool classof(const SVFValue* node)
208
208
  {
209
209
  return node->getNodeKind() == CHNodeKd;
210
210
  }
@@ -221,7 +221,7 @@ public:
221
221
  return node->getNodeKind() == CallNodeKd;
222
222
  }
223
223
 
224
- static inline bool classof(const SVFBaseNode* node)
224
+ static inline bool classof(const SVFValue* node)
225
225
  {
226
226
  return node->getNodeKind() == CallNodeKd;
227
227
  }
@@ -406,7 +406,7 @@ public:
406
406
  return node->getNodeKind() == ConstraintNodeKd;
407
407
  }
408
408
 
409
- static inline bool classof(const SVFBaseNode* node)
409
+ static inline bool classof(const SVFValue* node)
410
410
  {
411
411
  return node->getNodeKind() == ConstraintNodeKd;
412
412
  }
@@ -140,7 +140,7 @@ protected:
140
140
  * Generic node on the graph as base class
141
141
  */
142
142
  template<class NodeTy,class EdgeTy>
143
- class GenericNode: public SVFBaseNode
143
+ class GenericNode: public SVFValue
144
144
  {
145
145
  friend class SVFIRWriter;
146
146
  friend class SVFIRReader;
@@ -163,7 +163,7 @@ private:
163
163
 
164
164
  public:
165
165
  /// Constructor
166
- GenericNode(NodeID i, GNodeK k, const SVFType* svfType = nullptr): SVFBaseNode(i, k, svfType)
166
+ GenericNode(NodeID i, GNodeK k, const SVFType* svfType = nullptr): SVFValue(i, k, svfType)
167
167
  {
168
168
 
169
169
  }
@@ -327,7 +327,7 @@ public:
327
327
  return true;
328
328
  }
329
329
 
330
- static inline bool classof(const SVFBaseNode*)
330
+ static inline bool classof(const SVFValue*)
331
331
  {
332
332
  return true;
333
333
  }
@@ -137,7 +137,7 @@ public:
137
137
  return isICFGNodeKinds(node->getNodeKind());
138
138
  }
139
139
 
140
- static inline bool classof(const SVFBaseNode* node)
140
+ static inline bool classof(const SVFValue* node)
141
141
  {
142
142
  return isICFGNodeKinds(node->getNodeKind());
143
143
  }
@@ -261,7 +261,7 @@ public:
261
261
  return isInterICFGNodeKind(node->getNodeKind());
262
262
  }
263
263
 
264
- static inline bool classof(const SVFBaseNode* node)
264
+ static inline bool classof(const SVFValue* node)
265
265
  {
266
266
  return isInterICFGNodeKind(node->getNodeKind());
267
267
  }
@@ -331,7 +331,7 @@ public:
331
331
  return node->getNodeKind() == FunEntryBlock;
332
332
  }
333
333
 
334
- static inline bool classof(const SVFBaseNode*node)
334
+ static inline bool classof(const SVFValue*node)
335
335
  {
336
336
  return node->getNodeKind() == FunEntryBlock;
337
337
  }
@@ -399,7 +399,7 @@ public:
399
399
  return node->getNodeKind() == FunExitBlock;
400
400
  }
401
401
 
402
- static inline bool classof(const SVFBaseNode*node)
402
+ static inline bool classof(const SVFValue*node)
403
403
  {
404
404
  return node->getNodeKind() == FunExitBlock;
405
405
  }
@@ -571,7 +571,7 @@ public:
571
571
  return node->getNodeKind() == FunCallBlock;
572
572
  }
573
573
 
574
- static inline bool classof(const SVFBaseNode*node)
574
+ static inline bool classof(const SVFValue*node)
575
575
  {
576
576
  return node->getNodeKind() == FunCallBlock;
577
577
  }
@@ -650,7 +650,7 @@ public:
650
650
  {
651
651
  return node->getNodeKind() == FunRetBlock;
652
652
  }
653
- static inline bool classof(const SVFBaseNode*node)
653
+ static inline bool classof(const SVFValue*node)
654
654
  {
655
655
  return node->getNodeKind() == FunRetBlock;
656
656
  }
@@ -112,7 +112,7 @@ public:
112
112
  }
113
113
 
114
114
 
115
- static inline bool classof(const SVFBaseNode* node)
115
+ static inline bool classof(const SVFValue* node)
116
116
  {
117
117
  return isVFGNodeKinds(node->getNodeKind());
118
118
  }
@@ -184,7 +184,7 @@ public:
184
184
  {
185
185
  return isStmtVFGNodeKinds(node->getNodeKind());
186
186
  }
187
- static inline bool classof(const SVFBaseNode*node)
187
+ static inline bool classof(const SVFValue*node)
188
188
  {
189
189
  return isStmtVFGNodeKinds(node->getNodeKind());
190
190
  }
@@ -228,7 +228,7 @@ public:
228
228
  {
229
229
  return node->getNodeKind() == Load;
230
230
  }
231
- static inline bool classof(const SVFBaseNode*node)
231
+ static inline bool classof(const SVFValue*node)
232
232
  {
233
233
  return node->getNodeKind() == Load;
234
234
  }
@@ -273,7 +273,7 @@ public:
273
273
  {
274
274
  return node->getNodeKind() == Store;
275
275
  }
276
- static inline bool classof(const SVFBaseNode*node)
276
+ static inline bool classof(const SVFValue*node)
277
277
  {
278
278
  return node->getNodeKind() == Store;
279
279
  }
@@ -318,7 +318,7 @@ public:
318
318
  {
319
319
  return node->getNodeKind() == Copy;
320
320
  }
321
- static inline bool classof(const SVFBaseNode*node)
321
+ static inline bool classof(const SVFValue*node)
322
322
  {
323
323
  return node->getNodeKind() == Copy;
324
324
  }
@@ -364,7 +364,7 @@ public:
364
364
  {
365
365
  return node->getNodeKind() == Cmp;
366
366
  }
367
- static inline bool classof(const SVFBaseNode*node)
367
+ static inline bool classof(const SVFValue*node)
368
368
  {
369
369
  return node->getNodeKind() == Cmp;
370
370
  }
@@ -441,7 +441,7 @@ public:
441
441
  {
442
442
  return node->getNodeKind() == BinaryOp;
443
443
  }
444
- static inline bool classof(const SVFBaseNode*node)
444
+ static inline bool classof(const SVFValue*node)
445
445
  {
446
446
  return node->getNodeKind() == BinaryOp;
447
447
  }
@@ -515,7 +515,7 @@ public:
515
515
  {
516
516
  return node->getNodeKind() == UnaryOp;
517
517
  }
518
- static inline bool classof(const SVFBaseNode*node)
518
+ static inline bool classof(const SVFValue*node)
519
519
  {
520
520
  return node->getNodeKind() == UnaryOp;
521
521
  }
@@ -587,7 +587,7 @@ public:
587
587
  {
588
588
  return node->getNodeKind() == Branch;
589
589
  }
590
- static inline bool classof(const SVFBaseNode*node)
590
+ static inline bool classof(const SVFValue*node)
591
591
  {
592
592
  return node->getNodeKind() == Branch;
593
593
  }
@@ -653,7 +653,7 @@ public:
653
653
  {
654
654
  return node->getNodeKind() == Gep;
655
655
  }
656
- static inline bool classof(const SVFBaseNode*node)
656
+ static inline bool classof(const SVFValue*node)
657
657
  {
658
658
  return node->getNodeKind() == Gep;
659
659
  }
@@ -730,7 +730,7 @@ public:
730
730
  {
731
731
  return isPHIVFGNodeKinds(node->getNodeKind());
732
732
  }
733
- static inline bool classof(const SVFBaseNode*node)
733
+ static inline bool classof(const SVFValue*node)
734
734
  {
735
735
  return isPHIVFGNodeKinds(node->getNodeKind());
736
736
  }
@@ -790,7 +790,7 @@ public:
790
790
  {
791
791
  return node->getNodeKind() == TIntraPhi;
792
792
  }
793
- static inline bool classof(const SVFBaseNode*node)
793
+ static inline bool classof(const SVFValue*node)
794
794
  {
795
795
  return node->getNodeKind() == TIntraPhi;
796
796
  }
@@ -831,7 +831,7 @@ public:
831
831
  {
832
832
  return node->getNodeKind() == Addr;
833
833
  }
834
- static inline bool classof(const SVFBaseNode*node)
834
+ static inline bool classof(const SVFValue*node)
835
835
  {
836
836
  return node->getNodeKind() == Addr;
837
837
  }
@@ -875,7 +875,7 @@ public:
875
875
  {
876
876
  return isArgumentVFGNodeKinds(node->getNodeKind());
877
877
  }
878
- static inline bool classof(const SVFBaseNode*node)
878
+ static inline bool classof(const SVFValue*node)
879
879
  {
880
880
  return isArgumentVFGNodeKinds(node->getNodeKind());
881
881
  }
@@ -929,7 +929,7 @@ public:
929
929
  {
930
930
  return node->getNodeKind() == AParm;
931
931
  }
932
- static inline bool classof(const SVFBaseNode*node)
932
+ static inline bool classof(const SVFValue*node)
933
933
  {
934
934
  return node->getNodeKind() == AParm;
935
935
  }
@@ -1003,7 +1003,7 @@ public:
1003
1003
  {
1004
1004
  return node->getNodeKind() == FParm;
1005
1005
  }
1006
- static inline bool classof(const SVFBaseNode*node)
1006
+ static inline bool classof(const SVFValue*node)
1007
1007
  {
1008
1008
  return node->getNodeKind() == FParm;
1009
1009
  }
@@ -1065,7 +1065,7 @@ public:
1065
1065
  {
1066
1066
  return node->getNodeKind() == ARet;
1067
1067
  }
1068
- static inline bool classof(const SVFBaseNode*node)
1068
+ static inline bool classof(const SVFValue*node)
1069
1069
  {
1070
1070
  return node->getNodeKind() == ARet;
1071
1071
  }
@@ -1135,7 +1135,7 @@ public:
1135
1135
  {
1136
1136
  return node->getNodeKind() == FRet;
1137
1137
  }
1138
- static inline bool classof(const SVFBaseNode*node)
1138
+ static inline bool classof(const SVFValue*node)
1139
1139
  {
1140
1140
  return node->getNodeKind() == FRet;
1141
1141
  }
@@ -1198,7 +1198,7 @@ public:
1198
1198
  {
1199
1199
  return node->getNodeKind() == TInterPhi;
1200
1200
  }
1201
- static inline bool classof(const SVFBaseNode*node)
1201
+ static inline bool classof(const SVFValue*node)
1202
1202
  {
1203
1203
  return node->getNodeKind() == TInterPhi;
1204
1204
  }
@@ -1250,7 +1250,7 @@ public:
1250
1250
  {
1251
1251
  return node->getNodeKind() == NPtr;
1252
1252
  }
1253
- static inline bool classof(const SVFBaseNode*node)
1253
+ static inline bool classof(const SVFValue*node)
1254
1254
  {
1255
1255
  return node->getNodeKind() == NPtr;
1256
1256
  }
@@ -134,7 +134,7 @@ public:
134
134
  {
135
135
  return node->getNodeKind() == TCTNodeKd;
136
136
  }
137
- static inline bool classof(const SVFBaseNode*node)
137
+ static inline bool classof(const SVFValue*node)
138
138
  {
139
139
  return node->getNodeKind() == TCTNodeKd;
140
140
  }
@@ -15,7 +15,7 @@
15
15
  #ifndef BREAKCONSTANTGEPS_H
16
16
  #define BREAKCONSTANTGEPS_H
17
17
 
18
- #include "SVF-LLVM/SVFValue.h"
18
+ #include "SVF-LLVM/SVFLLVMValue.h"
19
19
 
20
20
  namespace SVF
21
21
  {
@@ -30,7 +30,7 @@
30
30
  #ifndef CPPUtil_H_
31
31
  #define CPPUtil_H_
32
32
 
33
- #include "SVF-LLVM/SVFValue.h"
33
+ #include "SVF-LLVM/SVFLLVMValue.h"
34
34
  #include "SVF-LLVM/BasicTypes.h"
35
35
 
36
36
  namespace SVF
@@ -31,7 +31,7 @@
31
31
  #define INCLUDE_SVF_FE_LLVMMODULE_H_
32
32
 
33
33
  #include "SVF-LLVM/BasicTypes.h"
34
- #include "SVF-LLVM/SVFValue.h"
34
+ #include "SVF-LLVM/SVFLLVMValue.h"
35
35
  #include "SVF-LLVM/SVFModule.h"
36
36
  #include "Util/Options.h"
37
37
  #include "Graphs/BasicBlockG.h"
@@ -61,8 +61,8 @@ public:
61
61
  typedef Map<const Argument*, SVFArgument*> LLVMArgument2SVFArgumentMap;
62
62
  typedef Map<const Constant*, SVFConstant*> LLVMConst2SVFConstMap;
63
63
  typedef Map<const Value*, SVFOtherValue*> LLVMValue2SVFOtherValueMap;
64
- typedef Map<const SVFValue*, const Value*> SVFValue2LLVMValueMap;
65
- typedef Map<const SVFBaseNode*, const Value*> SVFBaseNode2LLVMValueMap;
64
+ typedef Map<const SVFLLVMValue*, const Value*> SVFValue2LLVMValueMap;
65
+ typedef Map<const SVFValue*, const Value*> SVFBaseNode2LLVMValueMap;
66
66
  typedef Map<const Type*, SVFType*> LLVMType2SVFTypeMap;
67
67
  typedef Map<const Type*, StInfo*> Type2TypeInfoMap;
68
68
  typedef Map<std::string, std::vector<std::string>> Fun2AnnoMap;
@@ -75,7 +75,7 @@ public:
75
75
 
76
76
  /// llvm value to sym id map
77
77
  /// local (%) and global (@) identifiers are pointer types which have a value node id.
78
- typedef OrderedMap<const SVFValue*, NodeID> ValueToIDMapTy;
78
+ typedef OrderedMap<const SVFLLVMValue*, NodeID> ValueToIDMapTy;
79
79
 
80
80
  typedef OrderedMap<const SVFFunction*, NodeID> FunToIDMapTy;
81
81
 
@@ -208,13 +208,13 @@ public:
208
208
 
209
209
  /// Get SVFIR Node according to LLVM value
210
210
  ///getNode - Return the node corresponding to the specified pointer.
211
- NodeID getValueNode(const SVFValue* V);
211
+ NodeID getValueNode(const SVFLLVMValue* V);
212
212
 
213
- bool hasValueNode(const SVFValue* V);
213
+ bool hasValueNode(const SVFLLVMValue* V);
214
214
 
215
215
  /// getObject - Return the obj node id refer to the memory object for the
216
216
  /// specified global, heap or alloca instruction according to llvm value.
217
- NodeID getObjectNode(const SVFValue* V);
217
+ NodeID getObjectNode(const SVFLLVMValue* V);
218
218
 
219
219
  void dumpSymTable();
220
220
 
@@ -285,16 +285,16 @@ public:
285
285
  setValueAttr(ov,svfov);
286
286
  }
287
287
 
288
- SVFValue* getSVFValue(const Value* value);
288
+ SVFLLVMValue* getSVFValue(const Value* value);
289
289
 
290
- const Value* getLLVMValue(const SVFValue* value) const
290
+ const Value* getLLVMValue(const SVFLLVMValue* value) const
291
291
  {
292
292
  SVFValue2LLVMValueMap::const_iterator it = SVFValue2LLVMValue.find(value);
293
293
  assert(it!=SVFValue2LLVMValue.end() && "can't find corresponding llvm value!");
294
294
  return it->second;
295
295
  }
296
296
 
297
- const Value* getLLVMValue(const SVFBaseNode* value) const
297
+ const Value* getLLVMValue(const SVFValue* value) const
298
298
  {
299
299
  SVFBaseNode2LLVMValueMap ::const_iterator it = SVFBaseNode2LLVMValue.find(value);
300
300
  assert(it != SVFBaseNode2LLVMValue.end() && "can't find corresponding llvm value!");
@@ -536,8 +536,8 @@ private:
536
536
  void initSVFFunction();
537
537
  void initSVFBasicBlock(const Function* func);
538
538
  void initDomTree(SVFFunction* func, const Function* f);
539
- void setValueAttr(const Value* val, SVFValue* value);
540
- void addToSVFVar2LLVMValueMap(const Value* val, SVFBaseNode* svfBaseNode);
539
+ void setValueAttr(const Value* val, SVFLLVMValue* value);
540
+ void addToSVFVar2LLVMValueMap(const Value* val, SVFValue* svfBaseNode);
541
541
  void buildFunToFunMap();
542
542
  void buildGlobalDefToRepMap();
543
543
  /// Invoke llvm passes to modify module