SVF
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SVF::NormalGepPE Class Reference

#include <PAGEdge.h>

Inheritance diagram for SVF::NormalGepPE:
SVF::GepPE SVF::PAGEdge SVF::GenericEdge< NodeTy >

Public Member Functions

 NormalGepPE (PAGNode *s, PAGNode *d, const LocationSet &l)
 constructor More...
 
u32_t getOffset () const
 offset of the gep edge More...
 
const LocationSetgetLocationSet () const
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::PAGEdge
 PAGEdge (PAGNode *s, PAGNode *d, GEdgeFlag k)
 Constructor. More...
 
 ~PAGEdge ()
 Destructor. More...
 
EdgeID getEdgeID () const
 Return Edge ID. More...
 
bool isPTAEdge () const
 Whether src and dst nodes are both of pointer type. More...
 
const InstructiongetInst () const
 Get/set methods for llvm instruction. More...
 
void setValue (const Value *val)
 
const ValuegetValue () const
 
void setBB (const BasicBlock *bb)
 
const BasicBlockgetBB () const
 
void setICFGNode (ICFGNode *node)
 
ICFGNodegetICFGNode () const
 
- Public Member Functions inherited from SVF::GenericEdge< NodeTy >
 GenericEdge (NodeTy *s, NodeTy *d, GEdgeFlag k)
 Constructor. More...
 
virtual ~GenericEdge ()
 Destructor. More...
 
NodeID getSrcID () const
 get methods of the components More...
 
NodeID getDstID () const
 
GEdgeKind getEdgeKind () const
 
NodeTypegetSrcNode () const
 
NodeTypegetDstNode () const
 
bool operator== (const GenericEdge< NodeType > *rhs) const
 

Static Public Member Functions

static bool classof (const NormalGepPE *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const GepPE *edge)
 
static bool classof (const PAGEdge *edge)
 
static bool classof (const GenericPAGEdgeTy *edge)
 
- Static Public Member Functions inherited from SVF::GepPE
static bool classof (const GepPE *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const PAGEdge *edge)
 
static bool classof (const GenericPAGEdgeTy *edge)
 
- Static Public Member Functions inherited from SVF::PAGEdge
static GEdgeFlag makeEdgeFlagWithCallInst (GEdgeKind k, const ICFGNode *cs)
 Compute the unique edgeFlag value from edge kind and call site Instruction. More...
 
static GEdgeFlag makeEdgeFlagWithStoreInst (GEdgeKind k, const ICFGNode *store)
 
static bool classof (const PAGEdge *)
 ClassOf. More...
 
static bool classof (const GenericPAGEdgeTy *edge)
 

Private Member Functions

 NormalGepPE ()
 place holder More...
 
 NormalGepPE (const NormalGepPE &)
 place holder More...
 
void operator= (const NormalGepPE &)
 place holder More...
 

Private Attributes

LocationSet ls
 location set of the gep edge More...
 

Additional Inherited Members

- Public Types inherited from SVF::PAGEdge
enum  PEDGEK {
  Addr, Copy, Store, Load,
  Call, Ret, NormalGep, VariantGep,
  ThreadFork, ThreadJoin, Cmp, BinaryOp,
  UnaryOp
}
 
typedef GenericNode< PAGNode, PAGEdge >::GEdgeSetTy PAGEdgeSetTy
 
typedef Map< EdgeID, PAGEdgeSetTyPAGEdgeToSetMapTy
 
typedef PAGEdgeToSetMapTy PAGKindToEdgeSetMapTy
 
- Public Types inherited from SVF::GenericEdge< NodeTy >
typedef NodeTy NodeType
 Node type. More...
 
typedef u64_t GEdgeFlag
 
typedef s32_t GEdgeKind
 
typedef struct SVF::GenericEdge::equalGEdge equalGEdge
 Add the hash function for std::set (we also can overload operator< to implement this) More...
 
- Static Public Attributes inherited from SVF::PAGEdge
static Size_t totalEdgeNum
 Total edge number. More...
 
