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

#include <SVFGStat.h>

Inheritance diagram for SVF::MemSSAStat:
SVF::PTAStat SVF::SVFStat

Public Member Functions

 MemSSAStat (MemSSA *)
 
virtual ~MemSSAStat ()
 
virtual void performStat () override
 
virtual void printStat (std::string str="") override
 
- Public Member Functions inherited from SVF::PTAStat
 PTAStat (PointerAnalysis *p)
 
virtual ~PTAStat ()
 
void setMemUsageBefore (u32_t vmrss, u32_t vmsize)
 
void setMemUsageAfter (u32_t vmrss, u32_t vmsize)
 
void performStat () override
 
void callgraphStat () override
 
- Public Member Functions inherited from SVF::SVFStat
 SVFStat ()
 
virtual ~SVFStat ()
 
virtual void startClk ()
 
virtual void endClk ()
 
virtual void performStatPerQuery (NodeID)
 
virtual void printStatPerQuery (NodeID, const PointsTo &)
 

Static Public Attributes

static const charTotalTimeOfConstructMemSSA = "TotalMSSATime"
 Total time for constructing memory SSA.
 
static const charTimeOfGeneratingMemRegions = "GenRegionTime"
 Time for allocating regions.
 
static const charTimeOfCreateMUCHI = "GenMUCHITime"
 Time for generating mu/chi for load/store/calls.
 
static const charTimeOfInsertingPHI = "InsertPHITime"
 Time for inserting phis.
 
static const charTimeOfSSARenaming = "SSARenameTime"
 Time for SSA rename.
 
static const charNumOfMaxRegion = "MaxRegSize"
 Number of max points-to set in region.
 
static const charNumOfAveragePtsInRegion = "AverageRegSize"
 Number of average points-to set in region.
 
static const charNumOfMemRegions = "MemRegions"
 Number of memory regions.
 
static const charNumOfEntryChi = "FunEntryChi"
 Number of function entry chi.
 
static const charNumOfRetMu = "FunRetMu"
 Number of function return mu.
 
static const charNumOfCSChi = "CSChiNode"
 Number of call site chi.
 
static const charNumOfCSMu = "CSMuNode"
 Number of call site mu.
 
static const charNumOfLoadMu = "LoadMuNode"
 Number of load mu.
 
static const charNumOfStoreChi = "StoreChiNode"
 Number of store chi.
 
static const charNumOfMSSAPhi = "MSSAPhi"
 Number of mssa phi.
 
static const charNumOfFunHasEntryChi = "FunHasEntryChi"
 Number of functions which have entry chi.
 
static const charNumOfFunHasRetMu = "FunHasRetMu"
 Number of functions which have return mu.
 
static const charNumOfCSHasChi = "CSHasChi"
 Number of call sites which have chi.
 
static const charNumOfCSHasMu = "CSHasMu"
 Number of call sites which have mu.
 
static const charNumOfLoadHasMu = "LoadHasMu"
 Number of loads which have mu.
 
static const charNumOfStoreHasChi = "StoreHasChi"
 Number of stores which have chi.
 
static const charNumOfBBHasMSSAPhi = "BBHasMSSAPhi"
 Number of basic blocks which have mssa phi.
 
- Static Public Attributes inherited from SVF::SVFStat
static bool printGeneralStats = true
 SVF's general statistics are only printed once even if you run multiple anayses.
 
static double timeOfBuildingLLVMModule = 0
 
static double timeOfBuildingSymbolTable = 0
 
static double timeOfBuildingSVFIR = 0
 

Private Attributes

MemSSAmssa
 

Additional Inherited Members

- Public Types inherited from SVF::SVFStat
enum  ClockType { Wall , CPU }
 
typedef OrderedMap< std::string, u32_tNUMStatMap
 
typedef OrderedMap< std::string, doubleTIMEStatMap
 
- Static Public Member Functions inherited from SVF::SVFStat
static double getClk (bool mark=false)
 
