svf-lib 1.0.1278 → 1.0.1280

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 (49) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/DDA/DDAVFSolver.h +1 -2
  3. package/SVF-linux/include/Graphs/ICFG.h +16 -16
  4. package/SVF-linux/include/Graphs/ICFGEdge.h +6 -6
  5. package/SVF-linux/include/Graphs/ICFGNode.h +16 -16
  6. package/SVF-linux/include/Graphs/IRGraph.h +6 -6
  7. package/SVF-linux/include/Graphs/ThreadCallGraph.h +2 -2
  8. package/SVF-linux/include/Graphs/VFGNode.h +1 -1
  9. package/SVF-linux/include/MSSA/MSSAMuChi.h +11 -11
  10. package/SVF-linux/include/MSSA/MemRegion.h +2 -2
  11. package/SVF-linux/include/MSSA/MemSSA.h +13 -13
  12. package/SVF-linux/include/MTA/FSMPTA.h +1 -1
  13. package/SVF-linux/include/MTA/LockAnalysis.h +33 -33
  14. package/SVF-linux/include/MTA/LockResultValidator.h +7 -6
  15. package/SVF-linux/include/MTA/MHP.h +46 -46
  16. package/SVF-linux/include/MTA/MTA.h +4 -4
  17. package/SVF-linux/include/MTA/MTAAnnotator.h +6 -4
  18. package/SVF-linux/include/MTA/MTAResultValidator.h +51 -44
  19. package/SVF-linux/include/MTA/PCG.h +22 -27
  20. package/SVF-linux/include/MTA/TCT.h +28 -37
  21. package/SVF-linux/include/MemoryModel/SVFStatements.h +11 -6
  22. package/SVF-linux/include/MemoryModel/SVFVariables.h +4 -4
  23. package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +13 -19
  24. package/SVF-linux/include/SABER/ProgSlice.h +5 -5
  25. package/SVF-linux/include/SABER/SaberCheckerAPI.h +4 -4
  26. package/SVF-linux/include/SABER/SaberCondAllocator.h +32 -35
  27. package/SVF-linux/include/SVF-FE/BasicTypes.h +10 -0
  28. package/SVF-linux/include/SVF-FE/CPPUtil.h +9 -8
  29. package/SVF-linux/include/SVF-FE/DCHG.h +4 -4
  30. package/SVF-linux/include/SVF-FE/DataFlowUtil.h +1 -1
  31. package/SVF-linux/include/SVF-FE/GEPTypeBridgeIterator.h +1 -1
  32. package/SVF-linux/include/SVF-FE/ICFGBuilder.h +9 -9
  33. package/SVF-linux/include/SVF-FE/IRAnnotator.h +9 -9
  34. package/SVF-linux/include/SVF-FE/LLVMModule.h +119 -22
  35. package/SVF-linux/include/SVF-FE/LLVMUtil.h +31 -52
  36. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +14 -20
  37. package/SVF-linux/include/SVF-FE/SymbolTableBuilder.h +8 -8
  38. package/SVF-linux/include/Util/Annotator.h +22 -22
  39. package/SVF-linux/include/Util/BasicTypes.h +476 -72
  40. package/SVF-linux/include/Util/Casting.h +1 -1
  41. package/SVF-linux/include/Util/CxtStmt.h +13 -12
  42. package/SVF-linux/include/Util/SVFBasicTypes.h +0 -78
  43. package/SVF-linux/include/Util/SVFInstruction.h +40 -0
  44. package/SVF-linux/include/Util/SVFModule.h +58 -124
  45. package/SVF-linux/include/Util/SVFUtil.h +48 -39
  46. package/SVF-linux/include/Util/ThreadAPI.h +17 -28
  47. package/SVF-linux/include/WPA/WPAPass.h +4 -4
  48. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  49. package/package.json +1 -1
@@ -470,9 +470,8 @@ protected:
470
470
  assert(obj && "object not found!!");
471
471
  if(obj->isStack())
472
472
  {
473
- if(const Function* fun = _pag->getGNode(id)->getFunction())
473
+ if(const SVFFunction* svffun = _pag->getGNode(id)->getFunction())
474
474
  {
475
- const SVFFunction* svffun = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(fun);
476
475
  return _callGraphSCC->isInCycle(_callGraph->getCallGraphNode(svffun)->getId());
477
476
  }
478
477
  }