- Protected Member Functions inherited from SVF::GepPE
 GepPE (PAGNode *s, PAGNode *d, PEDGEK k)
 constructor More...
 
- Static Protected Attributes inherited from SVF::GenericEdge< NodeTy >
static constexpr unsigned char EdgeKindMaskBits = 8
 We use the lower 8 bits to denote edge kind. More...
 
static constexpr u64_t EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits)
 

Detailed Description

Gep edge with a fixed offset

Definition at line 472 of file PAGEdge.h.

Constructor & Destructor Documentation

◆ NormalGepPE() [1/3]

SVF::NormalGepPE::NormalGepPE ( )
private

place holder

◆ NormalGepPE() [2/3]

SVF::NormalGepPE::NormalGepPE ( const NormalGepPE )
private

place holder

◆ NormalGepPE() [3/3]

SVF::NormalGepPE::NormalGepPE ( PAGNode s,
PAGNode d,
const LocationSet l 
)
inline

constructor

Definition at line 503 of file PAGEdge.h.

503  : GepPE(s,d,PAGEdge::NormalGep), ls(l)
504  {}
GepPE()
place holder
LocationSet ls
location set of the gep edge
Definition: PAGEdge.h:479

Member Function Documentation

◆ classof() [1/4]

static bool SVF::NormalGepPE::classof ( const NormalGepPE )
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 484 of file PAGEdge.h.

485  {
486  return true;
487  }

◆ classof() [2/4]

static bool SVF::NormalGepPE::classof ( const GepPE edge)
inlinestatic

Definition at line 488 of file PAGEdge.h.

489  {
490  return edge->getEdgeKind() == PAGEdge::NormalGep;
491  }

◆ classof() [3/4]

static bool SVF::NormalGepPE::classof ( const PAGEdge edge)
inlinestatic

Definition at line 492 of file PAGEdge.h.

493  {
494  return edge->getEdgeKind() == PAGEdge::NormalGep;
495  }

◆ classof() [4/4]

static bool SVF::NormalGepPE::classof ( const GenericPAGEdgeTy edge)
inlinestatic

Definition at line 496 of file PAGEdge.h.

497  {
498  return edge->getEdgeKind() == PAGEdge::NormalGep;
499  }

◆ getLocationSet()

const LocationSet& SVF::NormalGepPE::getLocationSet ( ) const
inline

Definition at line 511 of file PAGEdge.h.

512  {
513  return ls;
514  }
LocationSet ls
location set of the gep edge
Definition: PAGEdge.h:479

◆ getOffset()

u32_t SVF::NormalGepPE::getOffset ( ) const
inline

offset of the gep edge

Definition at line 507 of file PAGEdge.h.

508  {
509  return ls.getOffset();
510  }
LocationSet ls
location set of the gep edge
Definition: PAGEdge.h:479
Size_t getOffset() const
Get methods.
Definition: LocationSet.h:194

◆ operator=()

void SVF::NormalGepPE::operator= ( const NormalGepPE )
private

place holder

◆ toString()

const std::string NormalGepPE::toString ( ) const
virtual

Reimplemented from SVF::GepPE.

Definition at line 295 of file PAG.cpp.

295  {
296  std::string str;
297  raw_string_ostream rawstr(str);
298  rawstr << "NormalGepPE: [" << getDstID() << "<--" << getSrcID() << "]\t";
300  rawstr << "\n";
301  }
302  rawstr << value2String(getValue());
303  return rawstr.str();
304 }
const Value * getValue() const
Definition: PAGEdge.h:116
NodeID getDstID() const
Definition: GenericGraph.h:77
NodeID getSrcID() const
get methods of the components
Definition: GenericGraph.h:73
static const llvm::cl::opt< bool > PAGDotGraphShorter
Definition: Options.h:88
llvm::raw_string_ostream raw_string_ostream
Definition: BasicTypes.h:100
const std::string value2String(const Value *value)
Definition: SVFUtil.cpp:359

Member Data Documentation

◆ ls

LocationSet SVF::NormalGepPE::ls
private

location set of the gep edge

Definition at line 479 of file PAGEdge.h.


The documentation for this class was generated from the following files: