Static Value-Flow Analysis
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
SVF::MRGenerator Class Reference

#include <MemRegion.h>

Inheritance diagram for SVF::MRGenerator:
SVF::DistinctMRG SVF::IntraDisjointMRG SVF::InterDisjointMRG

Public Types

typedef FIFOWorkList< NodeIDWorkList
 
typedef OrderedSet< const MemRegion *, MemRegion::equalMemRegionMRSet
 Get typedef from Pointer Analysis. More...
 
typedef Map< const PAGEdge *, const SVFFunction * > PAGEdgeToFunMap
 
typedef OrderedSet< NodeBS, SVFUtil::equalNodeBSPointsToList
 
typedef Map< const SVFFunction *, NodeBSFunToPointsToMap
 
typedef Map< const SVFFunction *, PointsToListFunToPointsTosMap
 
typedef OrderedMap< NodeBS, NodeBS, SVFUtil::equalNodeBSPtsToRepPtsSetMap
 
typedef Map< const SVFFunction *, MRSetFunToMRsMap
 Map a function to its region set. More...
 
typedef Map< const LoadStmt *, MRSetLoadsToMRsMap
 
typedef Map< const StoreStmt *, MRSetStoresToMRsMap
 
typedef Map< const CallICFGNode *, MRSetCallSiteToMRsMap
 
typedef Map< const LoadStmt *, NodeBSLoadsToPointsToMap
 Map loads/stores/callsites to their cpts set. More...
 
typedef Map< const StoreStmt *, NodeBSStoresToPointsToMap
 
typedef Map< const CallICFGNode *, NodeBSCallSiteToPointsToMap
 
typedef Map< const SVFFunction *, NodeBSFunToNodeBSMap
 Maps Mod-Ref analysis. More...
 
typedef Map< const CallICFGNode *, NodeBSCallSiteToNodeBSMap
 Map a callsite to its indirect refs/mods of memory objects. More...
 
typedef Map< NodeID, NodeBSNodeToPTSSMap
 
typedef SVFIR::SVFStmtList SVFStmtList
 SVFIR edge list. More...
 
typedef SCCDetection< PTACallGraph * > SCC
 Call Graph SCC. More...
 

Public Member Functions

MRSetgetMRSet ()
 
const NodeBSgetRepPointsTo (const NodeBS &cpts) const
 Get superset cpts set. More...
 
const MemRegiongetMR (const NodeBS &cpts) const
 Get a memory region according to cpts. More...
 
u32_t getMRNum () const
 
virtual ~MRGenerator ()
 Destructor. More...
 
virtual void generateMRs ()
 Start generating memory regions. More...
 
const SVFFunctiongetFunction (const PAGEdge *pagEdge) const
 Get the function which SVFIR Edge located. More...
 
MRSetgetFunMRSet (const SVFFunction *fun)
 Get Memory Region set. More...
 
MRSetgetLoadMRSet (const LoadStmt *load)
 
MRSetgetStoreMRSet (const StoreStmt *store)
 
bool hasRefMRSet (const CallICFGNode *cs)
 
bool hasModMRSet (const CallICFGNode *cs)
 
MRSetgetCallSiteRefMRSet (const CallICFGNode *cs)
 
MRSetgetCallSiteModMRSet (const CallICFGNode *cs)
 
bool hasSVFStmtList (const ICFGNode *icfgNode)
 Whether this instruction has SVFIR Edge. More...
 
SVFStmtListgetPAGEdgesFromInst (const ICFGNode *node)
 Given an instruction, get all its the PAGEdge (statement) in sequence. More...
 
NodeBS getModInfoForCall (const CallICFGNode *cs)
 getModRefInfo APIs More...
 
NodeBS getRefInfoForCall (const CallICFGNode *cs)
 
ModRefInfo getModRefInfo (const CallICFGNode *cs)
 
ModRefInfo getModRefInfo (const CallICFGNode *cs, const SVFValue *V)
 
ModRefInfo getModRefInfo (const CallICFGNode *cs1, const CallICFGNode *cs2)
 

Protected Member Functions

 MRGenerator (BVDataPTAImpl *p, bool ptrOnly)
 
void createMR (const SVFFunction *fun, const NodeBS &cpts)
 Generate a memory region and put in into functions which use it. More...
 
void collectGlobals ()
 Collect all global variables for later escape analysis. More...
 
virtual void collectModRefForLoadStore ()
 Generate regions for loads/stores. More...
 
virtual void collectModRefForCall ()
 Generate regions for calls/rets. More...
 
virtual void partitionMRs ()
 Partition regions. More...
 
virtual void updateAliasMRs ()
 Update aliased regions for loads/stores/callsites. More...
 
virtual void sortPointsTo (const NodeBS &cpts)
 Given a condition pts, insert into cptsToRepCPtsMap for region generation. More...
 
virtual bool isAliasedMR (const NodeBS &cpts, const MemRegion *mr)
 Whether a region is aliased with a conditional points-to. More...
 
virtual void getAliasMemRegions (MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *fun)
 Get all aliased mem regions from function fun according to cpts. More...
 
virtual void getMRsForLoad (MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *)
 Get memory regions for a load statement according to cpts. More...
 
virtual void getMRsForCallSiteRef (MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *)
 Get memory regions for call site ref according to cpts. More...
 
virtual void modRefAnalysis (PTACallGraphNode *callGraphNode, WorkList &worklist)
 Mod-Ref analysis for callsite invoking this callGraphNode. More...
 
virtual bool handleCallsiteModRef (NodeBS &mod, NodeBS &ref, const CallICFGNode *cs, const SVFFunction *fun)
 Get Mod-Ref of a callee function. More...
 
void addCPtsToStore (NodeBS &cpts, const StoreStmt *st, const SVFFunction *fun)
 Add cpts to store/load. More...
 
void addCPtsToLoad (NodeBS &cpts, const LoadStmt *ld, const SVFFunction *fun)
 
void addCPtsToCallSiteRefs (NodeBS &cpts, const CallICFGNode *cs)
 
void addCPtsToCallSiteMods (NodeBS &cpts, const CallICFGNode *cs)
 
bool hasCPtsList (const SVFFunction *fun) const
 
PointsToListgetPointsToList (const SVFFunction *fun)
 
FunToPointsTosMapgetFunToPointsToList ()
 
void addRefSideEffectOfFunction (const SVFFunction *fun, const NodeBS &refs)
 Add/Get methods for side-effect of functions and callsites. More...
 
void addModSideEffectOfFunction (const SVFFunction *fun, const NodeBS &mods)
 Add indirect def an memory object in the function. More...
 
bool addRefSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &refs)
 Add indirect uses an memory object in the function. More...
 
bool addModSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &mods)
 Add indirect def an memory object in the function. More...
 
const NodeBSgetRefSideEffectOfFunction (const SVFFunction *fun)
 Get indirect refs of a function. More...
 
const NodeBSgetModSideEffectOfFunction (const SVFFunction *fun)
 Get indirect mods of a function. More...
 
const NodeBSgetRefSideEffectOfCallSite (const CallICFGNode *cs)
 Get indirect refs of a callsite. More...
 
const NodeBSgetModSideEffectOfCallSite (const CallICFGNode *cs)
 Get indirect mods of a callsite. More...
 
bool hasRefSideEffectOfCallSite (const CallICFGNode *cs)
 Has indirect refs of a callsite. More...
 
bool hasModSideEffectOfCallSite (const CallICFGNode *cs)
 Has indirect mods of a callsite. More...
 

Protected Attributes

MRSet memRegSet
 A set of All memory regions. More...
 
PtsToRepPtsSetMap cptsToRepCPtsMap
 Map a condition pts to its rep conditional pts (super set points-to) More...
 

Private Member Functions

void destroy ()
 Clean up memory. More...
 
void collectCallSitePts (const CallICFGNode *cs)
 
NodeBSCollectPtsChain (NodeID id)
 
NodeBSgetCallSiteArgsPts (const CallICFGNode *cs)
 Return the pts chain of all callsite arguments. More...
 
NodeBSgetCallSiteRetPts (const CallICFGNode *cs)
 Return the pts chain of the return parameter of the callsite. More...
 
bool isNonLocalObject (NodeID id, const SVFFunction *curFun) const
 
void getEscapObjviaGlobals (NodeBS &globs, const NodeBS &pts)
 Get all the objects in callee's modref escaped via global objects (the chain pts of globals) More...
 
void getCallGraphSCCRevTopoOrder (WorkList &worklist)
 Get reverse topo call graph scc. More...
 

Private Attributes

BVDataPTAImplpta
 
SCCcallGraphSCC
 
PTACallGraphcallGraph
 
bool ptrOnlyMSSA
 
FunToMRsMap funToMRsMap
 Map a function to all its memory regions. More...
 
LoadsToMRsMap loadsToMRsMap
 Map a load SVFIR Edge to its memory regions sets in order for inserting mus in Memory SSA. More...
 
StoresToMRsMap storesToMRsMap
 Map a store SVFIR Edge to its memory regions sets in order for inserting chis in Memory SSA. More...
 
CallSiteToMRsMap callsiteToRefMRsMap
 Map a callsite to its refs regions. More...
 
CallSiteToMRsMap callsiteToModMRsMap
 Map a callsite to its mods regions. More...
 
LoadsToPointsToMap loadsToPointsToMap
 Map a load SVFIR Edge to its CPts set map. More...
 
StoresToPointsToMap storesToPointsToMap
 Map a store SVFIR Edge to its CPts set map. More...
 
CallSiteToPointsToMap callsiteToRefPointsToMap
 Map a callsite to it refs cpts set. More...
 
CallSiteToPointsToMap callsiteToModPointsToMap
 Map a callsite to it mods cpts set. More...
 
FunToPointsTosMap funToPointsToMap
 Map a function to all of its conditional points-to sets. More...
 
PAGEdgeToFunMap pagEdgeToFunMap
 Map a PAGEdge to its fun. More...
 
FunToPointsToMap funToRefsMap
 Map a function to its indirect uses of memory objects. More...
 
FunToPointsToMap funToModsMap
 Map a function to its indirect defs of memory objects. More...
 
CallSiteToPointsToMap csToRefsMap
 Map a callsite to its indirect uses of memory objects. More...
 
CallSiteToPointsToMap csToModsMap
 Map a callsite to its indirect defs of memory objects. More...
 
CallSiteToPointsToMap csToCallSiteArgsPtsMap
 Map a callsite to all its object might pass into its callees. More...
 
CallSiteToPointsToMap csToCallSiteRetPtsMap
 Map a callsite to all its object might return from its callees. More...
 
NodeToPTSSMap cachedPtsChainMap
 Map a pointer to its cached points-to chain;. More...
 
NodeBS allGlobals
 All global variable SVFIR node ids. More...
 

Detailed Description

Memory Region Partitioning

Definition at line 131 of file MemRegion.h.

Member Typedef Documentation

◆ CallSiteToMRsMap

Definition at line 155 of file MemRegion.h.

◆ CallSiteToNodeBSMap

Map a callsite to its indirect refs/mods of memory objects.

Definition at line 170 of file MemRegion.h.

◆ CallSiteToPointsToMap

Definition at line 162 of file MemRegion.h.

◆ FunToMRsMap

Map a function to its region set.

Definition at line 149 of file MemRegion.h.

◆ FunToNodeBSMap

Maps Mod-Ref analysis.

Map a function to its indirect refs/mods of memory objects

Definition at line 168 of file MemRegion.h.

◆ FunToPointsToMap

Definition at line 144 of file MemRegion.h.

◆ FunToPointsTosMap

Definition at line 145 of file MemRegion.h.

◆ LoadsToMRsMap

Map loads/stores to its mem regions, TODO:visitAtomicCmpXchgInst, visitAtomicRMWInst??

Definition at line 153 of file MemRegion.h.

◆ LoadsToPointsToMap

Map loads/stores/callsites to their cpts set.

Definition at line 160 of file MemRegion.h.

◆ MRSet

Get typedef from Pointer Analysis.

Define mem region set

Definition at line 141 of file MemRegion.h.

◆ NodeToPTSSMap

Definition at line 173 of file MemRegion.h.

◆ PAGEdgeToFunMap

Definition at line 142 of file MemRegion.h.

◆ PointsToList

Definition at line 143 of file MemRegion.h.

◆ PtsToRepPtsSetMap

Definition at line 146 of file MemRegion.h.

◆ SCC

Call Graph SCC.

Definition at line 178 of file MemRegion.h.

◆ StoresToMRsMap

Definition at line 154 of file MemRegion.h.

◆ StoresToPointsToMap

Definition at line 161 of file MemRegion.h.

◆ SVFStmtList

SVFIR edge list.

Definition at line 176 of file MemRegion.h.

◆ WorkList

Definition at line 135 of file MemRegion.h.

Constructor & Destructor Documentation

◆ MRGenerator()

MRGenerator::MRGenerator ( BVDataPTAImpl p,
bool  ptrOnly 
)
protected

Definition at line 41 of file MemRegion.cpp.

41  :
42  pta(p), ptrOnlyMSSA(ptrOnly)
43 {
45  callGraphSCC = new SCC(callGraph);
46 }
cJSON * p
Definition: cJSON.cpp:2559
PTACallGraph * callGraph
Definition: MemRegion.h:199
SCC * callGraphSCC
Definition: MemRegion.h:198
SCCDetection< PTACallGraph * > SCC
Call Graph SCC.
Definition: MemRegion.h:178
BVDataPTAImpl * pta
Definition: MemRegion.h:197
PTACallGraph * getCallGraph() const
Return call graph.

◆ ~MRGenerator()

virtual SVF::MRGenerator::~MRGenerator ( )
inlinevirtual

Destructor.

Definition at line 426 of file MemRegion.h.

427  {
428  destroy();
429  }
void destroy()
Clean up memory.
Definition: MemRegion.cpp:51

Member Function Documentation

◆ addCPtsToCallSiteMods()

void SVF::MRGenerator::addCPtsToCallSiteMods ( NodeBS cpts,
const CallICFGNode cs 
)
inlineprotected

Definition at line 358 of file MemRegion.h.

359  {
360  callsiteToModPointsToMap[cs] |= cpts;
361  funToPointsToMap[cs->getCaller()].insert(cpts);
362  }
FunToPointsTosMap funToPointsToMap
Map a function to all of its conditional points-to sets.
Definition: MemRegion.h:222
CallSiteToPointsToMap callsiteToModPointsToMap
Map a callsite to it mods cpts set.
Definition: MemRegion.h:219

◆ addCPtsToCallSiteRefs()

void SVF::MRGenerator::addCPtsToCallSiteRefs ( NodeBS cpts,
const CallICFGNode cs 
)
inlineprotected

Definition at line 353 of file MemRegion.h.

354  {
355  callsiteToRefPointsToMap[cs] |= cpts;
356  funToPointsToMap[cs->getCaller()].insert(cpts);
357  }
CallSiteToPointsToMap callsiteToRefPointsToMap
Map a callsite to it refs cpts set.
Definition: MemRegion.h:217

◆ addCPtsToLoad()

void SVF::MRGenerator::addCPtsToLoad ( NodeBS cpts,
const LoadStmt ld,
const SVFFunction fun 
)
inlineprotected

Definition at line 347 of file MemRegion.h.

348  {
349  loadsToPointsToMap[ld] = cpts;
350  funToPointsToMap[fun].insert(cpts);
351  addRefSideEffectOfFunction(fun,cpts);
352  }
void addRefSideEffectOfFunction(const SVFFunction *fun, const NodeBS &refs)
Add/Get methods for side-effect of functions and callsites.
Definition: MemRegion.cpp:404
LoadsToPointsToMap loadsToPointsToMap
Map a load SVFIR Edge to its CPts set map.
Definition: MemRegion.h:213

◆ addCPtsToStore()

void SVF::MRGenerator::addCPtsToStore ( NodeBS cpts,
const StoreStmt st,
const SVFFunction fun 
)
inlineprotected

Add cpts to store/load.

Definition at line 341 of file MemRegion.h.

342  {
343  storesToPointsToMap[st] = cpts;
344  funToPointsToMap[fun].insert(cpts);
345  addModSideEffectOfFunction(fun,cpts);
346  }
void addModSideEffectOfFunction(const SVFFunction *fun, const NodeBS &mods)
Add indirect def an memory object in the function.
Definition: MemRegion.cpp:416
StoresToPointsToMap storesToPointsToMap
Map a store SVFIR Edge to its CPts set map.
Definition: MemRegion.h:215

◆ addModSideEffectOfCallSite()

bool MRGenerator::addModSideEffectOfCallSite ( const CallICFGNode cs,
const NodeBS mods 
)
protected

Add indirect def an memory object in the function.

Add indirect def an memory object in the function

Definition at line 444 of file MemRegion.cpp.

445 {
446  if(!mods.empty())
447  {
448  NodeBS modset = mods;
449  modset &= (getCallSiteArgsPts(cs) | getCallSiteRetPts(cs));
450  getEscapObjviaGlobals(modset,mods);
452  return csToModsMap[cs] |= modset;
453  }
454  return false;
455 }
const SVFFunction * getCaller() const
Return callsite.
Definition: ICFGNode.h:470
CallSiteToPointsToMap csToModsMap
Map a callsite to its indirect defs of memory objects.
Definition: MemRegion.h:233
NodeBS & getCallSiteRetPts(const CallICFGNode *cs)
Return the pts chain of the return parameter of the callsite.
Definition: MemRegion.h:260
NodeBS & getCallSiteArgsPts(const CallICFGNode *cs)
Return the pts chain of all callsite arguments.
Definition: MemRegion.h:255
void getEscapObjviaGlobals(NodeBS &globs, const NodeBS &pts)
Get all the objects in callee's modref escaped via global objects (the chain pts of globals)
Definition: MemRegion.cpp:558

◆ addModSideEffectOfFunction()

void MRGenerator::addModSideEffectOfFunction ( const SVFFunction fun,
const NodeBS mods 
)
protected

Add indirect def an memory object in the function.

Add indirect def an memory object in the function

Definition at line 416 of file MemRegion.cpp.

417 {
418  for(NodeBS::iterator it = mods.begin(), eit = mods.end(); it!=eit; ++it)
419  {
420  if(isNonLocalObject(*it,fun))
421  funToModsMap[fun].set(*it);
422  }
423 }
FunToPointsToMap funToModsMap
Map a function to its indirect defs of memory objects.
Definition: MemRegion.h:229
bool isNonLocalObject(NodeID id, const SVFFunction *curFun) const
Definition: MemRegion.cpp:574
iterator end() const
iterator begin() const

◆ addRefSideEffectOfCallSite()

bool MRGenerator::addRefSideEffectOfCallSite ( const CallICFGNode cs,
const NodeBS refs 
)
protected

Add indirect uses an memory object in the function.

Add indirect uses an memory object in the function

Definition at line 428 of file MemRegion.cpp.

429 {
430  if(!refs.empty())
431  {
432  NodeBS refset = refs;
433  refset &= getCallSiteArgsPts(cs);
434  getEscapObjviaGlobals(refset,refs);
436  return csToRefsMap[cs] |= refset;
437  }
438  return false;
439 }
CallSiteToPointsToMap csToRefsMap
Map a callsite to its indirect uses of memory objects.
Definition: MemRegion.h:231

◆ addRefSideEffectOfFunction()

void MRGenerator::addRefSideEffectOfFunction ( const SVFFunction fun,
const NodeBS refs 
)
protected

Add/Get methods for side-effect of functions and callsites.

Add indirect uses an memory object in the function

Definition at line 404 of file MemRegion.cpp.

405 {
406  for(NodeBS::iterator it = refs.begin(), eit = refs.end(); it!=eit; ++it)
407  {
408  if(isNonLocalObject(*it,fun))
409  funToRefsMap[fun].set(*it);
410  }
411 }
FunToPointsToMap funToRefsMap
Map a function to its indirect uses of memory objects.
Definition: MemRegion.h:227

◆ collectCallSitePts()

void MRGenerator::collectCallSitePts ( const CallICFGNode cs)
private

Get all objects might pass into and pass out of callee(s) from a callsite

collect the pts chain of the callsite arguments

collect the pts chain of the return argument

Definition at line 476 of file MemRegion.cpp.

477 {
479  NodeBS& argsPts = csToCallSiteArgsPtsMap[cs];
480  SVFIR* pag = pta->getPAG();
481  CallICFGNode* callBlockNode = const_cast<CallICFGNode*>(cs);
482  const RetICFGNode* retBlockNode = cs->getRetICFGNode();
483 
484  WorkList worklist;
485  if (pag->hasCallSiteArgsMap(callBlockNode))
486  {
487  const SVFIR::SVFVarList& args = pta->getPAG()->getCallSiteArgsList(callBlockNode);
488  for(SVFIR::SVFVarList::const_iterator itA = args.begin(), ieA = args.end(); itA!=ieA; ++itA)
489  {
490  const PAGNode* node = *itA;
491  if(node->isPointer())
492  worklist.push(node->getId());
493  }
494  }
495 
496  while(!worklist.empty())
497  {
498  NodeID nodeId = worklist.pop();
499  const NodeBS& tmp = pta->getPts(nodeId).toNodeBS();
500  for(NodeBS::iterator it = tmp.begin(), eit = tmp.end(); it!=eit; ++it)
501  argsPts |= CollectPtsChain(*it);
502  }
503 
505  NodeBS& retPts = csToCallSiteRetPtsMap[cs];
506 
507  if (pta->getPAG()->callsiteHasRet(retBlockNode))
508  {
509  const PAGNode* node = pta->getPAG()->getCallSiteRet(retBlockNode);
510  if(node->isPointer())
511  {
512  const NodeBS& tmp = pta->getPts(node->getId()).toNodeBS();
513  for(NodeBS::iterator it = tmp.begin(), eit = tmp.end(); it!=eit; ++it)
514  retPts |= CollectPtsChain(*it);
515  }
516  }
517 
518 }
const PointsTo & getPts(NodeID id) override
const RetICFGNode * getRetICFGNode() const
Return callsite.
Definition: ICFGNode.h:457
CallSiteToPointsToMap csToCallSiteRetPtsMap
Map a callsite to all its object might return from its callees.
Definition: MemRegion.h:237
FIFOWorkList< NodeID > WorkList
Definition: MemRegion.h:135
NodeBS & CollectPtsChain(NodeID id)
Definition: MemRegion.cpp:524
CallSiteToPointsToMap csToCallSiteArgsPtsMap
Map a callsite to all its object might pass into its callees.
Definition: MemRegion.h:235
SVFIR * getPAG() const
NodeBS toNodeBS() const
Returns this points-to set as a NodeBS.
Definition: PointsTo.cpp:313
NodeID getId() const
Get ID.
Definition: GenericGraph.h:260
const SVFVarList & getCallSiteArgsList(const CallICFGNode *cs) const
Get callsite argument list.
Definition: SVFIR.h:292
const SVFVar * getCallSiteRet(const RetICFGNode *cs) const
Get callsite return.
Definition: SVFIR.h:304
std::vector< const SVFVar * > SVFVarList
Definition: SVFIR.h:59
bool hasCallSiteArgsMap(const CallICFGNode *cs) const
Callsite has argument list.
Definition: SVFIR.h:282
bool callsiteHasRet(const RetICFGNode *cs) const
Definition: SVFIR.h:310
virtual bool isPointer() const
Whether it is a pointer.
Definition: SVFVariables.h:106
u32_t NodeID
Definition: GeneralType.h:55

◆ collectGlobals()

void MRGenerator::collectGlobals ( )
protected

Collect all global variables for later escape analysis.

Collect globals for escape analysis

Definition at line 104 of file MemRegion.cpp.

105 {
106  SVFIR* pag = pta->getPAG();
107  for (SVFIR::iterator nIter = pag->begin(); nIter != pag->end(); ++nIter)
108  {
109  if(ObjVar* obj = SVFUtil::dyn_cast<ObjVar>(nIter->second))
110  {
111  if (obj->getMemObj()->isGlobalObj())
112  {
113  allGlobals.set(nIter->first);
114  allGlobals |= CollectPtsChain(nIter->first);
115  }
116  }
117  }
118 }
iterator begin()
Iterators.
Definition: GenericGraph.h:627
IDToNodeMapTy::iterator iterator
Node Iterators.
Definition: GenericGraph.h:606
NodeBS allGlobals
All global variable SVFIR node ids.
Definition: MemRegion.h:243
void set(unsigned Idx)

◆ collectModRefForCall()

void MRGenerator::collectModRefForCall ( )
protectedvirtual

Generate regions for calls/rets.

Generate memory regions for calls

collect points-to information for callsites

handle all sub scc nodes of this rep node

Get mod-ref of all callsites calling callGraphNode

mods are treated as both def and use of memory objects

Definition at line 226 of file MemRegion.cpp.

227 {
228 
229  DBOUT(DGENERAL, outs() << pasMsg("\t\tCollect Callsite PointsTo \n"));
230 
232  for(SVFIR::CallSiteSet::const_iterator it = pta->getPAG()->getCallSiteSet().begin(),
233  eit = pta->getPAG()->getCallSiteSet().end(); it!=eit; ++it)
234  {
235  collectCallSitePts((*it));
236  }
237 
238  DBOUT(DGENERAL, outs() << pasMsg("\t\tPerform Callsite Mod-Ref \n"));
239 
240  WorkList worklist;
241  getCallGraphSCCRevTopoOrder(worklist);
242 
243  while(!worklist.empty())
244  {
245  NodeID callGraphNodeID = worklist.pop();
247  const NodeBS& subNodes = callGraphSCC->subNodes(callGraphNodeID);
248  for(NodeBS::iterator it = subNodes.begin(), eit = subNodes.end(); it!=eit; ++it)
249  {
250  PTACallGraphNode* subCallGraphNode = callGraph->getCallGraphNode(*it);
252  modRefAnalysis(subCallGraphNode,worklist);
253  }
254  }
255 
256  DBOUT(DGENERAL, outs() << pasMsg("\t\tAdd PointsTo to Callsites \n"));
257 
258  for (const CallICFGNode* callBlockNode : pta->getPAG()->getCallSiteSet())
259  {
260  if(hasRefSideEffectOfCallSite(callBlockNode))
261  {
262  NodeBS refs = getRefSideEffectOfCallSite(callBlockNode);
263  addCPtsToCallSiteRefs(refs,callBlockNode);
264  }
265  if(hasModSideEffectOfCallSite(callBlockNode))
266  {
267  NodeBS mods = getModSideEffectOfCallSite(callBlockNode);
269  addCPtsToCallSiteMods(mods,callBlockNode);
270  addCPtsToCallSiteRefs(mods,callBlockNode);
271  }
272  }
273 }
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
Definition: SVFType.h:484
#define DGENERAL
Definition: SVFType.h:490
const NodeBS & getModSideEffectOfCallSite(const CallICFGNode *cs)
Get indirect mods of a callsite.
Definition: MemRegion.h:403
bool hasModSideEffectOfCallSite(const CallICFGNode *cs)
Has indirect mods of a callsite.
Definition: MemRegion.h:413
const NodeBS & getRefSideEffectOfCallSite(const CallICFGNode *cs)
Get indirect refs of a callsite.
Definition: MemRegion.h:398
void addCPtsToCallSiteRefs(NodeBS &cpts, const CallICFGNode *cs)
Definition: MemRegion.h:353
bool hasRefSideEffectOfCallSite(const CallICFGNode *cs)
Has indirect refs of a callsite.
Definition: MemRegion.h:408
void collectCallSitePts(const CallICFGNode *cs)
Definition: MemRegion.cpp:476
void getCallGraphSCCRevTopoOrder(WorkList &worklist)
Get reverse topo call graph scc.
Definition: MemRegion.cpp:461
void addCPtsToCallSiteMods(NodeBS &cpts, const CallICFGNode *cs)
Definition: MemRegion.h:358
virtual void modRefAnalysis(PTACallGraphNode *callGraphNode, WorkList &worklist)
Mod-Ref analysis for callsite invoking this callGraphNode.
Definition: MemRegion.cpp:632
PTACallGraphNode * getCallGraphNode(NodeID id) const
Get call graph node.
Definition: PTACallGraph.h:339
const NodeBS & subNodes(NodeID n) const
get all subnodes in one scc, if size is empty insert itself into the set
Definition: SCC.h:173
const CallSiteSet & getCallSiteSet() const
Get all callsites.
Definition: SVFIR.h:254
std::string pasMsg(const std::string &msg)
Print each pass/phase message by converting a string into blue string output.
Definition: SVFUtil.cpp:99
std::ostream & outs()
Overwrite llvm::outs()
Definition: SVFUtil.h:50

◆ collectModRefForLoadStore()

void MRGenerator::collectModRefForLoadStore ( )
protectedvirtual

Generate regions for loads/stores.

Generate memory regions for loads/stores

if this function does not have any caller, then we do not care its MSSA

Definition at line 173 of file MemRegion.cpp.

174 {
175 
176  PTACallGraph* svfirCallGraph = PAG::getPAG()->getCallGraph();
177  for (const auto& item: *svfirCallGraph)
178  {
179  const SVFFunction& fun = *item.second->getFunction();
180 
183  continue;
184 
185  for (SVFFunction::const_iterator iter = fun.begin(), eiter = fun.end();
186  iter != eiter; ++iter)
187  {
188  const SVFBasicBlock* bb = *iter;
189  for (const auto& inst: bb->getICFGNodeList())
190  {
191  SVFStmtList& pagEdgeList = getPAGEdgesFromInst(inst);
192  for (SVFStmtList::iterator bit = pagEdgeList.begin(), ebit =
193  pagEdgeList.end(); bit != ebit; ++bit)
194  {
195  const PAGEdge* inst = *bit;
196  pagEdgeToFunMap[inst] = &fun;
197  if (const StoreStmt *st = SVFUtil::dyn_cast<StoreStmt>(inst))
198  {
199  NodeBS cpts(pta->getPts(st->getLHSVarID()).toNodeBS());
200  // TODO: change this assertion check later when we have conditional points-to set
201  if (cpts.empty())
202  continue;
203  assert(!cpts.empty() && "null pointer!!");
204  addCPtsToStore(cpts, st, &fun);
205  }
206 
207  else if (const LoadStmt *ld = SVFUtil::dyn_cast<LoadStmt>(inst))
208  {
209  NodeBS cpts(pta->getPts(ld->getRHSVarID()).toNodeBS());
210  // TODO: change this assertion check later when we have conditional points-to set
211  if (cpts.empty())
212  continue;
213  assert(!cpts.empty() && "null pointer!!");
214  addCPtsToLoad(cpts, ld, &fun);
215  }
216  }
217  }
218  }
219  }
220 }
cJSON * item
Definition: cJSON.h:222
SVFStmtList & getPAGEdgesFromInst(const ICFGNode *node)
Given an instruction, get all its the PAGEdge (statement) in sequence.
Definition: MemRegion.cpp:160
void addCPtsToLoad(NodeBS &cpts, const LoadStmt *ld, const SVFFunction *fun)
Definition: MemRegion.h:347
SVFIR::SVFStmtList SVFStmtList
SVFIR edge list.
Definition: MemRegion.h:176
PAGEdgeToFunMap pagEdgeToFunMap
Map a PAGEdge to its fun.
Definition: MemRegion.h:224
void addCPtsToStore(NodeBS &cpts, const StoreStmt *st, const SVFFunction *fun)
Add cpts to store/load.
Definition: MemRegion.h:341
static const Option< bool > IgnoreDeadFun
Definition: Options.h:139
const std::vector< const ICFGNode * > & getICFGNodeList() const
Definition: SVFValue.h:569
const_iterator end() const
Definition: SVFValue.h:440
const_iterator begin() const
Definition: SVFValue.h:435
bool isUncalledFunction() const
Definition: SVFValue.h:455
std::vector< const SVFBasicBlock * >::const_iterator const_iterator
Definition: SVFValue.h:305
PTACallGraph * getCallGraph()
Definition: SVFIR.h:192
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
Definition: SVFIR.h:115

◆ CollectPtsChain()

NodeBS & MRGenerator::CollectPtsChain ( NodeID  id)
private

Recursively collect all points-to of the whole struct fields

Definition at line 524 of file MemRegion.cpp.

525 {
526  NodeID baseId = pta->getPAG()->getBaseObjVar(id);
527  NodeToPTSSMap::iterator it = cachedPtsChainMap.find(baseId);
528  if(it!=cachedPtsChainMap.end())
529  return it->second;
530  else
531  {
532  NodeBS& pts = cachedPtsChainMap[baseId];
533  pts |= pta->getPAG()->getFieldsAfterCollapse(baseId);
534 
535  WorkList worklist;
536  for(NodeBS::iterator it = pts.begin(), eit = pts.end(); it!=eit; ++it)
537  worklist.push(*it);
538 
539  while(!worklist.empty())
540  {
541  NodeID nodeId = worklist.pop();
542  const NodeBS& tmp = pta->getPts(nodeId).toNodeBS();
543  for(NodeBS::iterator it = tmp.begin(), eit = tmp.end(); it!=eit; ++it)
544  {
545  pts |= CollectPtsChain(*it);
546  }
547  }
548  return pts;
549  }
550 
551 }
bool push(const Data &data)
Definition: WorkList.h:165
NodeToPTSSMap cachedPtsChainMap
Map a pointer to its cached points-to chain;.
Definition: MemRegion.h:240
NodeBS getFieldsAfterCollapse(NodeID id)
Definition: SVFIR.cpp:499
NodeID getBaseObjVar(NodeID id) const
Base and Offset methods for Value and Object node.
Definition: SVFIR.h:455

◆ createMR()

void MRGenerator::createMR ( const SVFFunction fun,
const NodeBS cpts 
)
protected

Generate a memory region and put in into functions which use it.

Generate a memory region and put in into functions which use it

Definition at line 69 of file MemRegion.cpp.

70 {
71  const NodeBS& repCPts = getRepPointsTo(cpts);
72  MemRegion mr(repCPts);
73  MRSet::const_iterator mit = memRegSet.find(&mr);
74  if(mit!=memRegSet.end())
75  {
76  const MemRegion* mr = *mit;
77  MRSet& mrs = funToMRsMap[fun];
78  if(mrs.find(mr)==mrs.end())
79  mrs.insert(mr);
80  }
81  else
82  {
83  MemRegion* m = new MemRegion(repCPts);
84  memRegSet.insert(m);
85  funToMRsMap[fun].insert(m);
86  }
87 }
FunToMRsMap funToMRsMap
Map a function to all its memory regions.
Definition: MemRegion.h:203
OrderedSet< const MemRegion *, MemRegion::equalMemRegion > MRSet
Get typedef from Pointer Analysis.
Definition: MemRegion.h:141
const NodeBS & getRepPointsTo(const NodeBS &cpts) const
Get superset cpts set.
Definition: MemRegion.h:186
MRSet memRegSet
A set of All memory regions.
Definition: MemRegion.h:278
Memory Region class.
Definition: MemRegion.h:56

◆ destroy()

void MRGenerator::destroy ( )
private

Clean up memory.

Clean up memory

Definition at line 51 of file MemRegion.cpp.

52 {
53 
54  for (MRSet::iterator it = memRegSet.begin(), eit = memRegSet.end();
55  it != eit; ++it)
56  {
57  delete *it;
58  }
59 
60  delete callGraphSCC;
61  callGraphSCC = nullptr;
62  callGraph = nullptr;
63  pta = nullptr;
64 }

◆ generateMRs()

void MRGenerator::generateMRs ( )
virtual

Start generating memory regions.

Generate memory regions according to pointer analysis results Attach regions on loads/stores

collect mod-ref for loads/stores

collect mod-ref for calls

Partition memory regions

attach memory regions for loads/stores/calls

Definition at line 124 of file MemRegion.cpp.

125 {
126 
127  DBOUT(DGENERAL, outs() << pasMsg("Generate Memory Regions \n"));
128 
129  collectGlobals();
130 
131  callGraphSCC->find();
132 
133  DBOUT(DGENERAL, outs() << pasMsg("\tCollect ModRef For Load/Store \n"));
134 
137 
138  DBOUT(DGENERAL, outs() << pasMsg("\tCollect ModRef For const CallICFGNode*\n"));
139 
142 
143  DBOUT(DGENERAL, outs() << pasMsg("\tPartition Memory Regions \n"));
145  partitionMRs();
147  updateAliasMRs();
148 }
virtual void collectModRefForLoadStore()
Generate regions for loads/stores.
Definition: MemRegion.cpp:173
virtual void collectModRefForCall()
Generate regions for calls/rets.
Definition: MemRegion.cpp:226
virtual void updateAliasMRs()
Update aliased regions for loads/stores/callsites.
Definition: MemRegion.cpp:345
virtual void partitionMRs()
Partition regions.
Definition: MemRegion.cpp:314
void collectGlobals()
Collect all global variables for later escape analysis.
Definition: MemRegion.cpp:104
void find(void)
Definition: SCC.h:308

◆ getAliasMemRegions()

virtual void SVF::MRGenerator::getAliasMemRegions ( MRSet aliasMRs,
const NodeBS cpts,
const SVFFunction fun 
)
inlineprotectedvirtual

Get all aliased mem regions from function fun according to cpts.

Definition at line 309 of file MemRegion.h.

310  {
311  for(MRSet::const_iterator it = funToMRsMap[fun].begin(), eit = funToMRsMap[fun].end(); it!=eit; ++it)
312  {
313  if(isAliasedMR(cpts,*it))
314  aliasMRs.insert(*it);
315  }
316  }
virtual bool isAliasedMR(const NodeBS &cpts, const MemRegion *mr)
Whether a region is aliased with a conditional points-to.
Definition: MemRegion.h:304

◆ getCallGraphSCCRevTopoOrder()

void MRGenerator::getCallGraphSCCRevTopoOrder ( WorkList worklist)
private

Get reverse topo call graph scc.

Get the reverse topo order of scc call graph

Definition at line 461 of file MemRegion.cpp.

462 {
463 
464  NodeStack& topoOrder = callGraphSCC->topoNodeStack();
465  while(!topoOrder.empty())
466  {
467  NodeID callgraphNodeID = topoOrder.top();
468  topoOrder.pop();
469  worklist.push(callgraphNodeID);
470  }
471 }
GNodeStack & topoNodeStack()
Definition: SCC.h:128
std::stack< NodeID > NodeStack
Definition: GeneralType.h:118

◆ getCallSiteArgsPts()

NodeBS& SVF::MRGenerator::getCallSiteArgsPts ( const CallICFGNode cs)
inlineprivate

Return the pts chain of all callsite arguments.

Definition at line 255 of file MemRegion.h.

256  {
257  return csToCallSiteArgsPtsMap[cs];
258  }

◆ getCallSiteModMRSet()

MRSet& SVF::MRGenerator::getCallSiteModMRSet ( const CallICFGNode cs)
inline

Definition at line 467 of file MemRegion.h.

468  {
469  return callsiteToModMRsMap[cs];
470  }
CallSiteToMRsMap callsiteToModMRsMap
Map a callsite to its mods regions.
Definition: MemRegion.h:211

◆ getCallSiteRefMRSet()

MRSet& SVF::MRGenerator::getCallSiteRefMRSet ( const CallICFGNode cs)
inline

Definition at line 463 of file MemRegion.h.

464  {
465  return callsiteToRefMRsMap[cs];
466  }
CallSiteToMRsMap callsiteToRefMRsMap
Map a callsite to its refs regions.
Definition: MemRegion.h:209

◆ getCallSiteRetPts()

NodeBS& SVF::MRGenerator::getCallSiteRetPts ( const CallICFGNode cs)
inlineprivate

Return the pts chain of the return parameter of the callsite.

Definition at line 260 of file MemRegion.h.

261  {
262  return csToCallSiteRetPtsMap[cs];
263  }

◆ getEscapObjviaGlobals()

void MRGenerator::getEscapObjviaGlobals ( NodeBS globs,
const NodeBS calleeModRef 
)
private

Get all the objects in callee's modref escaped via global objects (the chain pts of globals)

Get all the objects in callee's modref escaped via global objects (the chain pts of globals) Otherwise, the object in callee's modref would not escape through globals

Definition at line 558 of file MemRegion.cpp.

559 {
560  for(NodeBS::iterator it = calleeModRef.begin(), eit = calleeModRef.end(); it!=eit; ++it)
561  {
562  const MemObj* obj = pta->getPAG()->getObject(*it);
563  (void)obj; // Suppress warning of unused variable under release build
564  assert(obj && "object not found!!");
565  if(allGlobals.test(*it))
566  globs.set(*it);
567  }
568 }
const MemObj * getObject(NodeID id) const
Definition: SVFIR.h:395
bool test(unsigned Idx) const

◆ getFunction()

const SVFFunction* SVF::MRGenerator::getFunction ( const PAGEdge pagEdge) const
inline

Get the function which SVFIR Edge located.

Definition at line 435 of file MemRegion.h.

436  {
437  PAGEdgeToFunMap::const_iterator it = pagEdgeToFunMap.find(pagEdge);
438  assert(it!=pagEdgeToFunMap.end() && "can not find its function, it is a global SVFIR edge");
439  return it->second;
440  }

◆ getFunMRSet()

MRSet& SVF::MRGenerator::getFunMRSet ( const SVFFunction fun)
inline

Get Memory Region set.

Definition at line 443 of file MemRegion.h.

444  {
445  return funToMRsMap[fun];
446  }

◆ getFunToPointsToList()

FunToPointsTosMap& SVF::MRGenerator::getFunToPointsToList ( )
inlineprotected

Definition at line 371 of file MemRegion.h.

372  {
373  return funToPointsToMap;
374  }

◆ getLoadMRSet()

MRSet& SVF::MRGenerator::getLoadMRSet ( const LoadStmt load)
inline

Definition at line 447 of file MemRegion.h.

448  {
449  return loadsToMRsMap[load];
450  }
LoadsToMRsMap loadsToMRsMap
Map a load SVFIR Edge to its memory regions sets in order for inserting mus in Memory SSA.
Definition: MemRegion.h:205

◆ getModInfoForCall()

NodeBS MRGenerator::getModInfoForCall ( const CallICFGNode cs)

getModRefInfo APIs

Collect mod ref for external callsite other than heap alloc external call

Obtain the mod sets for a call, used for external ModRefInfo queries

Definition at line 667 of file MemRegion.cpp.

668 {
669  if (isExtCall(cs) && !isHeapAllocExtCall(cs))
670  {
671  SVFStmtList& pagEdgeList = getPAGEdgesFromInst(cs);
672  NodeBS mods;
673  for (SVFStmtList::const_iterator bit = pagEdgeList.begin(), ebit =
674  pagEdgeList.end(); bit != ebit; ++bit)
675  {
676  const PAGEdge* edge = *bit;
677  if (const StoreStmt* st = SVFUtil::dyn_cast<StoreStmt>(edge))
678  mods |= pta->getPts(st->getLHSVarID()).toNodeBS();
679  }
680  return mods;
681  }
682  else
683  {
684  return getModSideEffectOfCallSite(cs);
685  }
686 }
bool isHeapAllocExtCall(const Instruction *inst)
Definition: LLVMUtil.h:358
bool isExtCall(const SVFFunction *fun)
Definition: SVFUtil.h:278

◆ getModRefInfo() [1/3]

ModRefInfo MRGenerator::getModRefInfo ( const CallICFGNode cs)

Determine whether a CallSite instruction can mod or ref any memory location

Definition at line 716 of file MemRegion.cpp.

717 {
718  bool ref = !getRefInfoForCall(cs).empty();
719  bool mod = !getModInfoForCall(cs).empty();
720 
721  if (mod && ref)
722  return ModRefInfo::ModRef;
723  else if (ref)
724  return ModRefInfo::Ref;
725  else if (mod)
726  return ModRefInfo::Mod;
727  else
728  return ModRefInfo::NoModRef;
729 }
NodeBS getRefInfoForCall(const CallICFGNode *cs)
Definition: MemRegion.cpp:691
NodeBS getModInfoForCall(const CallICFGNode *cs)
getModRefInfo APIs
Definition: MemRegion.cpp:667
@ Ref
Definition: SVFType.h:521
@ NoModRef
Definition: SVFType.h:523
@ ModRef
Definition: SVFType.h:520
@ Mod
Definition: SVFType.h:522

◆ getModRefInfo() [2/3]

ModRefInfo MRGenerator::getModRefInfo ( const CallICFGNode cs,
const SVFValue V 
)

Determine whether a const CallICFGNode* instruction can mod or ref a specific memory location pointed by V

Definition at line 735 of file MemRegion.cpp.

736 {
737  bool ref = false;
738  bool mod = false;
739 
740  if (pta->getPAG()->hasValueNode(V))
741  {
742  const NodeBS pts(pta->getPts(pta->getPAG()->getValueNode(V)).toNodeBS());
743  const NodeBS csRef = getRefInfoForCall(cs);
744  const NodeBS csMod = getModInfoForCall(cs);
745  NodeBS ptsExpanded, csRefExpanded, csModExpanded;
746  pta->expandFIObjs(pts, ptsExpanded);
747  pta->expandFIObjs(csRef, csRefExpanded);
748  pta->expandFIObjs(csMod, csModExpanded);
749 
750  if (csRefExpanded.intersects(ptsExpanded))
751  ref = true;
752  if (csModExpanded.intersects(ptsExpanded))
753  mod = true;
754  }
755 
756  if (mod && ref)
757  return ModRefInfo::ModRef;
758  else if (ref)
759  return ModRefInfo::Ref;
760  else if (mod)
761  return ModRefInfo::Mod;
762  else
763  return ModRefInfo::NoModRef;
764 }
virtual void expandFIObjs(const PointsTo &pts, PointsTo &expandedPts)
Expand FI objects.
bool hasValueNode(const SVFValue *V)
Definition: IRGraph.h:141
NodeID getValueNode(const SVFValue *V)
Definition: IRGraph.h:137
bool intersects(const SparseBitVector< ElementSize > *RHS) const

◆ getModRefInfo() [3/3]

ModRefInfo MRGenerator::getModRefInfo ( const CallICFGNode cs1,
const CallICFGNode cs2 
)

Determine mod-ref relations between two const CallICFGNode* instructions

return NoModRef neither two callsites ref or mod any memory

