49 &&
"PTAStat: unknown clock type!");
58 return std::chrono::duration<double, std::milli>(
59 std::chrono::steady_clock::now().time_since_epoch()
67 assert(
false &&
"PTAStat::getClk: unknown clock type");
81 SVFUtil::outs() <<
"\n*********" << statname <<
"***************\n";
84 unsigned field_width = 20;
89 std::cout << std::setw(field_width) << it->first << it->second <<
"\n";
93 SVFUtil::outs() <<
"----------------Time and memory stats--------------------\n";
97 SVFUtil::outs() << std::setw(field_width) << it->first << it->second <<
"\n";
101 SVFUtil::outs() <<
"----------------Numbers stats----------------------------\n";
105 SVFUtil::outs() << std::setw(field_width) << it->first << it->second <<
"\n";
107 SVFUtil::outs() <<
"#######################################################" << std::endl;
122 u32_t numOfFunction = 0;
123 u32_t numOfGlobal = 0;
124 u32_t numOfStack = 0;
126 u32_t numOfHasVarArray = 0;
127 u32_t numOfHasVarStruct = 0;
128 u32_t numOfHasConstArray = 0;
129 u32_t numOfHasConstStruct = 0;
130 u32_t numOfScalar = 0;
131 u32_t numOfConstant = 0;
132 u32_t fiObjNumber = 0;
133 u32_t fsObjNumber = 0;
141 if (memObjSet.insert(mem->
getId()).second ==
false)
164 numOfHasConstArray++;
166 numOfHasConstStruct++;
228 u32_t numOfBB_2Succ = 0;
229 u32_t numOfBB_3Succ = 0;
234 bbIt != bbEit; ++bbIt)
240 else if (numOfSucc > 2)
bool isFunction() const
object attributes methods
bool isConstDataOrConstGlobal() const
bool isConstantStruct() const
NodeID getId() const
Get the memory object id.
bool isBlackHoleObj() const
Whether it is a black hole object.
bool isFieldInsensitive() const
Return true if its field limit is 0.
const SVFType * getType() const
Get obj type.
bool isConstantArray() const
BasicBlockGraph::IDToNodeMapTy::const_iterator const_bb_iterator
const_bb_iterator begin() const
const_bb_iterator end() const
iterator begin()
Iterators.
IDToNodeMapTy::iterator iterator
static const Option< bool > MarkedClocksOnly
static const OptionMap< SVFStat::ClockType > ClockType
u32_t getMaxStructSize() const
u32_t getPTAPAGEdgeNum() const
u32_t getSVFStmtNum() const
static PAG * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
const BaseObjVar * getBaseObject(NodeID id) const
u32_t getFieldObjNodeNum() const
SVFStmt::SVFStmtSetTy & getSVFStmtSet(SVFStmt::PEDGEK kind)
Get/set methods to get SVFStmts based on their kinds and ICFGNodes.
const CallSiteToFunPtrMap & getIndirectCallsites() const
Add/get indirect callsites.
const CallSiteSet & getCallSiteSet() const
Get all callsites.
u32_t getNumSuccessors() const
virtual void printStat(std::string str="")
static bool printGeneralStats
SVF's general statistics are only printed once even if you run multiple anayses.
virtual void performStat()=0
static double timeOfBuildingLLVMModule
static double timeOfBuildingPAG
static double getClk(bool mark=false)
static double timeOfBuildingSymbolTable
LLVM_NODISCARD bool isa(const Y &Val)
std::ostream & outs()
Overwrite llvm::outs().
LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > dyn_cast(const Y &Val)
std::vector< std::string > split(const std::string &s, char separator)
Split into two substrings around the first occurrence of a separator string.
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set