svf-tools 1.0.1043 → 1.0.1045

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 (71) hide show
  1. package/package.json +1 -1
  2. package/svf/include/DDA/DDAClient.h +6 -11
  3. package/svf/include/DDA/DDAPass.h +1 -1
  4. package/svf/include/Graphs/BasicBlockG.h +2 -2
  5. package/svf/include/Graphs/CDG.h +1 -1
  6. package/svf/include/Graphs/CFLGraph.h +1 -1
  7. package/svf/include/Graphs/CHG.h +3 -4
  8. package/svf/include/Graphs/CallGraph.h +1 -1
  9. package/svf/include/Graphs/ConsGNode.h +1 -1
  10. package/svf/include/Graphs/GenericGraph.h +4 -289
  11. package/svf/include/Graphs/ICFGNode.h +6 -6
  12. package/svf/include/Graphs/VFGNode.h +20 -20
  13. package/svf/include/MTA/MTA.h +2 -2
  14. package/svf/include/MTA/TCT.h +1 -7
  15. package/svf/include/MemoryModel/PointerAnalysis.h +1 -7
  16. package/svf/include/SABER/DoubleFreeChecker.h +1 -1
  17. package/svf/include/SABER/FileChecker.h +1 -1
  18. package/svf/include/SABER/LeakChecker.h +1 -1
  19. package/svf/include/SABER/SaberCondAllocator.h +1 -2
  20. package/svf/include/SABER/SrcSnkDDA.h +2 -2
  21. package/svf/include/SVFIR/ObjTypeInfo.h +0 -1
  22. package/svf/include/SVFIR/SVFIR.h +38 -11
  23. package/svf/include/SVFIR/SVFStatements.h +1 -0
  24. package/svf/include/SVFIR/SVFValue.h +202 -799
  25. package/svf/include/SVFIR/SVFVariables.h +28 -28
  26. package/svf/include/Util/CDGBuilder.h +1 -1
  27. package/svf/include/Util/GeneralType.h +1 -0
  28. package/svf/include/Util/SVFLoopAndDomInfo.h +169 -0
  29. package/svf/include/Util/SVFUtil.h +3 -1
  30. package/svf/include/Util/ThreadAPI.h +2 -1
  31. package/svf/include/WPA/FlowSensitive.h +1 -1
  32. package/svf/lib/DDA/DDAPass.cpp +7 -7
  33. package/svf/lib/Graphs/ConsG.cpp +1 -1
  34. package/svf/lib/Graphs/ICFG.cpp +0 -1
  35. package/svf/lib/Graphs/SVFG.cpp +1 -1
  36. package/svf/lib/Graphs/SVFGReadWrite.cpp +0 -1
  37. package/svf/lib/Graphs/ThreadCallGraph.cpp +0 -1
  38. package/svf/lib/Graphs/VFG.cpp +0 -1
  39. package/svf/lib/MSSA/MemRegion.cpp +0 -1
  40. package/svf/lib/MSSA/SVFGBuilder.cpp +0 -1
  41. package/svf/lib/MTA/MTA.cpp +4 -4
  42. package/svf/lib/MemoryModel/PointerAnalysis.cpp +5 -6
  43. package/svf/lib/MemoryModel/PointerAnalysisImpl.cpp +1 -1
  44. package/svf/lib/SABER/SaberCondAllocator.cpp +1 -1
  45. package/svf/lib/SABER/SrcSnkDDA.cpp +4 -4
  46. package/svf/lib/SVFIR/SVFIR.cpp +3 -3
  47. package/svf/lib/SVFIR/SVFValue.cpp +3 -59
  48. package/svf/lib/Util/CDGBuilder.cpp +2 -3
  49. package/svf/lib/Util/SVFStat.cpp +1 -1
  50. package/svf/lib/Util/ThreadAPI.cpp +2 -2
  51. package/svf/lib/WPA/FlowSensitive.cpp +0 -1
  52. package/svf/lib/WPA/WPAPass.cpp +0 -1
  53. package/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +1 -1
  54. package/svf-llvm/include/SVF-LLVM/CppUtil.h +1 -1
  55. package/svf-llvm/include/SVF-LLVM/DCHG.h +1 -1
  56. package/svf-llvm/include/SVF-LLVM/LLVMLoopAnalysis.h +1 -1
  57. package/svf-llvm/include/SVF-LLVM/LLVMModule.h +13 -13
  58. package/svf-llvm/include/SVF-LLVM/LLVMUtil.h +2 -2
  59. package/svf-llvm/include/SVF-LLVM/ObjTypeInference.h +1 -1
  60. package/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +6 -6
  61. package/svf-llvm/include/SVF-LLVM/SVFLLVMValue.h +805 -0
  62. package/{svf/include/SVFIR → svf-llvm/include/SVF-LLVM}/SVFModule.h +1 -36
  63. package/svf-llvm/lib/CHGBuilder.cpp +1 -1
  64. package/svf-llvm/lib/LLVMLoopAnalysis.cpp +2 -2
  65. package/svf-llvm/lib/LLVMModule.cpp +23 -19
  66. package/svf-llvm/lib/LLVMUtil.cpp +4 -4
  67. package/svf-llvm/lib/SVFIRBuilder.cpp +19 -22
  68. package/svf-llvm/lib/SVFIRExtAPI.cpp +2 -2
  69. package/svf-llvm/lib/SVFLLVMValue.cpp +71 -0
  70. package/{svf/lib/SVFIR → svf-llvm/lib}/SVFModule.cpp +2 -3
  71. package/svf-llvm/lib/SymbolTableBuilder.cpp +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.1043",