Ref: cs1 ref memory mod by cs2

Mod: cs1 mod memory ref or mod by cs2

ModRef: cs1 ref and mod memory mod by cs2

Definition at line 769 of file MemRegion.cpp.

770 {
771  bool ref = false;
772  bool mod = false;
773 
776  return ModRefInfo::NoModRef;
777 
778  const NodeBS cs1Ref = getRefInfoForCall(cs1);
779  const NodeBS cs1Mod = getModInfoForCall(cs1);
780  const NodeBS cs2Ref = getRefInfoForCall(cs2);
781  const NodeBS cs2Mod = getModInfoForCall(cs2);
782  NodeBS cs1RefExpanded, cs1ModExpanded, cs2RefExpanded, cs2ModExpanded;
783  pta->expandFIObjs(cs1Ref, cs1RefExpanded);
784  pta->expandFIObjs(cs1Mod, cs1ModExpanded);
785  pta->expandFIObjs(cs2Ref, cs2RefExpanded);
786  pta->expandFIObjs(cs2Mod, cs2ModExpanded);
787 
789  if (cs1RefExpanded.intersects(cs2ModExpanded))
790  ref = true;
792  if (cs1ModExpanded.intersects(cs2RefExpanded) || cs1ModExpanded.intersects(cs2ModExpanded))
793  mod = true;
795  if (cs1RefExpanded.intersects(cs2ModExpanded) && cs1ModExpanded.intersects(cs2ModExpanded))
796  ref = mod = true;
797 
798  if (ref && mod)
799  return ModRefInfo::ModRef;
800  else if (ref)
801  return ModRefInfo::Ref;
802  else if (mod)
803  return ModRefInfo::Mod;
804  else
805  return ModRefInfo::NoModRef;
806 }
ModRefInfo getModRefInfo(const CallICFGNode *cs)
Definition: MemRegion.cpp:716

◆ getModSideEffectOfCallSite()

const NodeBS& SVF::MRGenerator::getModSideEffectOfCallSite ( const CallICFGNode cs)
inlineprotected

Get indirect mods of a callsite.

Definition at line 403 of file MemRegion.h.

404  {
405  return csToModsMap[cs];
406  }

◆ getModSideEffectOfFunction()

const NodeBS& SVF::MRGenerator::getModSideEffectOfFunction ( const SVFFunction fun)
inlineprotected

Get indirect mods of a function.

Definition at line 393 of file MemRegion.h.

394  {
395  return funToModsMap[fun];
396  }

◆ getMR()

const MemRegion * MRGenerator::getMR ( const NodeBS cpts) const

Get a memory region according to cpts.

Generate a memory region and put in into functions which use it

Definition at line 92 of file MemRegion.cpp.

93 {
94  MemRegion mr(getRepPointsTo(cpts));
95  MRSet::iterator mit = memRegSet.find(&mr);
96  assert(mit!=memRegSet.end() && "memory region not found!!");
97  return *mit;
98 }

◆ getMRNum()

u32_t SVF::MRGenerator::getMRNum ( ) const
inline

Definition at line 420 of file MemRegion.h.

421  {
422  return memRegSet.size();
423  }

◆ getMRSet()

MRSet& SVF::MRGenerator::getMRSet ( )
inline

Definition at line 180 of file MemRegion.h.

181  {
182  return memRegSet;
183  }

◆ getMRsForCallSiteRef()

virtual void SVF::MRGenerator::getMRsForCallSiteRef ( MRSet aliasMRs,
const NodeBS cpts,
const SVFFunction  
)
inlineprotectedvirtual

Get memory regions for call site ref according to cpts.

Reimplemented in SVF::IntraDisjointMRG, and SVF::DistinctMRG.

Definition at line 326 of file MemRegion.h.

327  {
328  const MemRegion* mr = getMR(cpts);
329  aliasMRs.insert(mr);
330  }
const MemRegion * getMR(const NodeBS &cpts) const
Get a memory region according to cpts.
Definition: MemRegion.cpp:92

◆ getMRsForLoad()

virtual void SVF::MRGenerator::getMRsForLoad ( MRSet aliasMRs,
const NodeBS cpts,
const SVFFunction  
)
inlineprotectedvirtual

Get memory regions for a load statement according to cpts.

Reimplemented in SVF::IntraDisjointMRG, SVF::DistinctMRG, and SVF::InterDisjointMRG.

Definition at line 319 of file MemRegion.h.

320  {
321  const MemRegion* mr = getMR(cpts);
322  aliasMRs.insert(mr);
323  }

◆ getPAGEdgesFromInst()

SVFIR::SVFStmtList & MRGenerator::getPAGEdgesFromInst ( const ICFGNode node)

Given an instruction, get all its the PAGEdge (statement) in sequence.

Definition at line 160 of file MemRegion.cpp.

161 {
162  SVFIR* pag = pta->getPAG();
163  if (ptrOnlyMSSA)
164  return pag->getPTASVFStmtList(node);
165  else
166  return pag->getSVFStmtList(node);
167 }
SVFStmtList & getSVFStmtList(const ICFGNode *inst)
Given an instruction, get all its PAGEdges.
Definition: SVFIR.h:221
SVFStmtList & getPTASVFStmtList(const ICFGNode *inst)
Given an instruction, get all its PTA PAGEdges.
Definition: SVFIR.h:226

◆ getPointsToList()

PointsToList& SVF::MRGenerator::getPointsToList ( const SVFFunction fun)
inlineprotected

Definition at line 367 of file MemRegion.h.

368  {
369  return funToPointsToMap[fun];
370  }

◆ getRefInfoForCall()

NodeBS MRGenerator::getRefInfoForCall ( const CallICFGNode cs)

Obtain the ref sets for a call, used for external ModRefInfo queries

Definition at line 691 of file MemRegion.cpp.

692 {
693  if (isExtCall(cs) && !isHeapAllocExtCall(cs))
694  {
695  SVFStmtList& pagEdgeList = getPAGEdgesFromInst(cs);
696  NodeBS refs;
697  for (SVFStmtList::const_iterator bit = pagEdgeList.begin(), ebit =
698  pagEdgeList.end(); bit != ebit; ++bit)
699  {
700  const PAGEdge* edge = *bit;
701  if (const LoadStmt* ld = SVFUtil::dyn_cast<LoadStmt>(edge))
702  refs |= pta->getPts(ld->getRHSVarID()).toNodeBS();
703  }
704  return refs;
705  }
706  else
707  {
708  return getRefSideEffectOfCallSite(cs);
709  }
710 }

◆ getRefSideEffectOfCallSite()

const NodeBS& SVF::MRGenerator::getRefSideEffectOfCallSite ( const CallICFGNode cs)
inlineprotected

Get indirect refs of a callsite.

Definition at line 398 of file MemRegion.h.

399  {
400  return csToRefsMap[cs];
401  }

◆ getRefSideEffectOfFunction()

const NodeBS& SVF::MRGenerator::getRefSideEffectOfFunction ( const SVFFunction fun)
inlineprotected

Get indirect refs of a function.

Definition at line 388 of file MemRegion.h.

389  {
390  return funToRefsMap[fun];
391  }

◆ getRepPointsTo()

const NodeBS& SVF::MRGenerator::getRepPointsTo ( const NodeBS cpts) const
inline

Get superset cpts set.

Definition at line 186 of file MemRegion.h.

187  {
188  PtsToRepPtsSetMap::const_iterator it = cptsToRepCPtsMap.find(cpts);
189  assert(it!=cptsToRepCPtsMap.end() && "can not find superset of cpts??");
190  return it->second;
191  }
PtsToRepPtsSetMap cptsToRepCPtsMap
Map a condition pts to its rep conditional pts (super set points-to)
Definition: MemRegion.h:280

◆ getStoreMRSet()

MRSet& SVF::MRGenerator::getStoreMRSet ( const StoreStmt store)
inline

Definition at line 451 of file MemRegion.h.

452  {
453  return storesToMRsMap[store];
454  }
StoresToMRsMap storesToMRsMap
Map a store SVFIR Edge to its memory regions sets in order for inserting chis in Memory SSA.
Definition: MemRegion.h:207

◆ handleCallsiteModRef()

bool MRGenerator::handleCallsiteModRef ( NodeBS mod,
NodeBS ref,
const CallICFGNode cs,
const SVFFunction callee 
)
protectedvirtual

Get Mod-Ref of a callee function.

Get Mod-Ref of a callee function

if a callee is a heap allocator function, then its mod set of this callsite is the heap object.

otherwise, we find the mod/ref sets from the callee function, who has definition and been processed

Definition at line 600 of file MemRegion.cpp.

601 {
603  if(isHeapAllocExtCall(cs))
604  {
605  SVFStmtList& pagEdgeList = getPAGEdgesFromInst(cs);
606  for (SVFStmtList::const_iterator bit = pagEdgeList.begin(),
607  ebit = pagEdgeList.end(); bit != ebit; ++bit)
608  {
609  const PAGEdge* edge = *bit;
610  if (const AddrStmt* addr = SVFUtil::dyn_cast<AddrStmt>(edge))
611  mod.set(addr->getRHSVarID());
612  }
613  }
615  else
616  {
617  mod = getModSideEffectOfFunction(callee);
618  ref = getRefSideEffectOfFunction(callee);
619  }
620  // add ref set
621  bool refchanged = addRefSideEffectOfCallSite(cs, ref);
622  // add mod set
623  bool modchanged = addModSideEffectOfCallSite(cs, mod);
624 
625  return refchanged || modchanged;
626 }
const NodeBS & getModSideEffectOfFunction(const SVFFunction *fun)
Get indirect mods of a function.
Definition: MemRegion.h:393
bool addRefSideEffectOfCallSite(const CallICFGNode *cs, const NodeBS &refs)
Add indirect uses an memory object in the function.
Definition: MemRegion.cpp:428
bool addModSideEffectOfCallSite(const CallICFGNode *cs, const NodeBS &mods)
Add indirect def an memory object in the function.
Definition: MemRegion.cpp:444
const NodeBS & getRefSideEffectOfFunction(const SVFFunction *fun)
Get indirect refs of a function.
Definition: MemRegion.h:388

