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 59 of file MemRegion.h.

Member Typedef Documentation

◆ Condition

Definition at line 63 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 72 of file MemRegion.h.

72 :
74 {
75 }
static u32_t totalMRNum
region ID 0 is reserved
Definition MemRegion.h:66
const NodeBS cptsSet
Definition MemRegion.h:68
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76

◆ ~MemRegion()

SVF::MemRegion::~MemRegion ( )
inline

Destructor.

Definition at line 77 of file MemRegion.h.

78 {
79 }

Member Function Documentation

◆ dumpStr()

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

Dump string.

Definition at line 97 of file MemRegion.h.

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

◆ getMRID()

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

Return memory region ID.

Definition at line 82 of file MemRegion.h.

83 {
84 return rid;
85 }

◆ getPointsTo()

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

Return points-to.

Definition at line 87 of file MemRegion.h.

88 {
89 return cptsSet;
90 }

◆ getRegionSize()

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

Return memory object number inside a region.

Definition at line 126 of file MemRegion.h.

127 {
128 return cptsSet.count();
129 }
unsigned count() const

◆ operator==()

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

Operator== overriding.

Definition at line 92 of file MemRegion.h.

93 {
94 return this->getPointsTo() == rhs->getPointsTo();
95 }
const NodeBS & getPointsTo() const
Return points-to.
Definition MemRegion.h:87

Member Data Documentation

◆ cptsSet

const NodeBS SVF::MemRegion::cptsSet
private

Definition at line 68 of file MemRegion.h.

◆ rid

MRID SVF::MemRegion::rid
private

Definition at line 67 of file MemRegion.h.

◆ totalMRNum

u32_t MemRegion::totalMRNum = 0
staticprivate

region ID 0 is reserved

Definition at line 66 of file MemRegion.h.


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