3
+ "version": "1.0.1045",
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": {
@@ -48,11 +48,11 @@ namespace SVF
48
48
  class DDAClient
49
49
  {
50
50
  public:
51
- DDAClient(SVFModule* mod) : pag(nullptr), module(mod), curPtr(0), solveAll(true) {}
51
+ DDAClient() : pag(nullptr), curPtr(0), solveAll(true) {}
52
52
 
53
53
  virtual ~DDAClient() {}
54
54
 
55
- virtual inline void initialise(SVFModule*) {}
55
+ virtual inline void initialise() {}
56
56
 
57
57
  /// Collect candidate pointers for query.
58
58
  virtual inline OrderedNodeSet& collectCandidateQueries(SVFIR* p)
@@ -91,16 +91,12 @@ public:
91
91
  userInput.insert(ptr);
92
92
  solveAll = false;
93
93
  }
94
- /// Get LLVM module
95
- inline SVFModule* getModule() const
96
- {
97
- return module;
98
- }
94
+
99
95
  virtual void answerQueries(PointerAnalysis* pta);
100
96
 
101
97
  virtual inline void performStat(PointerAnalysis*) {}
102
98
 
103
- virtual inline void collectWPANum(SVFModule*) {}
99
+ virtual inline void collectWPANum() {}
104
100
  protected:
105
101
  void addCandidate(NodeID id)
106
102
  {
@@ -109,7 +105,6 @@ protected:
109
105
  }
110
106
 
111
107
  SVFIR* pag; ///< SVFIR graph used by current DDA analysis
112
- SVFModule* module; ///< LLVM module
113
108
  NodeID curPtr; ///< current pointer being queried
114
109
  OrderedNodeSet candidateQueries; ///< store all candidate pointers to be queried
115
110
 
@@ -128,7 +123,7 @@ private:
128
123
  typedef OrderedMap<NodeID,const CallICFGNode*> VTablePtrToCallSiteMap;
129
124
  VTablePtrToCallSiteMap vtableToCallSiteMap;
130
125
  public:
131
- FunptrDDAClient(SVFModule* module) : DDAClient(module) {}
126
+ FunptrDDAClient() : DDAClient() {}
132
127
  ~FunptrDDAClient() {}