◆ hasCPtsList()

bool SVF::MRGenerator::hasCPtsList ( const SVFFunction fun) const
inlineprotected

Definition at line 363 of file MemRegion.h.

364  {
365  return funToPointsToMap.find(fun)!=funToPointsToMap.end();
366  }

◆ hasModMRSet()

bool SVF::MRGenerator::hasModMRSet ( const CallICFGNode cs)
inline

Definition at line 459 of file MemRegion.h.

460  {
461  return callsiteToModMRsMap.find(cs)!=callsiteToModMRsMap.end();
462  }

◆ hasModSideEffectOfCallSite()

bool SVF::MRGenerator::hasModSideEffectOfCallSite ( const CallICFGNode cs)
inlineprotected

Has indirect mods of a callsite.

Definition at line 413 of file MemRegion.h.

414  {
415  return csToModsMap.find(cs) != csToModsMap.end();
416  }

◆ hasRefMRSet()

bool SVF::MRGenerator::hasRefMRSet ( const CallICFGNode cs)
inline

Definition at line 455 of file MemRegion.h.

456  {
457  return callsiteToRefMRsMap.find(cs)!=callsiteToRefMRsMap.end();
458  }

◆ hasRefSideEffectOfCallSite()

bool SVF::MRGenerator::hasRefSideEffectOfCallSite ( const CallICFGNode cs)
inlineprotected

Has indirect refs of a callsite.

Definition at line 408 of file MemRegion.h.

409  {
410  return csToRefsMap.find(cs) != csToRefsMap.end();
411  }

◆ hasSVFStmtList()

bool MRGenerator::hasSVFStmtList ( const ICFGNode icfgNode)

Whether this instruction has SVFIR Edge.

Definition at line 150 of file MemRegion.cpp.

151 {
152  SVFIR* pag = pta->getPAG();
153  if (ptrOnlyMSSA)
154  return pag->hasPTASVFStmtList(node);
155  else
156  return pag->hasSVFStmtList(node);
157 }
bool hasPTASVFStmtList(const ICFGNode *inst) const
Definition: SVFIR.h:215
bool hasSVFStmtList(const ICFGNode *inst) const
Whether this instruction has SVFIR Edge.
Definition: SVFIR.h:211

◆ isAliasedMR()

virtual bool SVF::MRGenerator::isAliasedMR ( const NodeBS cpts,
const MemRegion mr 
)
inlineprotectedvirtual

Whether a region is aliased with a conditional points-to.

Definition at line 304 of file MemRegion.h.

305  {
306  return mr->getPointsTo().intersects(cpts);
307  }

◆ isNonLocalObject()

bool MRGenerator::isNonLocalObject ( NodeID  id,
const SVFFunction curFun 
) const
private

Whether the object node is a non-local object including global, heap, and stack variable in recursions

if the object is heap or global

or if the local variable of its callers or a local variable is in function recursion cycles

Definition at line 574 of file MemRegion.cpp.

575 {
576  const MemObj* obj = pta->getPAG()->getObject(id);
577  assert(obj && "object not found!!");
579  if(obj->isGlobalObj() || obj->isHeap())
580  return true;
583  else if(obj->isStack())
584  {
585  if(const SVFFunction* svffun = pta->getPAG()->getGNode(id)->getFunction())
586  {
587  if(svffun!=curFun)
588  return true;
589  else
591  }
592  }
593 
594  return false;
595 }
NodeType * getGNode(NodeID id) const
Get a node.
Definition: GenericGraph.h:653
bool isGlobalObj() const
bool isHeap() const
bool isStack() const
bool isInCycle(NodeID n) const
whether the node is in a cycle
Definition: SCC.h:149
virtual const SVFFunction * getFunction() const
Return the function that this SVFVar resides in. Return nullptr if it is a global or constantexpr nod...
Definition: SVFVariables.h:122

◆ modRefAnalysis()

void MRGenerator::modRefAnalysis ( PTACallGraphNode callGraphNode,
WorkList worklist 
)
protectedvirtual

Mod-Ref analysis for callsite invoking this callGraphNode.

Call site mod-ref analysis Compute mod-ref of all callsites invoking this call graph node

add ref/mod set of callee to its invocation callsites at caller

handle direct callsites

handle indirect callsites

Definition at line 632 of file MemRegion.cpp.

633 {
634 
636  for(PTACallGraphNode::iterator it = callGraphNode->InEdgeBegin(), eit = callGraphNode->InEdgeEnd();
637  it!=eit; ++it)
638  {
639  PTACallGraphEdge* edge = *it;
640 
642  for(PTACallGraphEdge::CallInstSet::iterator cit = edge->getDirectCalls().begin(),
643  ecit = edge->getDirectCalls().end(); cit!=ecit; ++cit)
644  {
645  NodeBS mod, ref;
646  const CallICFGNode* cs = (*cit);
647  bool modrefchanged = handleCallsiteModRef(mod, ref, cs, callGraphNode->getFunction());
648  if(modrefchanged)
649  worklist.push(edge->getSrcID());
650  }
652  for(PTACallGraphEdge::CallInstSet::iterator cit = edge->getIndirectCalls().begin(),
653  ecit = edge->getIndirectCalls().end(); cit!=ecit; ++cit)
654  {
655  NodeBS mod, ref;
656  const CallICFGNode* cs = (*cit);
657  bool modrefchanged = handleCallsiteModRef(mod, ref, cs, callGraphNode->getFunction());
658  if(modrefchanged)
659  worklist.push(edge->getSrcID());
660  }
661  }
662 }
NodeID getSrcID() const
get methods of the components
Definition: GenericGraph.h:81
iterator InEdgeBegin()
Definition: GenericGraph.h:462
iterator InEdgeEnd()
Definition: GenericGraph.h:466
virtual bool handleCallsiteModRef(NodeBS &mod, NodeBS &ref, const CallICFGNode *cs, const SVFFunction *fun)
Get Mod-Ref of a callee function.
Definition: MemRegion.cpp:600
CallInstSet & getIndirectCalls()
Definition: PTACallGraph.h:99
CallInstSet & getDirectCalls()
Definition: PTACallGraph.h:95
PTACallGraphEdge::CallGraphEdgeSet::iterator iterator
Definition: PTACallGraph.h:179
const SVFFunction * getFunction() const
Get function of this call node.
Definition: PTACallGraph.h:198

◆ partitionMRs()

void MRGenerator::partitionMRs ( )
protectedvirtual

Partition regions.

Partition memory regions

Compute all superset of all condition points-to sets TODO: we may need some refined region partitioning algorithm here For now, we just collapse all refs/mods objects at callsites into one region Consider modularly partition memory regions to speed up analysis (only partition regions within function scope)

Generate memory regions according to condition pts after computing superset

Reimplemented in SVF::InterDisjointMRG, SVF::IntraDisjointMRG, and SVF::DistinctMRG.

Definition at line 314 of file MemRegion.cpp.

315 {
316 
321  for(FunToPointsTosMap::iterator it = getFunToPointsToList().begin(), eit = getFunToPointsToList().end();
322  it!=eit; ++it)
323  {
324  for(PointsToList::iterator cit = it->second.begin(), ecit = it->second.end(); cit!=ecit; ++cit)
325  {
326  sortPointsTo(*cit);
327  }
328  }
330  for(FunToPointsTosMap::iterator it = getFunToPointsToList().begin(), eit = getFunToPointsToList().end();
331  it!=eit; ++it)
332  {
333  const SVFFunction* fun = it->first;
334  for(PointsToList::iterator cit = it->second.begin(), ecit = it->second.end(); cit!=ecit; ++cit)
335  {
336  createMR(fun,*cit);
337  }
338  }
339 
340 }
FunToPointsTosMap & getFunToPointsToList()
Definition: MemRegion.h:371
virtual void sortPointsTo(const NodeBS &cpts)
Given a condition pts, insert into cptsToRepCPtsMap for region generation.
Definition: MemRegion.cpp:281
void createMR(const SVFFunction *fun, const NodeBS &cpts)
Generate a memory region and put in into functions which use it.
Definition: MemRegion.cpp:69

◆ sortPointsTo()

void MRGenerator::sortPointsTo ( const NodeBS cpts)
protectedvirtual

Given a condition pts, insert into cptsToRepCPtsMap for region generation.

Given a condition pts, insert into cptsToRepCPtsMap Always map it to its superset(rep) cpts according to existing items 1) map cpts to its superset(rep) which exists in the map, otherwise its superset is itself 2) adjust existing items in the map if their supersets are cpts

Definition at line 281 of file MemRegion.cpp.

282 {
283 
284  if(cptsToRepCPtsMap.find(cpts)!=cptsToRepCPtsMap.end())
285  return;
286 
287  PointsToList subSetList;
288  NodeBS repCPts = cpts;
289  for(PtsToRepPtsSetMap::iterator it = cptsToRepCPtsMap.begin(),
290  eit = cptsToRepCPtsMap.end(); it!=eit; ++it)
291  {
292  NodeBS& existCPts = it->second;
293  if(cpts.contains(existCPts))
294  {
295  subSetList.insert(it->first);
296  }
297  else if(existCPts.contains(cpts))
298  {
299  repCPts = existCPts;
300  }
301  }
302 
303  for(PointsToList::iterator it = subSetList.begin(), eit = subSetList.end(); it!=eit; ++it)
304  {
305  cptsToRepCPtsMap[*it] = cpts;
306  }
307 
308  cptsToRepCPtsMap[cpts] = repCPts;
309 }
bool contains(const SparseBitVector< ElementSize > &RHS) const
OrderedSet< PointsTo, equalPointsTo > PointsToList
Definition: SVFUtil.h:166

◆ updateAliasMRs()

void MRGenerator::updateAliasMRs ( )
protectedvirtual

Update aliased regions for loads/stores/callsites.

Update aliased regions for loads/stores/callsites

update stores with its aliased regions

update callsites with its aliased regions

Definition at line 345 of file MemRegion.cpp.

346 {
347 
349  for(StoresToPointsToMap::const_iterator it = storesToPointsToMap.begin(), eit = storesToPointsToMap.end(); it!=eit; ++it)
350  {
351  MRSet aliasMRs;
352  const SVFFunction* fun = getFunction(it->first);
353  const NodeBS& storeCPts = it->second;
354  getAliasMemRegions(aliasMRs,storeCPts,fun);
355  for(MRSet::iterator ait = aliasMRs.begin(), eait = aliasMRs.end(); ait!=eait; ++ait)
356  {
357  storesToMRsMap[it->first].insert(*ait);
358  }
359  }
360 
361  for(LoadsToPointsToMap::const_iterator it = loadsToPointsToMap.begin(), eit = loadsToPointsToMap.end(); it!=eit; ++it)
362  {
363  MRSet aliasMRs;
364  const SVFFunction* fun = getFunction(it->first);
365  const NodeBS& loadCPts = it->second;
366  getMRsForLoad(aliasMRs, loadCPts, fun);
367  for(MRSet::iterator ait = aliasMRs.begin(), eait = aliasMRs.end(); ait!=eait; ++ait)
368  {
369  loadsToMRsMap[it->first].insert(*ait);
370  }
371  }
372 
374  for(CallSiteToPointsToMap::const_iterator it = callsiteToModPointsToMap.begin(),
375  eit = callsiteToModPointsToMap.end(); it!=eit; ++it)
376  {
377  const SVFFunction* fun = it->first->getCaller();
378  MRSet aliasMRs;
379  const NodeBS& callsiteModCPts = it->second;
380  getAliasMemRegions(aliasMRs,callsiteModCPts,fun);
381  for(MRSet::iterator ait = aliasMRs.begin(), eait = aliasMRs.end(); ait!=eait; ++ait)
382  {
383  callsiteToModMRsMap[it->first].insert(*ait);
384  }
385  }
386  for(CallSiteToPointsToMap::const_iterator it = callsiteToRefPointsToMap.begin(),
387  eit = callsiteToRefPointsToMap.end(); it!=eit; ++it)
388  {
389  const SVFFunction* fun = it->first->getCaller();
390  MRSet aliasMRs;
391  const NodeBS& callsiteRefCPts = it->second;
392  getMRsForCallSiteRef(aliasMRs, callsiteRefCPts, fun);
393  for(MRSet::iterator ait = aliasMRs.begin(), eait = aliasMRs.end(); ait!=eait; ++ait)
394  {
395  callsiteToRefMRsMap[it->first].insert(*ait);
396  }
397  }
398 }
virtual void getMRsForCallSiteRef(MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *)
Get memory regions for call site ref according to cpts.
Definition: MemRegion.h:326
const SVFFunction * getFunction(const PAGEdge *pagEdge) const
Get the function which SVFIR Edge located.
Definition: MemRegion.h:435
virtual void getMRsForLoad(MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *)
Get memory regions for a load statement according to cpts.
Definition: MemRegion.h:319
virtual void getAliasMemRegions(MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *fun)
Get all aliased mem regions from function fun according to cpts.
Definition: MemRegion.h:309

Member Data Documentation

◆ allGlobals

NodeBS SVF::MRGenerator::allGlobals
private

All global variable SVFIR node ids.

Definition at line 243 of file MemRegion.h.

◆ cachedPtsChainMap

NodeToPTSSMap SVF::MRGenerator::cachedPtsChainMap
private

Map a pointer to its cached points-to chain;.

Definition at line 240 of file MemRegion.h.

◆ callGraph

PTACallGraph* SVF::MRGenerator::callGraph
private

Definition at line 199 of file MemRegion.h.

◆ callGraphSCC

SCC* SVF::MRGenerator::callGraphSCC
private

Definition at line 198 of file MemRegion.h.

◆ callsiteToModMRsMap

CallSiteToMRsMap SVF::MRGenerator::callsiteToModMRsMap
private

Map a callsite to its mods regions.

Definition at line 211 of file MemRegion.h.

◆ callsiteToModPointsToMap

CallSiteToPointsToMap SVF::MRGenerator::callsiteToModPointsToMap
private

Map a callsite to it mods cpts set.

Definition at line 219 of file MemRegion.h.

◆ callsiteToRefMRsMap

CallSiteToMRsMap SVF::MRGenerator::callsiteToRefMRsMap
private

Map a callsite to its refs regions.

Definition at line 209 of file MemRegion.h.

◆ callsiteToRefPointsToMap

CallSiteToPointsToMap SVF::MRGenerator::callsiteToRefPointsToMap
private

Map a callsite to it refs cpts set.

Definition at line 217 of file MemRegion.h.

◆ cptsToRepCPtsMap

PtsToRepPtsSetMap SVF::MRGenerator::cptsToRepCPtsMap
protected

Map a condition pts to its rep conditional pts (super set points-to)

Definition at line 280 of file MemRegion.h.

◆ csToCallSiteArgsPtsMap

CallSiteToPointsToMap SVF::MRGenerator::csToCallSiteArgsPtsMap
private

Map a callsite to all its object might pass into its callees.

Definition at line 235 of file MemRegion.h.

◆ csToCallSiteRetPtsMap

CallSiteToPointsToMap SVF::MRGenerator::csToCallSiteRetPtsMap
private

Map a callsite to all its object might return from its callees.

Definition at line 237 of file MemRegion.h.

◆ csToModsMap

CallSiteToPointsToMap SVF::MRGenerator::csToModsMap
private

Map a callsite to its indirect defs of memory objects.

Definition at line 233 of file MemRegion.h.

◆ csToRefsMap

CallSiteToPointsToMap SVF::MRGenerator::csToRefsMap
private

Map a callsite to its indirect uses of memory objects.

Definition at line 231 of file MemRegion.h.

◆ funToModsMap

FunToPointsToMap SVF::MRGenerator::funToModsMap
private

Map a function to its indirect defs of memory objects.

Definition at line 229 of file MemRegion.h.

◆ funToMRsMap

FunToMRsMap SVF::MRGenerator::funToMRsMap
private

Map a function to all its memory regions.

Definition at line 203 of file MemRegion.h.

◆ funToPointsToMap

FunToPointsTosMap SVF::MRGenerator::funToPointsToMap
private

Map a function to all of its conditional points-to sets.

Definition at line 222 of file MemRegion.h.

◆ funToRefsMap

FunToPointsToMap SVF::MRGenerator::funToRefsMap
private

Map a function to its indirect uses of memory objects.

Definition at line 227 of file MemRegion.h.

◆ loadsToMRsMap

LoadsToMRsMap SVF::MRGenerator::loadsToMRsMap
private

Map a load SVFIR Edge to its memory regions sets in order for inserting mus in Memory SSA.

Definition at line 205 of file MemRegion.h.

◆ loadsToPointsToMap

LoadsToPointsToMap SVF::MRGenerator::loadsToPointsToMap
private

Map a load SVFIR Edge to its CPts set map.

Definition at line 213 of file MemRegion.h.

◆ memRegSet

MRSet SVF::MRGenerator::memRegSet
protected

A set of All memory regions.

Definition at line 278 of file MemRegion.h.

◆ pagEdgeToFunMap

PAGEdgeToFunMap SVF::MRGenerator::pagEdgeToFunMap
private

Map a PAGEdge to its fun.

Definition at line 224 of file MemRegion.h.

◆ pta

BVDataPTAImpl* SVF::MRGenerator::pta
private

Definition at line 197 of file MemRegion.h.

◆ ptrOnlyMSSA

bool SVF::MRGenerator::ptrOnlyMSSA
private

Definition at line 200 of file MemRegion.h.

◆ storesToMRsMap

StoresToMRsMap SVF::MRGenerator::storesToMRsMap
private

Map a store SVFIR Edge to its memory regions sets in order for inserting chis in Memory SSA.

Definition at line 207 of file MemRegion.h.

◆ storesToPointsToMap

StoresToPointsToMap SVF::MRGenerator::storesToPointsToMap
private

Map a store SVFIR Edge to its CPts set map.

Definition at line 215 of file MemRegion.h.


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