@@ -58,9 +58,9 @@ public:
58
58
 
59
59
  typedef Map<const SVFFunction*, FunEntryICFGNode *> FunToFunEntryNodeMapTy;
60
60
  typedef Map<const SVFFunction*, FunExitICFGNode *> FunToFunExitNodeMapTy;
61
- typedef Map<const Instruction*, CallICFGNode *> CSToCallNodeMapTy;
62
- typedef Map<const Instruction*, RetICFGNode *> CSToRetNodeMapTy;
63
- typedef Map<const Instruction*, IntraICFGNode *> InstToBlockNodeMapTy;
61
+ typedef Map<const SVFInstruction*, CallICFGNode *> CSToCallNodeMapTy;
62
+ typedef Map<const SVFInstruction*, RetICFGNode *> CSToRetNodeMapTy;
63
+ typedef Map<const SVFInstruction*, IntraICFGNode *> InstToBlockNodeMapTy;
64
64
  typedef std::vector<const SVFLoop *> SVFLoopVec;
65
65
  typedef Map<const ICFGNode *, SVFLoopVec> ICFGNodeToSVFLoopVec;
66
66
 
@@ -122,7 +122,7 @@ public:
122
122
  }
123
123
 
124
124
  /// Whether node is in a loop
125
- inline bool isInLoop(const Instruction *inst)
125
+ inline bool isInLoop(const SVFInstruction* inst)
126
126
  {
127
127
  return isInLoop(getICFGNode(inst));
128
128
  }
@@ -159,8 +159,8 @@ protected:
159
159
  //@{
160
160
  ICFGEdge* addIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode);
161
161
  ICFGEdge* addConditionalIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Value* condition, s32_t branchCondVal);
162
- ICFGEdge* addCallEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Instruction* cs);
163
- ICFGEdge* addRetEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Instruction* cs);
162
+ ICFGEdge* addCallEdge(ICFGNode* srcNode, ICFGNode* dstNode, const SVFInstruction* cs);
163
+ ICFGEdge* addRetEdge(ICFGNode* srcNode, ICFGNode* dstNode, const SVFInstruction* cs);
164
164
  //@}
165
165
 
166
166
  /// sanitize Intra edges, verify that both nodes belong to the same function.
@@ -194,13 +194,13 @@ public:
194
194
  /// Get a basic block ICFGNode
195
195
  /// TODO:: need to fix the assertions
196
196
  //@{
197
- ICFGNode* getICFGNode(const Instruction* inst);
197
+ ICFGNode* getICFGNode(const SVFInstruction* inst);
198
198
 
199
- CallICFGNode* getCallICFGNode(const Instruction* inst);
199
+ CallICFGNode* getCallICFGNode(const SVFInstruction* inst);
200
200
 
201
- RetICFGNode* getRetICFGNode(const Instruction* inst);
201
+ RetICFGNode* getRetICFGNode(const SVFInstruction* inst);
202
202
 
203
- IntraICFGNode* getIntraICFGNode(const Instruction* inst);
203
+ IntraICFGNode* getIntraICFGNode(const SVFInstruction* inst);
204
204
 
205
205
  FunEntryICFGNode* getFunEntryICFGNode(const SVFFunction* fun);
206
206
 
@@ -220,14 +220,14 @@ public:
220
220
  private:
221
221
 
222
222
  /// Get/Add IntraBlock ICFGNode
223
- inline IntraICFGNode* getIntraBlock(const Instruction* inst)
223
+ inline IntraICFGNode* getIntraBlock(const SVFInstruction* inst)
224
224
  {
225
225
  InstToBlockNodeMapTy::const_iterator it = InstToBlockNodeMap.find(inst);
226
226
  if (it == InstToBlockNodeMap.end())
227
227
  return nullptr;
228
228
  return it->second;
229
229
  }
230
- inline IntraICFGNode* addIntraBlock(const Instruction* inst)
230
+ inline IntraICFGNode* addIntraBlock(const SVFInstruction* inst)
231
231
  {
232
232
  IntraICFGNode* sNode = new IntraICFGNode(totalICFGNode++,inst);
233
233
  addICFGNode(sNode);
@@ -268,14 +268,14 @@ private:
268
268
  }
269
269
 
270
270
  /// Get/Add a call node
271
- inline CallICFGNode* addCallBlock(const Instruction* cs)
271
+ inline CallICFGNode* addCallBlock(const SVFInstruction* cs)
272
272
  {
273
273
  CallICFGNode* sNode = new CallICFGNode(totalICFGNode++, cs);
274
274
  addICFGNode(sNode);
275
275
  CSToCallNodeMap[cs] = sNode;
276
276
  return sNode;
277
277
  }
278
- inline CallICFGNode* getCallBlock(const Instruction* cs)
278
+ inline CallICFGNode* getCallBlock(const SVFInstruction* cs)
279
279
  {
280
280
  CSToCallNodeMapTy::const_iterator it = CSToCallNodeMap.find(cs);
281
281
  if (it == CSToCallNodeMap.end())
@@ -284,14 +284,14 @@ private:
284
284
  }
285
285
 
286
286
  /// Get/Add a return node
287
- inline RetICFGNode* getRetBlock(const Instruction* cs)
287
+ inline RetICFGNode* getRetBlock(const SVFInstruction* cs)
288
288
  {
289
289
  CSToRetNodeMapTy::const_iterator it = CSToRetNodeMap.find(cs);
290
290
  if (it == CSToRetNodeMap.end())
291
291
  return nullptr;
292
292
  return it->second;
293
293
  }
294
- inline RetICFGNode* addRetBlock(const Instruction* cs)
294
+ inline RetICFGNode* addRetBlock(const SVFInstruction* cs)
295
295
  {
296
296
  CallICFGNode* callBlockNode = getCallICFGNode(cs);
297
297
  RetICFGNode* sNode = new RetICFGNode(totalICFGNode++, cs, callBlockNode);
@@ -169,16 +169,16 @@ class CallCFGEdge : public ICFGEdge
169
169
  {
170
170
 
171
171
  private:
172
- const Instruction* cs;
172
+ const SVFInstruction* cs;
173
173
  std::vector<const CallPE*> callPEs;
174
174
  public:
175
175
  /// Constructor
176
- CallCFGEdge(ICFGNode* s, ICFGNode* d, const Instruction* c):
176
+ CallCFGEdge(ICFGNode* s, ICFGNode* d, const SVFInstruction* c):
177
177
  ICFGEdge(s,d,CallCF),cs(c)
178
178
  {
179
179
  }
180
180
  /// Return callsite ID
181
- inline const Instruction* getCallSite() const
181
+ inline const SVFInstruction* getCallSite() const
182
182
  {
183
183
  return cs;
184
184
  }
@@ -217,16 +217,16 @@ class RetCFGEdge : public ICFGEdge
217
217
  {
218
218
 
219
219
  private:
220
- const Instruction* cs;
220
+ const SVFInstruction* cs;
221
221
  const RetPE* retPE;
222
222
  public:
223
223
  /// Constructor
224
- RetCFGEdge(ICFGNode* s, ICFGNode* d, const Instruction* c):
224
+ RetCFGEdge(ICFGNode* s, ICFGNode* d, const SVFInstruction* c):
225
225
  ICFGEdge(s,d,RetCF),cs(c),retPE(nullptr)
226
226
  {
227
227
  }
228
228
  /// Return callsite ID
229
- inline const Instruction* getCallSite() const
229
+ inline const SVFInstruction* getCallSite() const
230
230
  {
231
231
  return cs;
232
232
  }
@@ -83,7 +83,7 @@ public:
83
83
  }
84
84
 
85
85
  /// Return the function of this ICFGNode
86
- virtual const BasicBlock* getBB() const
86
+ virtual const SVFBasicBlock* getBB() const
87
87
  {
88
88
  return bb;
89
89
  }
@@ -130,7 +130,7 @@ public:
130
130
 
131
131
  protected:
132
132
  const SVFFunction* fun;
133
- const BasicBlock* bb;
133
+ const SVFBasicBlock* bb;
134
134
  VFGNodeList VFGNodes; //< a list of VFGNodes
135
135
  SVFStmtList pagEdges; //< a list of PAGEdges
136
136
 
@@ -175,16 +175,16 @@ public:
175
175
  class IntraICFGNode : public ICFGNode
176
176
  {
177
177
  private:
178
- const Instruction *inst;
178
+ const SVFInstruction *inst;
179
179
 
180
180
  public:
181
- IntraICFGNode(NodeID id, const Instruction *i) : ICFGNode(id, IntraBlock), inst(i)
181
+ IntraICFGNode(NodeID id, const SVFInstruction *i) : ICFGNode(id, IntraBlock), inst(i)
182
182
  {
183
- fun = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(inst->getFunction());
183
+ fun = inst->getFunction();
184
184
  bb = inst->getParent();
185
185
  }
186
186
 
187
- inline const Instruction *getInst() const
187
+ inline const SVFInstruction *getInst() const
188
188
  {
189
189
  return inst;
190
190
  }
@@ -366,18 +366,18 @@ class CallICFGNode : public InterICFGNode
366
366
  public:
367
367
  typedef std::vector<const SVFVar *> ActualParmNodeVec;
368
368
  private:
369
- const Instruction* cs;
369
+ const SVFInstruction* cs;
370
370
  const RetICFGNode* ret;
371
371
  ActualParmNodeVec APNodes;
372
372
  public:
373
- CallICFGNode(NodeID id, const Instruction* c) : InterICFGNode(id, FunCallBlock), cs(c), ret(nullptr)
373
+ CallICFGNode(NodeID id, const SVFInstruction* c) : InterICFGNode(id, FunCallBlock), cs(c), ret(nullptr)
374
374
  {
375
- fun = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(cs->getFunction());
375
+ fun = cs->getFunction();
376
376
  bb = cs->getParent();
377
377
  }
378
378
 
379
379
  /// Return callsite
380
- inline const Instruction* getCallSite() const
380
+ inline const SVFInstruction* getCallSite() const
381
381
  {
382
382
  return cs;
383
383
  }
@@ -398,11 +398,11 @@ public:
398
398
  /// Return callsite
399
399
  inline const SVFFunction* getCaller() const
400
400
  {
401
- return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(cs->getFunction());
401
+ return cs->getFunction();
402
402
  }
403
403
 
404
404
  /// Return Basic Block
405
- inline const BasicBlock* getParent() const
405
+ inline const SVFBasicBlock* getParent() const
406
406
  {
407
407
  return cs->getParent();
408
408
  }
@@ -459,19 +459,19 @@ class RetICFGNode : public InterICFGNode
459
459
  {
460
460
 
461
461
  private:
462
- const Instruction* cs;
462
+ const SVFInstruction* cs;
463
463
  const SVFVar *actualRet;
464
464
  const CallICFGNode* callBlockNode;
465
465
  public:
466
- RetICFGNode(NodeID id, const Instruction* c, CallICFGNode* cb) :
466
+ RetICFGNode(NodeID id, const SVFInstruction* c, CallICFGNode* cb) :
467
467
  InterICFGNode(id, FunRetBlock), cs(c), actualRet(nullptr), callBlockNode(cb)
468
468
  {
469
- fun = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(cs->getFunction());
469
+ fun = cs->getFunction();
470
470
  bb = cs->getParent();
471
471
  }
472
472
 
473
473
  /// Return callsite
474
- inline const Instruction* getCallSite() const
474
+ inline const SVFInstruction* getCallSite() const
475
475
  {
476
476
  return cs;
477
477
  }
@@ -78,7 +78,7 @@ protected:
78
78
  SVFStmt* hasLabeledEdge(SVFVar* src, SVFVar* op1, SVFStmt::PEDGEK kind, const SVFVar* op2);
79
79
 
80
80
  /// Map a value to a set of edges
81
- inline void mapValueToEdge(const Value *V, SVFStmt *edge)
81
+ inline void mapValueToEdge(const Value* V, SVFStmt *edge)
82
82
  {
83
83
  auto inserted = valueToEdgeMap.emplace(V, SVFStmtSet{edge});
84
84
  if (!inserted.second)
@@ -108,7 +108,7 @@ public:
108
108
  return fromFile;
109
109
  }
110
110
  /// Get all SVFIR Edges that corresponds to an LLVM value
111
- inline const SVFStmtSet& getValueEdges(const Value *V)
111
+ inline const SVFStmtSet& getValueEdges(const Value* V)
112
112
  {
113
113
  auto it = valueToEdgeMap.find(V);
114
114
  if (it == valueToEdgeMap.end())
@@ -121,7 +121,7 @@ public:
121
121
 
122
122
  /// Get SVFIR Node according to LLVM value
123
123
  ///getNode - Return the node corresponding to the specified pointer.
124
- inline NodeID getValueNode(const Value *V)
124
+ inline NodeID getValueNode(const Value* V)
125
125
  {
126
126
  return symInfo->getValSym(V);
127
127
  }
@@ -131,19 +131,19 @@ public:
131
131
  }
132
132
  /// getObject - Return the obj node id refer to the memory object for the
133
133
  /// specified global, heap or alloca instruction according to llvm value.
134
- inline NodeID getObjectNode(const Value *V)
134
+ inline NodeID getObjectNode(const Value* V)
135
135
  {
136
136
  return symInfo->getObjSym(V);
137
137
  }
138
138
  /// GetReturnNode - Return the unique node representing the return value of a function
139
139
  inline NodeID getReturnNode(const SVFFunction* func) const
140
140
  {
141
- return symInfo->getRetSym(func->getLLVMFun());
141
+ return symInfo->getRetSym(func);
142
142
  }
143
143
  /// getVarargNode - Return the unique node representing the variadic argument of a variadic function.
144
144
  inline NodeID getVarargNode(const SVFFunction* func) const
145
145
  {
146
- return symInfo->getVarargSym(func->getLLVMFun());
146
+ return symInfo->getVarargSym(func);
147
147
  }
148
148
  inline NodeID getBlackHoleNode() const
149
149
  {
@@ -163,8 +163,8 @@ class ThreadCallGraph: public PTACallGraph
163
163
  public:
164
164
  typedef Set<const CallICFGNode*> InstSet;
165
165
  typedef InstSet CallSiteSet;
166
- typedef std::vector<const Instruction*> InstVector;
167
- typedef Map<const Instruction*, InstSet> CallToInstMap;
166
+ typedef std::vector<const SVFInstruction*> InstVector;
167
+ typedef Map<const SVFInstruction*, InstSet> CallToInstMap;
168
168
  typedef Set<CallSiteSet*> CtxSet;
169
169
  typedef ThreadForkEdge::ForkEdgeSet ForkEdgeSet;
170
170
  typedef Map<const CallICFGNode*, ForkEdgeSet> CallInstToForkEdgesMap;
@@ -182,7 +182,7 @@ public:
182
182
  || node->getNodeKind() == Load;
183
183
  }
184
184
 
185
- inline const Instruction* getInst() const
185
+ inline const SVFInstruction* getInst() const
186
186
  {
187
187
  /// should return a valid instruction unless it is a global PAGEdge
188
188
  return pagEdge->getInst();
@@ -167,12 +167,12 @@ class LoadMU : public MSSAMU<Cond>
167
167
 
168
168
  private:
169
169
  const LoadStmt* inst;
170
- const BasicBlock* bb;
170
+ const SVFBasicBlock* bb;
171
171
 
172
172
  public:
173
173
  /// Constructor/Destructor for MU
174
174
  //@{
175
- LoadMU(const BasicBlock* b,const LoadStmt* i, const MemRegion* m, Cond c = true) :
175
+ LoadMU(const SVFBasicBlock* b,const LoadStmt* i, const MemRegion* m, Cond c = true) :
176
176
  MSSAMU<Cond>(MSSAMU<Cond>::LoadMSSAMU,m,c), inst(i), bb(b)
177
177
  {
178
178
  }
@@ -189,7 +189,7 @@ public:
189
189
  }
190
190
 
191
191
  /// Return basic block
192
- inline const BasicBlock* getBasicBlock() const
192
+ inline const SVFBasicBlock* getBasicBlock() const
193
193
  {
194
194
  return bb;
195
195
  }
@@ -244,7 +244,7 @@ public:
244
244
  }
245
245
 
246
246
  /// Return basic block
247
- inline const BasicBlock* getBasicBlock() const
247
+ inline const SVFBasicBlock* getBasicBlock() const
248
248
  {
249
249
  return callsite->getCallSite()->getParent();
250
250
  }
@@ -461,12 +461,12 @@ template<class Cond>
461
461
  class StoreCHI : public MSSACHI<Cond>
462
462
  {
463
463
  private:
464
- const BasicBlock* bb;
464
+ const SVFBasicBlock* bb;
465
465
  const StoreStmt* inst;
466
466
  public:
467
467
  /// Constructors for StoreCHI
468
468
  //@{
469
- StoreCHI(const BasicBlock* b, const StoreStmt* i, const MemRegion* m, Cond c = true) :
469
+ StoreCHI(const SVFBasicBlock* b, const StoreStmt* i, const MemRegion* m, Cond c = true) :
470
470
  MSSACHI<Cond>(MSSADEF::StoreMSSACHI,m,c), bb(b), inst(i)
471
471
  {
472
472
  }
@@ -476,7 +476,7 @@ public:
476
476
  //@}
477
477
 
478
478
  /// Get basic block
479
- inline const BasicBlock* getBasicBlock() const
479
+ inline const SVFBasicBlock* getBasicBlock() const
480
480
  {
481
481
  return bb;
482
482
  }
@@ -535,7 +535,7 @@ public:
535
535
  //@}
536
536
 
537
537
  /// Return basic block
538
- inline const BasicBlock* getBasicBlock() const
538
+ inline const SVFBasicBlock* getBasicBlock() const
539
539
  {
540
540
  return callsite->getCallSite()->getParent();
541
541
  }
@@ -632,13 +632,13 @@ class MSSAPHI : public MSSADEF
632
632
  public:
633
633
  typedef Map<u32_t,const MRVer*> OPVers;
634
634
  private:
635
- const BasicBlock* bb;
635
+ const SVFBasicBlock* bb;
636
636
  OPVers opVers;
637
637
  Cond cond;
638
638
  public:
639
639
  /// Constructors for PHI
640
640
  //@{
641
- MSSAPHI(const BasicBlock* b, const MemRegion* m, Cond c = true) :
641
+ MSSAPHI(const SVFBasicBlock* b, const MemRegion* m, Cond c = true) :
642
642
  MSSADEF(MSSADEF::SSAPHI,m), bb(b), cond(c)
643
643
  {
644
644
  }
@@ -681,7 +681,7 @@ public:
681
681
  //@}
682
682
 
683
683
  /// Return the basic block
684
- inline const BasicBlock* getBasicBlock() const
684
+ inline const SVFBasicBlock* getBasicBlock() const
685
685
  {
686
686
  return bb;
687
687
  }
@@ -470,9 +470,9 @@ public:
470
470
  }
471
471
  //@}
472
472
  /// Whether this instruction has SVFIR Edge
473
- bool hasSVFStmtList(const Instruction* inst);
473
+ bool hasSVFStmtList(const SVFInstruction* inst);
474
474
  /// Given an instruction, get all its the PAGEdge (statement) in sequence
475
- SVFStmtList& getPAGEdgesFromInst(const Instruction* inst);
475
+ SVFStmtList& getPAGEdgesFromInst(const SVFInstruction* inst);
476
476
 
477
477
  /// getModRefInfo APIs
478
478
  //@{
@@ -81,7 +81,7 @@ public:
81
81
  typedef Map<const StoreStmt*, CHISet> StoreToChiSetMap;
82
82
  typedef Map<const CallICFGNode*, MUSet> CallSiteToMUSetMap;
83
83
  typedef Map<const CallICFGNode*, CHISet> CallSiteToCHISetMap;
84
- typedef OrderedMap<const BasicBlock*, PHISet> BBToPhiSetMap;
84
+ typedef OrderedMap<const SVFBasicBlock*, PHISet> BBToPhiSetMap;
85
85
  //@}
86
86
 
87
87
  /// Map from fun to its entry chi set and return mu set
@@ -90,8 +90,8 @@ public:
90
90
 
91
91
  /// For phi insertion
92
92
  //@{
93
- typedef std::vector<const BasicBlock*> BBList;
94
- typedef Map<const BasicBlock*, MRSet> BBToMRSetMap;
93
+ typedef std::vector<const SVFBasicBlock*> BBList;
94
+ typedef Map<const SVFBasicBlock*, MRSet> BBToMRSetMap;
95
95
  typedef Map<const MemRegion*, BBList> MemRegToBBsMap;
96
96
  //@}
97
97
 
@@ -129,7 +129,7 @@ protected:
129
129
  /// SSA rename for a function
130
130
  virtual void SSARename(const SVFFunction& fun);
131
131
  /// SSA rename for a basic block
132
- virtual void SSARenameBB(const BasicBlock& bb);
132
+ virtual void SSARenameBB(const SVFBasicBlock& bb);
133
133
  private:
134
134
  LoadToMUSetMap load2MuSetMap;
135
135
  StoreToChiSetMap store2ChiSetMap;
@@ -175,7 +175,7 @@ private:
175
175
  if (0 == varKills.count(mr))
176
176
  usedRegs.insert(mr);
177
177
  }
178
- inline void collectRegDefs(const BasicBlock* bb, const MemRegion* mr)
178
+ inline void collectRegDefs(const SVFBasicBlock* bb, const MemRegion* mr)
179
179
  {
180
180
  varKills.insert(mr);
181
181
  reg2BBMap[mr].push_back(bb);
@@ -184,12 +184,12 @@ private:
184
184
 
185
185
  /// Add methods for mus/chis/phis
186
186
  //@{
187
- inline void AddLoadMU(const BasicBlock* bb, const LoadStmt* load, const MRSet& mrSet)
187
+ inline void AddLoadMU(const SVFBasicBlock* bb, const LoadStmt* load, const MRSet& mrSet)
188
188
  {
189
189
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
190
190
  AddLoadMU(bb,load,*iter);
191
191
  }
192
- inline void AddStoreCHI(const BasicBlock* bb, const StoreStmt* store, const MRSet& mrSet)
192
+ inline void AddStoreCHI(const SVFBasicBlock* bb, const StoreStmt* store, const MRSet& mrSet)
193
193
  {
194
194
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
195
195
  AddStoreCHI(bb,store,*iter);
@@ -204,18 +204,18 @@ private:
204
204
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
205
205
  AddCallSiteCHI(cs,*iter);
206
206
  }
207
- inline void AddMSSAPHI(const BasicBlock* bb, const MRSet& mrSet)
207
+ inline void AddMSSAPHI(const SVFBasicBlock* bb, const MRSet& mrSet)
208
208
  {
209
209
  for (MRSet::iterator iter = mrSet.begin(), eiter = mrSet.end(); iter != eiter; ++iter)
210
210
  AddMSSAPHI(bb,*iter);
211
211
  }
212
- inline void AddLoadMU(const BasicBlock* bb, const LoadStmt* load, const MemRegion* mr)
212
+ inline void AddLoadMU(const SVFBasicBlock* bb, const LoadStmt* load, const MemRegion* mr)
213
213
  {
214
214
  LOADMU* mu = new LOADMU(bb,load, mr);
215
215
  load2MuSetMap[load].insert(mu);
216
216
  collectRegUses(mr);
217
217
  }
218
- inline void AddStoreCHI(const BasicBlock* bb, const StoreStmt* store, const MemRegion* mr)
218
+ inline void AddStoreCHI(const SVFBasicBlock* bb, const StoreStmt* store, const MemRegion* mr)
219
219
  {
220
220
  STORECHI* chi = new STORECHI(bb,store, mr);
221
221
  store2ChiSetMap[store].insert(chi);
@@ -235,7 +235,7 @@ private:
235
235
  collectRegUses(mr);
236
236
  collectRegDefs(chi->getBasicBlock(),mr);
237
237
  }
238
- inline void AddMSSAPHI(const BasicBlock* bb, const MemRegion* mr)
238
+ inline void AddMSSAPHI(const SVFBasicBlock* bb, const MemRegion* mr)
239
239
  {
240
240
  bb2PhiSetMap[bb].insert(new PHI(bb, mr));
241
241
  }
@@ -392,11 +392,11 @@ public:
392
392
  {
393
393
  return callsiteToChiSetMap[cs];
394
394
  }
395
- inline PHISet& getPHISet(const BasicBlock* bb)
395
+ inline PHISet& getPHISet(const SVFBasicBlock* bb)
396
396
  {
397
397
  return bb2PhiSetMap[bb];
398
398
  }
399
- inline bool hasPHISet(const BasicBlock* bb) const
399
+ inline bool hasPHISet(const SVFBasicBlock* bb) const
400
400
  {
401
401
  return bb2PhiSetMap.find(bb)!=bb2PhiSetMap.end();
402
402
  }
@@ -104,7 +104,7 @@ public:
104
104
  typedef Set<const SVFGNode*> SVFGNodeSet;
105
105
  typedef std::vector<const SVFGNode*> SVFGNodeVec;
106
106
  typedef NodeBS SVFGNodeIDSet;
107
- typedef Set<const Instruction*> InstSet;
107
+ typedef Set<const SVFInstruction*> InstSet;
108
108
  typedef std::pair<NodeID,NodeID> NodeIDPair;
109
109
  typedef Map<SVFGNodeLockSpan, bool> PairToBoolMap;
110
110