133
128
 
134
129
  /// Only collect function pointers as query candidates.
@@ -147,7 +142,7 @@ class AliasDDAClient : public DDAClient
147
142
  public:
148
143
  typedef OrderedSet<const PAGNode*> PAGNodeSet;
149
144
 
150
- AliasDDAClient(SVFModule* module) : DDAClient(module) {}
145
+ AliasDDAClient() : DDAClient() {}
151
146
  ~AliasDDAClient() {}
152
147
 
153
148
  /// Only collect function pointers as query candidates.
@@ -69,7 +69,7 @@ public:
69
69
  virtual void runOnModule(SVFIR* module);
70
70
 
71
71
  /// Select a client
72
- virtual void selectClient(SVFModule* module);
72
+ virtual void selectClient();
73
73
 
74
74
  /// Pass name
75
75
  virtual inline std::string getPassName() const
@@ -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
  }
@@ -33,7 +33,7 @@
33
33
  #ifndef CHA_H_
34
34
  #define CHA_H_
35
35
 
36
- #include "SVFIR/SVFModule.h"
36
+ #include "Util/ThreadAPI.h"
37
37
  #include "Graphs/GenericGraph.h"
38
38
  #include "Util/WorkList.h"
39
39
 
@@ -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
  }
@@ -252,7 +252,7 @@ public:
252
252
  DESTRUCTOR = 0x2 // connect node based on destructor
253
253
  } RELATIONTYPE;
254
254
 
255
- CHGraph(SVFModule* svfModule): svfMod(svfModule), classNum(0), vfID(0), buildingCHGTime(0)
255
+ CHGraph(): classNum(0), vfID(0), buildingCHGTime(0)
256
256
  {
257
257
  this->kind = Standard;
258
258
  }
@@ -318,7 +318,6 @@ public:
318
318
 
319
319
 
320
320
  private:
321
- SVFModule* svfMod;
322
321
  u32_t classNum;
323
322
  u32_t vfID;
324
323
  double buildingCHGTime;
@@ -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
  }
@@ -33,6 +33,7 @@
33
33
  #include "SVFIR/SVFType.h"
34
34
  #include "Util/iterator.h"
35
35
  #include "Graphs/GraphTraits.h"
36
+ #include "SVFIR/SVFValue.h"
36
37
 
37
38
  namespace SVF
38
39
  {
@@ -134,298 +135,12 @@ protected:
134
135
  };
135
136
 
136
137
 
137
- class SVFBaseNode
138
- {
139
-
140
- public:
141
-
142
- enum GNodeK
143
- {
144
- // ┌─────────────────────────────────────────────────────────────────────────┐
145
- // │ ICFGNode: Classes of inter-procedural and intra-procedural control flow │
146
- // │ graph nodes (Parent class: ICFGNode) │
147
- // └─────────────────────────────────────────────────────────────────────────┘
148
- IntraBlock, // ├── Represents a node within a single procedure
149
- GlobalBlock, // ├── Represents a global-level block
150
- // │ └─ Subclass: InterICFGNode
151
- FunEntryBlock, // │ ├── Entry point of a function
152
- FunExitBlock, // │ ├── Exit point of a function
153
- FunCallBlock, // │ ├── Call site in the function
154
- FunRetBlock, // │ └── Return site in the function
155
-
156
- // ┌─────────────────────────────────────────────────────────────────────────┐
157
- // │ SVFVar: Classes of variable nodes (Parent class: SVFVar) │
158
- // │ Includes two main subclasses: ValVar and ObjVar │
159
- // └─────────────────────────────────────────────────────────────────────────┘
160
- // └─ Subclass: ValVar (Top-level variable nodes)
161
- ValNode, // ├── Represents a standard value variable
162
- ArgValNode, // ├── Represents an argument value variable
163
- FunValNode, // ├── Represents a function value variable
164
- GepValNode, // ├── Represents a GEP value variable
165
- RetValNode, // ├── Represents a return value node
166
- VarargValNode, // ├── Represents a variadic argument node
167
- GlobalValNode, // ├── Represents a global variable node
168
- ConstAggValNode, // ├── Represents a constant aggregate value node
169
- // │ └─ Subclass: ConstDataValVar
170
- ConstDataValNode, // │ ├── Represents a constant data variable
171
- BlackHoleValNode, // │ ├── Represents a black hole node
172
- ConstFPValNode, // │ ├── Represents a constant floating-point value node
173
- ConstIntValNode, // │ ├── Represents a constant integer value node
174
- ConstNullptrValNode, // │ └── Represents a constant nullptr value node
175
- // │ └─ Subclass: DummyValVar
176
- DummyValNode, // │ └── Dummy node for uninitialized values
177
-
178
- // └─ Subclass: ObjVar (Object variable nodes)
179
- ObjNode, // ├── Represents an object variable
180
- // │ └─ Subclass: GepObjVar
181
- GepObjNode, // │ ├── Represents a GEP object variable
182
- // │ └─ Subclass: BaseObjVar
183
- BaseObjNode, // │ ├── Represents a base object node
184
- FunObjNode, // │ ├── Represents a function object
185
- HeapObjNode, // │ ├── Represents a heap object
186
- StackObjNode, // │ ├── Represents a stack object
187
- GlobalObjNode, // │ ├── Represents a global object
188
- ConstAggObjNode, // │ ├── Represents a constant aggregate object
189
- // │ └─ Subclass: ConstDataObjVar
190
- ConstDataObjNode, // │ ├── Represents a constant data object
191
- ConstFPObjNode, // │ ├── Represents a constant floating-point object
192
- ConstIntObjNode, // │ ├── Represents a constant integer object
193
- ConstNullptrObjNode, // │ └── Represents a constant nullptr object
194
- // │ └─ Subclass: DummyObjVar
195
- DummyObjNode, // │ └── Dummy node for uninitialized objects
196
-
197
- // ┌─────────────────────────────────────────────────────────────────────────┐
198
- // │ VFGNode: Classes of Value Flow Graph (VFG) node kinds (Parent class: │
199
- // │ VFGNode) │
200
- // │ Includes operation nodes and specialized subclasses │
201
- // └─────────────────────────────────────────────────────────────────────────┘
202
- Cmp, // ├── Represents a comparison operation
203
- BinaryOp, // ├── Represents a binary operation
204
- UnaryOp, // ├── Represents a unary operation
205
- Branch, // ├── Represents a branch operation
206
- DummyVProp, // ├── Dummy node for value propagation
207
- NPtr, // ├── Represents a null pointer operation
208
- // │ └─ Subclass: ArgumentVFGNode
209
- FRet, // │ ├── Represents a function return value
210
- ARet, // │ ├── Represents an argument return value
211
- AParm, // │ ├── Represents an argument parameter
212
- FParm, // │ └── Represents a function parameter
213
- // │ └─ Subclass: StmtVFGNode
214
- Addr, // │ ├── Represents an address operation
215
- Copy, // │ ├── Represents a copy operation
216
- Gep, // │ ├── Represents a GEP operation
217
- Store, // │ ├── Represents a store operation
218
- Load, // │ └── Represents a load operation
219
- // │ └─ Subclass: PHIVFGNode
220
- TPhi, // │ ├── Represents a type-based PHI node
221
- TIntraPhi, // │ ├── Represents an intra-procedural PHI node
222
- TInterPhi, // │ └── Represents an inter-procedural PHI node
223
- // │ └─ Subclass: MRSVFGNode
224
- FPIN, // │ ├── Function parameter input
225
- FPOUT, // │ ├── Function parameter output
226
- APIN, // │ ├── Argument parameter input
227
- APOUT, // │ └── Argument parameter output
228
- // │ └─ Subclass: MSSAPHISVFGNode
229
- MPhi, // │ ├── Memory PHI node
230
- MIntraPhi, // │ ├── Intra-procedural memory PHI node
231
- MInterPhi, // │ └── Inter-procedural memory PHI node
232
-
233
- // ┌─────────────────────────────────────────────────────────────────────────┐
234
- // │ Additional specific graph node types │
235
- // └─────────────────────────────────────────────────────────────────────────┘
236
- CallNodeKd, // Callgraph node
237
- CDNodeKd, // Control dependence graph node
238
- CFLNodeKd, // CFL graph node
239
- CHNodeKd, // Class hierarchy graph node
240
- ConstraintNodeKd, // Constraint graph node
241
- TCTNodeKd, // Thread creation tree node
242
- DCHNodeKd, // DCHG node
243
- BasicBlockKd, // Basic block node
244
- OtherKd // Other node kind
245
- };
246
-
247
-
248
- SVFBaseNode(NodeID i, GNodeK k, const SVFType* ty = nullptr): id(i),nodeKind(k), type(ty)
249
- {
250
-
251
- }
252
-
253
- /// Get ID
254
- inline NodeID getId() const
255
- {
256
- return id;
257
- }
258
-
259
- /// Get node kind
260
- inline GNodeK getNodeKind() const
261
- {
262
- return nodeKind;
263
- }
264
-
265
- virtual const SVFType* getType() const
266
- {
267
- return type;
268
- }
269
-
270
- inline virtual void setName(const std::string& nameInfo)
271
- {
272
- name = nameInfo;
273
- }
274
-
275
- inline virtual void setName(std::string&& nameInfo)
276
- {
277
- name = std::move(nameInfo);
278
- }
279
-
280
- virtual const std::string& getName() const
281
- {
282
- return name;
283
- }
284
-
285
- inline virtual void setSourceLoc(const std::string& sourceCodeInfo)
286
- {
287
- sourceLoc = sourceCodeInfo;
288
- }
289
-
290
- virtual const std::string getSourceLoc() const
291
- {
292
- return sourceLoc;
293
- }
294
-
295
- const std::string valueOnlyToString() const;
296
-
297
-
298
- protected:
299
- NodeID id; ///< Node ID
300
- GNodeK nodeKind; ///< Node kind
301
- const SVFType* type; ///< SVF type
302
-
303
- std::string name;
304
- std::string sourceLoc; ///< Source code information of this value
305
-
306
- /// Helper functions to check node kinds
307
- //{@ Check node kind
308
- static inline bool isICFGNodeKinds(GNodeK n)
309
- {
310
- static_assert(FunRetBlock - IntraBlock == 5,
311
- "the number of ICFGNodeKinds has changed, make sure "
312
- "the range is correct");
313
- return n <= FunRetBlock && n >= IntraBlock;
314
- }
315
-
316
- static inline bool isInterICFGNodeKind(GNodeK n)
317
- {
318
- static_assert(FunRetBlock - FunEntryBlock == 3,
319
- "the number of InterICFGNodeKind has changed, make sure "
320
- "the range is correct");
321
- return n <= FunRetBlock && n >= FunEntryBlock;
322
- }
323
-
324
- static inline bool isSVFVarKind(GNodeK n)
325
- {
326
- static_assert(DummyObjNode - ValNode == 26,
327
- "The number of SVFVarKinds has changed, make sure the "
328
- "range is correct");
329
-
330
- return n <= DummyObjNode && n >= ValNode;
331
- }
332
-
333
- static inline bool isValVarKinds(GNodeK n)
334
- {
335
- static_assert(DummyValNode - ValNode == 13,
336
- "The number of ValVarKinds has changed, make sure the "
337
- "range is correct");
338
- return n <= DummyValNode && n >= ValNode;
339
- }
340
-
341
-
342
- static inline bool isConstantDataValVar(GNodeK n)
343
- {
344
- static_assert(ConstNullptrValNode - ConstDataValNode == 4,
345
- "The number of ConstantDataValVarKinds has changed, make "
346
- "sure the range is correct");
347
- return n <= ConstNullptrValNode && n >= ConstDataValNode;
348
- }
349
-
350
- static inline bool isObjVarKinds(GNodeK n)
351
- {
352
- static_assert(DummyObjNode - ObjNode == 12,
353
- "The number of ObjVarKinds has changed, make sure the "
354
- "range is correct");
355
- return n <= DummyObjNode && n >= ObjNode;
356
- }
357
-
358
- static inline bool isBaseObjVarKinds(GNodeK n)
359
- {
360
- static_assert(DummyObjNode - BaseObjNode == 10,
361
- "The number of BaseObjVarKinds has changed, make sure the "
362
- "range is correct");
363
- return n <= DummyObjNode && n >= BaseObjNode;
364
- }
365
-
366
- static inline bool isConstantDataObjVarKinds(GNodeK n)
367
- {
368
- static_assert(ConstNullptrObjNode - ConstDataObjNode == 3,
369
- "The number of ConstantDataObjVarKinds has changed, make "
370
- "sure the range is correct");
371
- return n <= ConstNullptrObjNode && n >= ConstDataObjNode;
372
- }
373
-
374
- static inline bool isVFGNodeKinds(GNodeK n)
375
- {
376
- static_assert(MInterPhi - Cmp == 24,
377
- "The number of VFGNodeKinds has changed, make sure the "
378
- "range is correct");
379
- return n <= MInterPhi && n >= Cmp;
380
- }
381
-
382
- static inline bool isArgumentVFGNodeKinds(GNodeK n)
383
- {
384
- static_assert(FParm - FRet == 3,
385
- "The number of ArgumentVFGNodeKinds has changed, make "
386
- "sure the range is correct");
387
- return n <= FParm && n >= FRet;
388
- }
389
-
390
- static inline bool isStmtVFGNodeKinds(GNodeK n)
391
- {
392
- static_assert(Load - Addr == 4,
393
- "The number of StmtVFGNodeKinds has changed, make sure "
394
- "the range is correct");
395
- return n <= Load && n >= Addr;
396
- }
397
-
398
- static inline bool isPHIVFGNodeKinds(GNodeK n)
399
- {
400
- static_assert(TInterPhi - TPhi == 2,
401
- "The number of PHIVFGNodeKinds has changed, make sure "
402
- "the range is correct");
403
- return n <= TInterPhi && n >= TPhi;
404
- }
405
-
406
- static inline bool isMRSVFGNodeKinds(GNodeK n)
407
- {
408
- static_assert(MInterPhi - FPIN == 6,
409
- "The number of MRSVFGNodeKinds has changed, make sure "
410
- "the range is correct");
411
- return n <= MInterPhi && n >= FPIN;
412
- }
413
-
414
- static inline bool isMSSAPHISVFGNodeKinds(GNodeK n)
415
- {
416
- static_assert(MInterPhi - MPhi == 2,
417
- "The number of MSSAPHISVFGNodeKinds has changed, make "
418
- "sure the range is correct");
419
- return n <= MInterPhi && n >= MPhi;
420
- }
421
- //@}
422
- };
423
138
 
424
139
  /*!
425
140
  * Generic node on the graph as base class
426
141
  */
427
142
  template<class NodeTy,class EdgeTy>
428
- class GenericNode: public SVFBaseNode
143
+ class GenericNode: public SVFValue
429
144
  {
430
145
  friend class SVFIRWriter;
431
146
  friend class SVFIRReader;
@@ -448,7 +163,7 @@ private:
448
163
 
449
164
  public:
450
165
  /// Constructor
451
- 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)
452
167
  {
453
168
 
454
169
  }
@@ -612,7 +327,7 @@ public:
612
327
  return true;
613
328
  }
614
329
 
615
- static inline bool classof(const SVFBaseNode*)
330
+ static inline bool classof(const SVFValue*)
616
331
  {
617
332
  return true;
618
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
  }