- Public Attributes inherited from SVF::PTAStat
NodeBS localVarInRecursion
 
- Public Attributes inherited from SVF::SVFStat
NUMStatMap generalNumMap
 
NUMStatMap PTNumStatMap
 
TIMEStatMap timeStatMap
 
double startTime
 
double endTime
 
- Protected Attributes inherited from SVF::PTAStat
PointerAnalysispta
 
u32_t _vmrssUsageBefore
 
u32_t _vmrssUsageAfter
 
u32_t _vmsizeUsageBefore
 
u32_t _vmsizeUsageAfter
 

Detailed Description

Definition at line 48 of file SVFGStat.h.

Constructor & Destructor Documentation

◆ MemSSAStat()

MemSSAStat::MemSSAStat ( MemSSA memSSA)

Constructor

Definition at line 65 of file SVFGStat.cpp.

65 : PTAStat(nullptr)
66{
67 mssa = memSSA;
68 startClk();
69}
MemSSA * mssa
Definition SVFGStat.h:88
virtual void startClk()
Definition SVFStat.h:58

◆ ~MemSSAStat()

virtual SVF::MemSSAStat::~MemSSAStat ( )
inlinevirtual

Definition at line 79 of file SVFGStat.h.

80 {
81
82 }

Member Function Documentation

◆ performStat()

void MemSSAStat::performStat ( )
overridevirtual

Start stating

Implements SVF::SVFStat.

Definition at line 74 of file SVFGStat.cpp.

