Static Value-Flow Analysis
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
SVF::MemRegion Class Reference

Memory Region class. More...

#include <MemRegion.h>

Classes

struct  equalMemRegion
 

Public Types

typedef bool Condition
 
typedef struct SVF::MemRegion::equalMemRegion equalMemRegion
 

Public Member Functions

 MemRegion (const NodeBS &cp)
 Constructor.
 
 ~MemRegion ()
 Destructor.
 
MRID getMRID () const
 Return memory region ID.
 
const NodeBSgetPointsTo () const
 Return points-to.
 
bool operator== (const MemRegion *rhs) const
 Operator== overriding.
 
std::string dumpStr () const
 Dump string.
 
u32_t getRegionSize () const
 Return memory object number inside a region.
 

Private Attributes

MRID rid
 
const NodeBS cptsSet
 

Static Private Attributes

static u32_t totalMRNum = 0
 region ID 0 is reserved
 

Detailed Description

Memory Region class.

Definition at line 55 of file MemRegion.h.

Member Typedef Documentation

◆ Condition

Definition at line 59 of file MemRegion.h.

◆ equalMemRegion

add the hash function here to sort elements and remove and remove duplicated element in the set (binary tree comparison)

Constructor & Destructor Documentation

◆ MemRegion()

SVF::MemRegion::MemRegion ( const NodeBS cp)
inline

Constructor.

Definition at line 68 of file MemRegion.h.

68 :
70 {
71 }
static u32_t totalMRNum
region ID 0 is reserved
Definition MemRegion.h:62
const NodeBS cptsSet
Definition MemRegion.h:64
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ ~MemRegion()

SVF::MemRegion::~MemRegion ( )
inline

Destructor.

Definition at line 73 of file MemRegion.h.

74 {
75 }

Member Function Documentation

◆ dumpStr()

std::string SVF::MemRegion::dumpStr ( ) const
inline

Dump string.

Definition at line 93 of file MemRegion.h.

94 {
95 std::string str;
96 str += "pts{";
98 ii != ie; ii++)
99 {
100 char int2str[16];
101 snprintf(int2str, sizeof(int2str), "%d", *ii);
102 str += int2str;
103 str += " ";
104 }
105 str += "}";
106 return str;
107 }
SparseBitVectorIterator iterator
iterator begin() const

◆ getMRID()

MRID SVF::MemRegion::getMRID ( ) const
inline

Return memory region ID.

Definition at line 78 of file MemRegion.h.

79 {
80 return rid;
81 }

◆ getPointsTo()

const NodeBS & SVF::MemRegion::getPointsTo ( ) const
inline

Return points-to.

Definition at line 83 of file MemRegion.h.

84 {
85 return cptsSet;
86 }

◆ getRegionSize()

u32_t SVF::MemRegion::getRegionSize ( ) const
inline

Return memory object number inside a region.

Definition at line 122 of file MemRegion.h.

123 {
124 return cptsSet.count();
125 }
unsigned count() const

◆ operator==()

bool SVF::MemRegion::operator== ( const MemRegion rhs) const
inline

Operator== overriding.

Definition at line 88 of file MemRegion.h.

89 {
90 return this->getPointsTo() == rhs->getPointsTo();
91 }
const NodeBS & getPointsTo() const
Return points-to.
Definition MemRegion.h:83

Member Data Documentation

◆ cptsSet

const NodeBS SVF::MemRegion::cptsSet
private

Definition at line 64 of file MemRegion.h.

◆ rid

MRID SVF::MemRegion::rid
private

Definition at line 63 of file MemRegion.h.

◆ totalMRNum

u32_t MemRegion::totalMRNum = 0
staticprivate

region ID 0 is reserved

Definition at line 62 of file MemRegion.h.


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