SVF
PAGEdge.h
Go to the documentation of this file.
1 //===- PAGEdge.h -- PAG edge class-------------------------------------------//
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 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 General Public License for more details.
17 
18 // You should have received a copy of the GNU General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //
21 //===----------------------------------------------------------------------===//
22 
23 
24 /*
25  * PAGEdge.h
26  *
27  * Created on: Nov 10, 2013
28  * Author: Yulei Sui
29  */
30 
31 #ifndef PAGEDGE_H_
32 #define PAGEDGE_H_
33 
34 #include "Graphs/GenericGraph.h"
36 #include "Graphs/ICFGNode.h"
37 
38 namespace SVF
39 {
40 
41 class PAGNode;
42 
43 /*
44  * PAG edge between nodes
45  */
47 class PAGEdge : public GenericPAGEdgeTy
48 {
49 
50 public:
54  enum PEDGEK
55  {
57  };
58 
59 private:
60  const Value* value;
64 public:
66 
68  PAGEdge(PAGNode* s, PAGNode* d, GEdgeFlag k);
71  {
72  }
73 
75 
76  static inline bool classof(const PAGEdge*)
77  {
78  return true;
79  }
80  static inline bool classof(const GenericPAGEdgeTy *edge)
81  {
82  return edge->getEdgeKind() == PAGEdge::Addr ||
83  edge->getEdgeKind() == PAGEdge::Copy ||
84  edge->getEdgeKind() == PAGEdge::Store ||
85  edge->getEdgeKind() == PAGEdge::Load ||
86  edge->getEdgeKind() == PAGEdge::Call ||
87  edge->getEdgeKind() == PAGEdge::Ret ||
88  edge->getEdgeKind() == PAGEdge::NormalGep ||
89  edge->getEdgeKind() == PAGEdge::VariantGep ||
90  edge->getEdgeKind() == PAGEdge::ThreadFork ||
91  edge->getEdgeKind() == PAGEdge::ThreadJoin ||
92  edge->getEdgeKind() == PAGEdge::Cmp ||
93  edge->getEdgeKind() == PAGEdge::BinaryOp ||
94  edge->getEdgeKind() == PAGEdge::UnaryOp;
95  }
97 
99  inline EdgeID getEdgeID() const
100  {
101  return edgeId;
102  }
104  bool isPTAEdge() const;
105 
107 
108  inline const Instruction* getInst() const
109  {
111  }
112  inline void setValue(const Value *val)
113  {
114  value = val;
115  }
116  inline const Value* getValue() const
117  {
118  return value;
119  }
120  inline void setBB(const BasicBlock *bb)
121  {
122  basicBlock = bb;
123  }
124  inline const BasicBlock* getBB() const
125  {
126  return basicBlock;
127  }
128  inline void setICFGNode(ICFGNode *node)
129  {
130  icfgNode = node;
131  }
132  inline ICFGNode* getICFGNode() const
133  {
134  return icfgNode;
135  }
137 
140  {
141  Inst2LabelMap::const_iterator iter = inst2LabelMap.find(cs);
142  u64_t label = (iter != inst2LabelMap.end()) ?
143  iter->second : callEdgeLabelCounter++;
144  return (label << EdgeKindMaskBits) | k;
145  }
146 
149  static inline GEdgeFlag makeEdgeFlagWithStoreInst(GEdgeKind k, const ICFGNode* store)
150  {
151  Inst2LabelMap::const_iterator iter = inst2LabelMap.find(store);
152  u64_t label = (iter != inst2LabelMap.end()) ?
153  iter->second : storeEdgeLabelCounter++;
154  return (label << EdgeKindMaskBits) | k;
155  }
156 
157  virtual const std::string toString() const;
158 
160 
162  friend raw_ostream& operator<< (raw_ostream &o, const PAGEdge &edge)
163  {
164  o << edge.toString();
165  return o;
166  }
168 
171  typedef PAGEdgeToSetMapTy PAGKindToEdgeSetMapTy;
172 
173 private:
175  static Inst2LabelMap inst2LabelMap;
178 };
179 
180 
181 
185 class AddrPE: public PAGEdge
186 {
187 private:
188  AddrPE();
189  AddrPE(const AddrPE &);
190  void operator=(const AddrPE &);
191 public:
193 
194  static inline bool classof(const AddrPE *)
195  {
196  return true;
197  }
198  static inline bool classof(const PAGEdge *edge)
199  {
200  return edge->getEdgeKind() == PAGEdge::Addr;
201  }
202  static inline bool classof(const GenericPAGEdgeTy *edge)
203  {
204  return edge->getEdgeKind() == PAGEdge::Addr;
205  }
207 
210  {
211  }
212 
213  virtual const std::string toString() const;
214 };
215 
216 
220 class CopyPE: public PAGEdge
221 {
222 private:
223  CopyPE();
224  CopyPE(const CopyPE &);
225  void operator=(const CopyPE &);
226 public:
228 
229  static inline bool classof(const CopyPE *)
230  {
231  return true;
232  }
233  static inline bool classof(const PAGEdge *edge)
234  {
235  return edge->getEdgeKind() == PAGEdge::Copy;
236  }
237  static inline bool classof(const GenericPAGEdgeTy *edge)
238  {
239  return edge->getEdgeKind() == PAGEdge::Copy;
240  }
242 
245  {
246  }
247 
248  virtual const std::string toString() const;
249 };
250 
251 
255 class CmpPE: public PAGEdge
256 {
257 private:
258  CmpPE();
259  CmpPE(const CmpPE &);
260  void operator=(const CmpPE &);
261 public:
263 
264  static inline bool classof(const CmpPE *)
265  {
266  return true;
267  }
268  static inline bool classof(const PAGEdge *edge)
269  {
270  return edge->getEdgeKind() == PAGEdge::Cmp;
271  }
272  static inline bool classof(const GenericPAGEdgeTy *edge)
273  {
274  return edge->getEdgeKind() == PAGEdge::Cmp;
275  }
277 
280  {
281  }
282 
283  virtual const std::string toString() const;
284 };
285 
286 
290 class BinaryOPPE: public PAGEdge
291 {
292 private:
293  BinaryOPPE();
294  BinaryOPPE(const BinaryOPPE &);
295  void operator=(const BinaryOPPE &);
296 public:
298 
299  static inline bool classof(const BinaryOPPE *)
300  {
301  return true;
302  }
303  static inline bool classof(const PAGEdge *edge)
304  {
305  return edge->getEdgeKind() == PAGEdge::BinaryOp;
306  }
307  static inline bool classof(const GenericPAGEdgeTy *edge)
308  {
309  return edge->getEdgeKind() == PAGEdge::BinaryOp;
310  }
312 
315  {
316  }
317 
318  virtual const std::string toString() const;
319 };
320 
324 class UnaryOPPE: public PAGEdge
325 {
326 private:
327  UnaryOPPE();
328  UnaryOPPE(const UnaryOPPE &);
329  void operator=(const UnaryOPPE &);
330 public:
332 
333  static inline bool classof(const UnaryOPPE *)
334  {
335  return true;
336  }
337  static inline bool classof(const PAGEdge *edge)
338  {
339  return edge->getEdgeKind() == PAGEdge::UnaryOp;
340  }
341  static inline bool classof(const GenericPAGEdgeTy *edge)
342  {
343  return edge->getEdgeKind() == PAGEdge::UnaryOp;
344  }
346 
349  {
350  }
351 
352  virtual const std::string toString() const;
353 };
354 
355 
359 class StorePE: public PAGEdge
360 {
361 private:
362  StorePE();
363  StorePE(const StorePE &);
364  void operator=(const StorePE &);
365 
366 public:
368 
369  static inline bool classof(const StorePE *)
370  {
371  return true;
372  }
373  static inline bool classof(const PAGEdge *edge)
374  {
375  return edge->getEdgeKind() == PAGEdge::Store;
376  }
377  static inline bool classof(const GenericPAGEdgeTy *edge)
378  {
379  return edge->getEdgeKind() == PAGEdge::Store;
380  }
382 
384  StorePE(PAGNode* s, PAGNode* d, const IntraBlockNode* st) :
386  {
387  }
388 
389  virtual const std::string toString() const;
390 };
391 
392 
396 class LoadPE: public PAGEdge
397 {
398 private:
399  LoadPE();
400  LoadPE(const LoadPE &);
401  void operator=(const LoadPE &);
402 
403 public:
405 
406  static inline bool classof(const LoadPE *)
407  {
408  return true;
409  }
410  static inline bool classof(const PAGEdge *edge)
411  {
412  return edge->getEdgeKind() == PAGEdge::Load;
413  }
414  static inline bool classof(const GenericPAGEdgeTy *edge)
415  {
416  return edge->getEdgeKind() == PAGEdge::Load;
417  }
419 
422  {
423  }
424 
425  virtual const std::string toString() const;
426 };
427 
428 
432 class GepPE: public PAGEdge
433 {
434 private:
435  GepPE();
436  GepPE(const GepPE &);
437  void operator=(const GepPE &);
438 
439 public:
441 
442  static inline bool classof(const GepPE *)
443  {
444  return true;
445  }
446  static inline bool classof(const PAGEdge *edge)
447  {
448  return edge->getEdgeKind() == PAGEdge::NormalGep ||
449  edge->getEdgeKind() == PAGEdge::VariantGep;
450  }
451  static inline bool classof(const GenericPAGEdgeTy *edge)
452  {
453  return edge->getEdgeKind() == PAGEdge::NormalGep ||
454  edge->getEdgeKind() == PAGEdge::VariantGep;
455  }
457 
458 protected:
460  GepPE(PAGNode* s, PAGNode* d, PEDGEK k) : PAGEdge(s,d,k)
461  {
462 
463  }
464 
465  virtual const std::string toString() const;
466 };
467 
468 
472 class NormalGepPE : public GepPE
473 {
474 private:
475  NormalGepPE();
476  NormalGepPE(const NormalGepPE&);
477  void operator=(const NormalGepPE&);
478 
480 
481 public:
483 
484  static inline bool classof(const NormalGepPE *)
485  {
486  return true;
487  }
488  static inline bool classof(const GepPE *edge)
489  {
490  return edge->getEdgeKind() == PAGEdge::NormalGep;
491  }
492  static inline bool classof(const PAGEdge *edge)
493  {
494  return edge->getEdgeKind() == PAGEdge::NormalGep;
495  }
496  static inline bool classof(const GenericPAGEdgeTy *edge)
497  {
498  return edge->getEdgeKind() == PAGEdge::NormalGep;
499  }
501 
503  NormalGepPE(PAGNode* s, PAGNode* d, const LocationSet& l) : GepPE(s,d,PAGEdge::NormalGep), ls(l)
504  {}
505 
507  inline u32_t getOffset() const
508  {
509  return ls.getOffset();
510  }
511  inline const LocationSet& getLocationSet() const
512  {
513  return ls;
514  }
515 
516  virtual const std::string toString() const;
517 };
518 
522 class VariantGepPE : public GepPE
523 {
524 private:
525  VariantGepPE();
526  VariantGepPE(const VariantGepPE&);
527  void operator=(const VariantGepPE&);
528 
529 public:
531 
532  static inline bool classof(const VariantGepPE *)
533  {
534  return true;
535  }
536  static inline bool classof(const GepPE *edge)
537  {
538  return edge->getEdgeKind() == PAGEdge::VariantGep;
539  }
540  static inline bool classof(const PAGEdge *edge)
541  {
542  return edge->getEdgeKind() == PAGEdge::VariantGep;
543  }
544  static inline bool classof(const GenericPAGEdgeTy *edge)
545  {
546  return edge->getEdgeKind() == PAGEdge::VariantGep;
547  }
549 
552 
553  virtual const std::string toString() const;
554 
555 };
556 
557 
561 class CallPE: public PAGEdge
562 {
563 private:
564  CallPE();
565  CallPE(const CallPE &);
566  void operator=(const CallPE &);
567 
569 public:
571 
572  static inline bool classof(const CallPE *)
573  {
574  return true;
575  }
576  static inline bool classof(const PAGEdge *edge)
577  {
578  return edge->getEdgeKind() == PAGEdge::Call
579  || edge->getEdgeKind() == PAGEdge::ThreadFork;
580  }
581  static inline bool classof(const GenericPAGEdgeTy *edge)
582  {
583  return edge->getEdgeKind() == PAGEdge::Call
584  || edge->getEdgeKind() == PAGEdge::ThreadFork;
585  }
587 
590  PAGEdge(s,d,makeEdgeFlagWithCallInst(k,i)), inst(i)
591  {
592  }
593 
595 
596  inline const CallBlockNode* getCallInst() const
597  {
598  return inst;
599  }
600  inline const CallBlockNode* getCallSite() const
601  {
602  return inst;
603  }
605 
606  virtual const std::string toString() const;
607 };
608 
609 
613 class RetPE: public PAGEdge
614 {
615 private:
616  RetPE();
617  RetPE(const RetPE &);
618  void operator=(const RetPE &);
619 
621 public:
623 
624  static inline bool classof(const RetPE *)
625  {
626  return true;
627  }
628  static inline bool classof(const PAGEdge *edge)
629  {
630  return edge->getEdgeKind() == PAGEdge::Ret
631  || edge->getEdgeKind() == PAGEdge::ThreadJoin;
632  }
633  static inline bool classof(const GenericPAGEdgeTy *edge)
634  {
635  return edge->getEdgeKind() == PAGEdge::Ret
636  || edge->getEdgeKind() == PAGEdge::ThreadJoin;
637  }
639 
642  PAGEdge(s,d,makeEdgeFlagWithCallInst(k,i)), inst(i)
643  {
644  }
645 
647 
648  inline const CallBlockNode* getCallInst() const
649  {
650  return inst;
651  }
652  inline const CallBlockNode* getCallSite() const
653  {
654  return inst;
655  }
657 
658  virtual const std::string toString() const;
659 };
660 
661 
665 class TDForkPE: public CallPE
666 {
667 private:
668  TDForkPE();
669  TDForkPE(const TDForkPE &);
670  void operator=(const TDForkPE &);
671 
672 public:
674 
675  static inline bool classof(const TDForkPE *)
676  {
677  return true;
678  }
679  static inline bool classof(const PAGEdge *edge)
680  {
681  return edge->getEdgeKind() == PAGEdge::ThreadFork;
682  }
683  static inline bool classof(const GenericPAGEdgeTy *edge)
684  {
685  return edge->getEdgeKind() == PAGEdge::ThreadFork;
686  }
688 
690  TDForkPE(PAGNode* s, PAGNode* d, const CallBlockNode* i) :
691  CallPE(s,d,i,PAGEdge::ThreadFork)
692  {
693  }
694 
695  virtual const std::string toString() const;
696 };
697 
698 
699 
703 class TDJoinPE: public RetPE
704 {
705 private:
706  TDJoinPE();
707  TDJoinPE(const TDJoinPE &);
708  void operator=(const TDJoinPE &);
709 
710 public:
712 
713  static inline bool classof(const TDJoinPE *)
714  {
715  return true;
716  }
717  static inline bool classof(const PAGEdge *edge)
718  {
719  return edge->getEdgeKind() == PAGEdge::ThreadJoin;
720  }
721  static inline bool classof(const GenericPAGEdgeTy *edge)
722  {
723  return edge->getEdgeKind() == PAGEdge::ThreadJoin;
724  }
726 
728  TDJoinPE(PAGNode* s, PAGNode* d, const CallBlockNode* i) :
729  RetPE(s,d,i,PAGEdge::ThreadJoin)
730  {
731  }
732 
733  virtual const std::string toString() const;
734 };
735 
736 } // End namespace SVF
737 
738 #endif /* PAGEDGE_H_ */
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:307
const LocationSet & getLocationSet() const
Definition: PAGEdge.h:511
GEdgeKind getEdgeKind() const
Definition: GenericGraph.h:81
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:272
VariantGepPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:551
const BasicBlock * basicBlock
LLVM BasicBlock.
Definition: PAGEdge.h:61
~PAGEdge()
Destructor.
Definition: PAGEdge.h:70
static bool classof(const StorePE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:369
const Value * getValue() const
Definition: PAGEdge.h:116
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:717
llvm::BasicBlock BasicBlock
Definition: BasicTypes.h:77
llvm::raw_ostream raw_ostream
LLVM outputs.
Definition: BasicTypes.h:99
void setBB(const BasicBlock *bb)
Definition: PAGEdge.h:120
static Size_t totalEdgeNum
Total edge number.
Definition: PAGEdge.h:65
LocationSet ls
location set of the gep edge
Definition: PAGEdge.h:479
const CallBlockNode * getCallSite() const
Definition: PAGEdge.h:652
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:721
NormalGepPE(PAGNode *s, PAGNode *d, const LocationSet &l)
constructor
Definition: PAGEdge.h:503
GenericNode< PAGNode, PAGEdge >::GEdgeSetTy PAGEdgeSetTy
Definition: PAGEdge.h:169
UnaryOPPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:348
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:679
static Inst2LabelMap inst2LabelMap
Call site Instruction to label map.
Definition: PAGEdge.h:175
CopyPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:244
static bool classof(const TDJoinPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:713
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:410
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:492
static bool classof(const GepPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:442
Map< EdgeID, PAGEdgeSetTy > PAGEdgeToSetMapTy
Definition: PAGEdge.h:170
static GEdgeFlag makeEdgeFlagWithStoreInst(GEdgeKind k, const ICFGNode *store)
Definition: PAGEdge.h:149
static bool classof(const TDForkPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:675
LoadPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:421
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:303
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:237
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
Definition: SVFBasicTypes.h:98
bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
Definition: PAG.cpp:1010
unsigned u32_t
Definition: SVFBasicTypes.h:75
GenericEdge< PAGNode > GenericPAGEdgeTy
Definition: PAGEdge.h:41
static bool classof(const LoadPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:406
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:233
EdgeID getEdgeID() const
Return Edge ID.
Definition: PAGEdge.h:99
static bool classof(const RetPE *)
the callsite instruction return to
Definition: PAGEdge.h:624
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:337
const CallBlockNode * getCallSite() const
Definition: PAGEdge.h:600
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:576
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:373
OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
Definition: GenericGraph.h:136
ICFGNode * getICFGNode() const
Definition: PAGEdge.h:132
llvm::Instruction Instruction
Definition: BasicTypes.h:79
StorePE(PAGNode *s, PAGNode *d, const IntraBlockNode *st)
constructor
Definition: PAGEdge.h:384
signed long Size_t
Definition: SVFBasicTypes.h:78
static u64_t callEdgeLabelCounter
Call site Instruction counter.
Definition: PAGEdge.h:176
friend raw_ostream & operator<<(raw_ostream &o, const PAGEdge &edge)
Overloading operator << for dumping PAGNode value.
Definition: PAGEdge.h:162
const Instruction * getInst() const
Get/set methods for llvm instruction.
Definition: PAGEdge.h:108
static bool classof(const CopyPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:229
ICFGNode * icfgNode
ICFGNode.
Definition: PAGEdge.h:62
RetPE(PAGNode *s, PAGNode *d, const CallBlockNode *i, GEdgeKind k=PAGEdge::Ret)
constructor
Definition: PAGEdge.h:641
Map< const ICFGNode *, u32_t > Inst2LabelMap
Definition: PAGEdge.h:174
void setValue(const Value *val)
Definition: PAGEdge.h:112
TDJoinPE(PAGNode *s, PAGNode *d, const CallBlockNode *i)
Constructor.
Definition: PAGEdge.h:728
static bool classof(const AddrPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:194
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:80
CmpPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:279
GepPE(PAGNode *s, PAGNode *d, PEDGEK k)
constructor
Definition: PAGEdge.h:460
const BasicBlock * getBB() const
Definition: PAGEdge.h:124
void setICFGNode(ICFGNode *node)
Definition: PAGEdge.h:128
const CallBlockNode * getCallInst() const
Get method for the call instruction.
Definition: PAGEdge.h:596
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:202
static bool classof(const PAGEdge *)
ClassOf.
Definition: PAGEdge.h:76
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:496
const CallBlockNode * inst
llvm instruction for this call
Definition: PAGEdge.h:568
const CallBlockNode * inst
Definition: PAGEdge.h:620
EdgeID edgeId
Edge ID.
Definition: PAGEdge.h:63
const CallBlockNode * getCallInst() const
Get method for call instruction at caller.
Definition: PAGEdge.h:648
static bool classof(const GepPE *edge)
Definition: PAGEdge.h:536
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:198
static bool classof(const VariantGepPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:532
static bool classof(const CallPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:572
u32_t EdgeID
Definition: SVFBasicTypes.h:81
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:446
Size_t getOffset() const
Get methods.
Definition: LocationSet.h:194
static bool classof(const GepPE *edge)
Definition: PAGEdge.h:488
AddrPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:209
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:544
for isBitcode
Definition: ContextDDA.h:15
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:683
static GEdgeFlag makeEdgeFlagWithCallInst(GEdgeKind k, const ICFGNode *cs)
Compute the unique edgeFlag value from edge kind and call site Instruction.
Definition: PAGEdge.h:139
TDForkPE(PAGNode *s, PAGNode *d, const CallBlockNode *i)
constructor
Definition: PAGEdge.h:690
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:377
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:581
PAGEdge(PAGNode *s, PAGNode *d, GEdgeFlag k)
Constructor.
Definition: PAG.cpp:1000
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Definition: Casting.h:343
virtual const std::string toString() const
Definition: PAG.cpp:200
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:633
BinaryOPPE(PAGNode *s, PAGNode *d)
constructor
Definition: PAGEdge.h:314
static bool classof(const CmpPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:264
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:451
static bool classof(const UnaryOPPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:333
PAGEdgeToSetMapTy PAGKindToEdgeSetMapTy
Definition: PAGEdge.h:171
const Value * value
LLVM value.
Definition: PAGEdge.h:60
u32_t getOffset() const
offset of the gep edge
Definition: PAGEdge.h:507
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:268
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:414
static u64_t storeEdgeLabelCounter
Store Instruction counter.
Definition: PAGEdge.h:177
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:540
llvm::Value Value
Definition: BasicTypes.h:78
static constexpr unsigned char EdgeKindMaskBits
We use the lower 8 bits to denote edge kind.
Definition: GenericGraph.h:119
CallPE(PAGNode *s, PAGNode *d, const CallBlockNode *i, GEdgeKind k=PAGEdge::Call)
constructor
Definition: PAGEdge.h:589
static bool classof(const BinaryOPPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:299
unsigned long long u64_t
Definition: SVFBasicTypes.h:76
static bool classof(const GenericPAGEdgeTy *edge)
Definition: PAGEdge.h:341
static bool classof(const NormalGepPE *)
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition: PAGEdge.h:484
static bool classof(const PAGEdge *edge)
Definition: PAGEdge.h:628