75{
76
77 endClk();
78
81
84 MRGenerator::MRSet & mrSet = mrGenerator->getMRSet();
85 MRGenerator::MRSet::const_iterator it = mrSet.begin();
86 MRGenerator::MRSet::const_iterator eit = mrSet.end();
87 for (; it != eit; it++)
88 {
89 const MemRegion* region = *it;
94 }
95
101
112
120
121 printStat();
122
123}
unsigned u32_t
Definition CommandLine.h:18
#define TIMEINTERVAL
Definition SVFType.h:512
OrderedSet< const MemRegion *, MemRegion::equalMemRegion > MRSet
Get typedef from Pointer Analysis.
Definition MemRegion.h:141
u32_t getMRNum() const
Definition MemRegion.h:420
Memory Region class.
Definition MemRegion.h:56
u32_t getRegionSize() const
Return memory object number inside a region.
Definition MemRegion.h:122
static const char * TimeOfInsertingPHI
Time for inserting phis.
Definition SVFGStat.h:55
static const char * NumOfRetMu
Number of function return mu.
Definition SVFGStat.h:62
static const char * NumOfLoadMu
Number of load mu.
Definition SVFGStat.h:65
static const char * NumOfStoreHasChi
Number of stores which have chi.
Definition SVFGStat.h:74
static const char * TimeOfCreateMUCHI
Time for generating mu/chi for load/store/calls.
Definition SVFGStat.h:54
static const char * NumOfMSSAPhi
Number of mssa phi.
Definition SVFGStat.h:67
static const char * NumOfBBHasMSSAPhi
Number of basic blocks which have mssa phi.
Definition SVFGStat.h:75
static const char * NumOfAveragePtsInRegion
Number of average points-to set in region.
Definition SVFGStat.h:59
static const char * TimeOfGeneratingMemRegions
Time for allocating regions.
Definition SVFGStat.h:53
static const char * NumOfCSMu
Number of call site mu.
Definition SVFGStat.h:64
static const char * TotalTimeOfConstructMemSSA
Total time for constructing memory SSA.
Definition SVFGStat.h:52
static const char * NumOfStoreChi
Number of store chi.
Definition SVFGStat.h:66
static const char * TimeOfSSARenaming
Time for SSA rename.
Definition SVFGStat.h:56
static const char * NumOfCSChi
Number of call site chi.
Definition SVFGStat.h:63
static const char * NumOfMemRegions
Number of memory regions.
Definition SVFGStat.h:60
static const char * NumOfFunHasRetMu
Number of functions which have return mu.
Definition SVFGStat.h:70
static const char * NumOfMaxRegion
Number of max points-to set in region.
Definition SVFGStat.h:58
static const char * NumOfLoadHasMu
Number of loads which have mu.
Definition SVFGStat.h:73
virtual void printStat(std::string str="") override
Definition SVFGStat.cpp:128
static const char * NumOfEntryChi
Number of function entry chi.
Definition SVFGStat.h:61
static const char * NumOfCSHasChi
Number of call sites which have chi.
Definition SVFGStat.h:71
static const char * NumOfFunHasEntryChi
Number of functions which have entry chi.
Definition SVFGStat.h:69
static const char * NumOfCSHasMu
Number of call sites which have mu.
Definition SVFGStat.h:72
u32_t getFunEntryChiNum() const
Definition MemSSA.cpp:492
LoadToMUSetMap & getLoadToMUSetMap()
Definition MemSSA.h:405
u32_t getCallSiteChiNum() const
Definition MemSSA.cpp:543
static double timeOfGeneratingMemRegions
Statistics.
Definition MemSSA.h:107
static double timeOfInsertingPHI
Time for inserting phis.
Definition MemSSA.h:109
static double timeOfCreateMUCHI
Time for generating mu/chi for load/store/calls.
Definition MemSSA.h:108
StoreToChiSetMap & getStoreToChiSetMap()
Definition MemSSA.h:409
CallSiteToMUSetMap & getCallSiteToMuSetMap()
Definition MemSSA.h:421
u32_t getFunRetMuNum() const
Definition MemSSA.cpp:509
FunToEntryChiSetMap & getFunToEntryChiSetMap()
Definition MemSSA.h:417
static double timeOfSSARenaming
Time for SSA rename.
Definition MemSSA.h:110
BBToPhiSetMap & getBBToPhiSetMap()
Definition MemSSA.h:429
FunToReturnMuSetMap & getFunToRetMuSetMap()
Definition MemSSA.h:413
u32_t getBBPhiNum() const
Definition MemSSA.cpp:560
u32_t getCallSiteMuNum() const
Definition MemSSA.cpp:526
u32_t getStoreChiNum() const
Definition MemSSA.cpp:475
u32_t getLoadMuNum() const
Stat methods.
Definition MemSSA.cpp:458
MRGenerator * getMRGenerator()
Return MRGenerator.
Definition MemSSA.h:313
CallSiteToCHISetMap & getCallSiteToChiSetMap()
Definition MemSSA.h:425
NUMStatMap PTNumStatMap
Definition SVFStat.h:77
virtual void endClk()
Definition SVFStat.h:63
TIMEStatMap timeStatMap
Definition SVFStat.h:78
double endTime
Definition SVFStat.h:81
double startTime
Definition SVFStat.h:80
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ printStat()

void MemSSAStat::printStat ( std::string  str = "")
overridevirtual

Print statistics

Reimplemented from SVF::SVFStat.

Definition at line 128 of file SVFGStat.cpp.

129{
130 PTAStat::printStat("Memory SSA Statistics");
131}
virtual void printStat(std::string str="")
Definition SVFStat.cpp:67

Member Data Documentation

◆ mssa

MemSSA* SVF::MemSSAStat::mssa
private

Definition at line 88 of file SVFGStat.h.

◆ NumOfAveragePtsInRegion

const char * MemSSAStat::NumOfAveragePtsInRegion = "AverageRegSize"
static

Number of average points-to set in region.

Definition at line 59 of file SVFGStat.h.

◆ NumOfBBHasMSSAPhi

const char * MemSSAStat::NumOfBBHasMSSAPhi = "BBHasMSSAPhi"
static

Number of basic blocks which have mssa phi.

Definition at line 75 of file SVFGStat.h.

◆ NumOfCSChi

const char * MemSSAStat::NumOfCSChi = "CSChiNode"
static

Number of call site chi.

Definition at line 63 of file SVFGStat.h.

◆ NumOfCSHasChi

const char * MemSSAStat::NumOfCSHasChi = "CSHasChi"
static

Number of call sites which have chi.

Definition at line 71 of file SVFGStat.h.

◆ NumOfCSHasMu

const char * MemSSAStat::NumOfCSHasMu = "CSHasMu"
static

Number of call sites which have mu.

Definition at line 72 of file SVFGStat.h.

◆ NumOfCSMu

const char * MemSSAStat::NumOfCSMu = "CSMuNode"
static

Number of call site mu.

Definition at line 64 of file SVFGStat.h.

◆ NumOfEntryChi

const char * MemSSAStat::NumOfEntryChi = "FunEntryChi"
static

Number of function entry chi.

Definition at line 61 of file SVFGStat.h.

◆ NumOfFunHasEntryChi

const char * MemSSAStat::NumOfFunHasEntryChi = "FunHasEntryChi"
static

Number of functions which have entry chi.

Definition at line 69 of file SVFGStat.h.

◆ NumOfFunHasRetMu

const char * MemSSAStat::NumOfFunHasRetMu = "FunHasRetMu"
static

Number of functions which have return mu.

Definition at line 70 of file SVFGStat.h.

◆ NumOfLoadHasMu

const char * MemSSAStat::NumOfLoadHasMu = "LoadHasMu"
static

Number of loads which have mu.

Definition at line 73 of file SVFGStat.h.

◆ NumOfLoadMu

const char * MemSSAStat::NumOfLoadMu = "LoadMuNode"
static

Number of load mu.

Definition at line 65 of file SVFGStat.h.

◆ NumOfMaxRegion

const char * MemSSAStat::NumOfMaxRegion = "MaxRegSize"
static

Number of max points-to set in region.

Definition at line 58 of file SVFGStat.h.

◆ NumOfMemRegions

const char * MemSSAStat::NumOfMemRegions = "MemRegions"
static

Number of memory regions.

Definition at line 60 of file SVFGStat.h.

◆ NumOfMSSAPhi

const char * MemSSAStat::NumOfMSSAPhi = "MSSAPhi"
static

Number of mssa phi.

Number of non-top level ptr phi.

Definition at line 67 of file SVFGStat.h.

◆ NumOfRetMu

const char * MemSSAStat::NumOfRetMu = "FunRetMu"
static

Number of function return mu.

Definition at line 62 of file SVFGStat.h.

◆ NumOfStoreChi

const char * MemSSAStat::NumOfStoreChi = "StoreChiNode"
static

Number of store chi.

Definition at line 66 of file SVFGStat.h.

◆ NumOfStoreHasChi

const char * MemSSAStat::NumOfStoreHasChi = "StoreHasChi"
static

Number of stores which have chi.

Definition at line 74 of file SVFGStat.h.

◆ TimeOfCreateMUCHI

const char * MemSSAStat::TimeOfCreateMUCHI = "GenMUCHITime"
static

Time for generating mu/chi for load/store/calls.

Definition at line 54 of file SVFGStat.h.

◆ TimeOfGeneratingMemRegions

const char * MemSSAStat::TimeOfGeneratingMemRegions = "GenRegionTime"
static

Time for allocating regions.

Definition at line 53 of file SVFGStat.h.

◆ TimeOfInsertingPHI

const char * MemSSAStat::TimeOfInsertingPHI = "InsertPHITime"
static

Time for inserting phis.

Definition at line 55 of file SVFGStat.h.

◆ TimeOfSSARenaming

const char * MemSSAStat::TimeOfSSARenaming = "SSARenameTime"
static

Time for SSA rename.

Definition at line 56 of file SVFGStat.h.

◆ TotalTimeOfConstructMemSSA

const char * MemSSAStat::TotalTimeOfConstructMemSSA = "TotalMSSATime"
static

Total time for constructing memory SSA.

Definition at line 52 of file SVFGStat.h.


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