Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SVF::PersistentDFPTData< Key, KeySet, Data, DataSet > Class Template Reference

DFPTData backed by a PersistentPointsToCache. More...

#include <PersistentPointsToDS.h>

Inheritance diagram for SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >:
SVF::DFPTData< Key, KeySet, Data, DataSet > SVF::PTData< Key, KeySet, Data, DataSet > SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >

Public Types

typedef PTData< Key, KeySet, Data, DataSet > BasePTData
 
typedef BasePTData::PTDataTy PTDataTy
 
typedef DFPTData< Key, KeySet, Data, DataSet > BaseDFPTData
 
typedef PersistentPTData< Key, KeySet, Data, DataSet > BasePersPTData
 
typedef BaseDFPTData::LocID LocID
 
typedef BasePersPTData::KeyToIDMap KeyToIDMap
 
typedef Map< LocID, KeyToIDMapDFKeyToIDMap
 
- Public Types inherited from SVF::DFPTData< Key, KeySet, Data, DataSet >
typedef PTData< Key, KeySet, Data, DataSet > BasePTData
 
typedef BasePTData::PTDataTy PTDataTy
 
typedef NodeID LocID
 
- Public Types inherited from SVF::PTData< Key, KeySet, Data, DataSet >
enum  PTDataTy {
  Base , MutBase , Diff , MutDiff ,
  DataFlow , MutDataFlow , MutIncDataFlow , Versioned ,
  MutVersioned , PersBase , PersDiff , PersDataFlow ,
  PersIncDataFlow , PersVersioned
}
 Types of a points-to data structures. More...
 

Public Member Functions

 PersistentDFPTData (PersistentPointsToCache< DataSet > &cache, bool reversePT=true, PTDataTy ty=PTDataTy::PersDataFlow)
 
 ~PersistentDFPTData () override=default
 
void clear () override
 Clears all points-to sets as if nothing is stored.
 
const DataSet & getPts (const Key &var) override
 Get points-to set of var.
 
const KeySetgetRevPts (const Data &) override
 Get reverse points-to set of a datum.
 
bool unionPts (const Key &dstKey, const Key &srcKey) override
 Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
 
bool unionPts (const Key &dstKey, const DataSet &srcDataSet) override
 Performs pts(dstVar) = pts(dstVar) U srcDataSet.
 
bool addPts (const Key &dstKey, const Data &element) override
 Adds element to the points-to set associated with var.
 
void clearPts (const Key &var, const Data &element) override
 Clears element from the points-to set of var.
 
void clearFullPts (const Key &var) override
 Fully clears the points-to set of var.
 
void remapAllPts () override
 Remaps all points-to sets to use the current mapping.
 
void dumpPTData () override
 Dump stored keys and points-to sets.
 
bool hasDFInSet (LocID loc) const override
 
bool hasDFOutSet (LocID loc) const override
 
bool hasDFInSet (LocID loc, const Key &var) const override
 
bool hasDFOutSet (LocID loc, const Key &var) const override
 
const DataSet & getDFInPtsSet (LocID loc, const Key &var) override
 
const DataSet & getDFOutPtsSet (LocID loc, const Key &var) override
 
bool updateDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 
bool updateAllDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.
 
bool updateDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
 
bool updateAllDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.
 
bool updateDFOutFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
 
bool updateAllDFOutFromIn (LocID loc, const Key &singleton, bool strongUpdates) override
 For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).
 
void clearAllDFOutUpdatedVar (LocID) override
 
bool updateTLVPts (LocID srcLoc, const Key &srcVar, const Key &dstVar) override
 Update points-to set of top-level pointers with IN[srcLoc:srcVar].
 
bool updateATVPts (const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.
 
Map< DataSet, unsignedgetAllPts (bool liveOnly) const override
 
- Public Member Functions inherited from SVF::DFPTData< Key, KeySet, Data, DataSet >
 DFPTData (bool reversePT=true, PTDataTy ty=BasePTData::DataFlow)
 Constructor.
 
virtual ~DFPTData ()
 
- Public Member Functions inherited from SVF::PTData< Key, KeySet, Data, DataSet >
 PTData (bool reversePT=true, PTDataTy ty=PTDataTy::Base)
 
virtual ~PTData ()
 
PTDataTy getPTDTY () const
 Get the type of points-to data structure that this is.
 

Static Public Member Functions

static bool classof (const PersistentDFPTData< Key, KeySet, Data, DataSet > *)
 
static bool classof (const PTData< Key, KeySet, Data, DataSet > *ptd)
 
- Static Public Member Functions inherited from SVF::DFPTData< Key, KeySet, Data, DataSet >
static bool classof (const DFPTData< Key, KeySet, Data, DataSet > *)
 
static bool classof (const PTData< Key, KeySet, Data, DataSet > *ptd)
 

Protected Member Functions

bool unionPtsThroughIds (PointsToID &dst, PointsToID &src)
 
PointsToIDgetDFInPtIdRef (LocID loc, const Key &var)
 
PointsToIDgetDFOutPtIdRef (LocID loc, const Key &var)
 

Protected Attributes

PersistentPointsToCache< DataSet > & ptCache
 
PersistentPTData< Key, KeySet, Data, DataSet > persPTData
 PTData for top-level pointers. We will also use its cache for address-taken pointers.
 
DFKeyToIDMap dfInPtsMap
 Address-taken points-to sets in IN-sets.
 
DFKeyToIDMap dfOutPtsMap
 Address-taken points-to sets in OUT-sets.
 
- Protected Attributes inherited from SVF::PTData< Key, KeySet, Data, DataSet >
bool rev
 Whether we maintain reverse points-to sets or not.
 
PTDataTy ptdTy
 

Detailed Description

template<typename Key, typename KeySet, typename Data, typename DataSet>
class SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >

DFPTData backed by a PersistentPointsToCache.

Definition at line 334 of file PersistentPointsToDS.h.

Member Typedef Documentation

◆ BaseDFPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef DFPTData<Key, KeySet, Data, DataSet> SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::BaseDFPTData

Definition at line 339 of file PersistentPointsToDS.h.

◆ BasePersPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef PersistentPTData<Key, KeySet, Data, DataSet> SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::BasePersPTData

Definition at line 340 of file PersistentPointsToDS.h.

◆ BasePTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef PTData<Key, KeySet, Data, DataSet> SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::BasePTData

Definition at line 337 of file PersistentPointsToDS.h.

◆ DFKeyToIDMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef Map<LocID, KeyToIDMap> SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::DFKeyToIDMap

Definition at line 344 of file PersistentPointsToDS.h.

◆ KeyToIDMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef BasePersPTData::KeyToIDMap SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::KeyToIDMap

Definition at line 343 of file PersistentPointsToDS.h.

◆ LocID

Definition at line 342 of file PersistentPointsToDS.h.

◆ PTDataTy

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef BasePTData::PTDataTy SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::PTDataTy

Definition at line 338 of file PersistentPointsToDS.h.

Constructor & Destructor Documentation

◆ PersistentDFPTData()

template<typename Key , typename KeySet , typename Data , typename DataSet >
SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::PersistentDFPTData ( PersistentPointsToCache< DataSet > &  cache,
bool  reversePT = true,
PTDataTy  ty = PTDataTy::PersDataFlow 
)
inlineexplicit

Definition at line 346 of file PersistentPointsToDS.h.

PersistentPTData< Key, KeySet, Data, DataSet > persPTData
PTData for top-level pointers. We will also use its cache for address-taken pointers.
PersistentPointsToCache< DataSet > & ptCache
DFPTData< Key, KeySet, Data, DataSet > BaseDFPTData
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ ~PersistentDFPTData()

template<typename Key , typename KeySet , typename Data , typename DataSet >
SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::~PersistentDFPTData ( )
overridedefault

Member Function Documentation

◆ addPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::addPts ( const Key var,
const Data element 
)
inlineoverridevirtual

Adds element to the points-to set associated with var.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 379 of file PersistentPointsToDS.h.

380 {
381 return persPTData.addPts(dstKey, element);
382 }

◆ classof() [1/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
static bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::classof ( const PersistentDFPTData< Key, KeySet, Data, DataSet > *  )
inlinestatic

Methods to support type inquiry through isa, cast, and dyn_cast:

Definition at line 536 of file PersistentPointsToDS.h.

537 {
538 return true;
539 }

◆ classof() [2/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
static bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::classof ( const PTData< Key, KeySet, Data, DataSet > *  ptd)
inlinestatic

Definition at line 541 of file PersistentPointsToDS.h.

542 {
543 return ptd->getPTDTY() == PTDataTy::PersDataFlow
544 || ptd->getPTDTY() == PTDataTy::PersIncDataFlow;
545 }

◆ clear()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::clear ( )
inlineoverridevirtual

Clears all points-to sets as if nothing is stored.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 351 of file PersistentPointsToDS.h.

352 {
353 dfInPtsMap.clear();
354 dfOutPtsMap.clear();
355 persPTData.clear();
356 }
DFKeyToIDMap dfInPtsMap
Address-taken points-to sets in IN-sets.
DFKeyToIDMap dfOutPtsMap
Address-taken points-to sets in OUT-sets.

◆ clearAllDFOutUpdatedVar()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::clearAllDFOutUpdatedVar ( LocID  )
inlineoverridevirtual

◆ clearFullPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::clearFullPts ( const Key var)
inlineoverridevirtual

Fully clears the points-to set of var.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 389 of file PersistentPointsToDS.h.

390 {
391 persPTData.clearFullPts(var);
392 }

◆ clearPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::clearPts ( const Key var,
const Data element 
)
inlineoverridevirtual

Clears element from the points-to set of var.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 384 of file PersistentPointsToDS.h.

385 {
386 persPTData.clearPts(var, element);
387 }

◆ dumpPTData()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::dumpPTData ( )
inlineoverridevirtual

Dump stored keys and points-to sets.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 399 of file PersistentPointsToDS.h.

400 {
401 persPTData.dumpPTData();
402 }

◆ getAllPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
Map< DataSet, unsigned > SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getAllPts ( bool  liveOnly) const
inlineoverridevirtual

Returns a mapping of points-to sets to the number of times they are stored. liveOnly indicates whether to include only points-to sets which correspond to a variable (matters when dealing with non-GC persistent PT).

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 501 of file PersistentPointsToDS.h.

502 {
504 for (const typename DFKeyToIDMap::value_type &lki : dfInPtsMap)
505 {
506 for (const typename KeyToIDMap::value_type &ki : lki.second)
507 {
508 ++allPts[ptCache.getActualPts(ki.second)];
509 }
510 }
511
512 for (const typename DFKeyToIDMap::value_type &lki : dfOutPtsMap)
513 {
514 for (const typename KeyToIDMap::value_type &ki : lki.second)
515 {
516 ++allPts[ptCache.getActualPts(ki.second)];
517 }
518 }
519
520 if (!liveOnly)
521 {
522 // Subtract 1 from each counted points-to set because the live points-to
523 // sets have already been inserted and accounted for how often they occur.
524 // They will each occur one more time in the cache.
525 // In essence, we want the ptCache.getAllPts() to just add the unused, non-GC'd
526 // points-to sets to allPts.
527 for (typename Map<DataSet, unsigned>::value_type pto : allPts) pto.second -= 1;
528 SVFUtil::mergePtsOccMaps<DataSet>(allPts, ptCache.getAllPts());
529 }
530
531 return allPts;
532 }
Map< Data, unsigned > getAllPts(void)
const Data & getActualPts(PointsToID id) const
Returns the points-to set which id represents. id must be stored in the cache.

◆ getDFInPtIdRef()

template<typename Key , typename KeySet , typename Data , typename DataSet >
PointsToID & SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getDFInPtIdRef ( LocID  loc,
const Key var 
)
inlineprotected

Definition at line 556 of file PersistentPointsToDS.h.

557 {
558 return dfInPtsMap[loc][var];
559 }

◆ getDFInPtsSet()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const DataSet & SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getDFInPtsSet ( LocID  loc,
const Key var 
)
inlineoverridevirtual

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Definition at line 430 of file PersistentPointsToDS.h.

431 {
433 return ptCache.getActualPts(id);
434 }
unsigned PointsToID
Definition GeneralType.h:63

◆ getDFOutPtIdRef()

template<typename Key , typename KeySet , typename Data , typename DataSet >
PointsToID & SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getDFOutPtIdRef ( LocID  loc,
const Key var 
)
inlineprotected

Definition at line 561 of file PersistentPointsToDS.h.

562 {
563 return dfOutPtsMap[loc][var];
564 }

◆ getDFOutPtsSet()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const DataSet & SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getDFOutPtsSet ( LocID  loc,
const Key var 
)
inlineoverridevirtual

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Definition at line 436 of file PersistentPointsToDS.h.

437 {
439 return ptCache.getActualPts(id);
440 }

◆ getPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const DataSet & SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getPts ( const Key var)
inlineoverridevirtual

Get points-to set of var.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 358 of file PersistentPointsToDS.h.

359 {
360 return persPTData.getPts(var);
361 }

◆ getRevPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const KeySet & SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::getRevPts ( const Data datum)
inlineoverridevirtual

Get reverse points-to set of a datum.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 363 of file PersistentPointsToDS.h.

364 {
365 assert(false && "PersistentDFPTData::getRevPts: not supported yet!");
366 abort();
367 }

◆ hasDFInSet() [1/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::hasDFInSet ( LocID  loc) const
inlineoverridevirtual

Determine whether the DF IN/OUT sets have points-to sets.

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Definition at line 404 of file PersistentPointsToDS.h.

405 {
406 return dfInPtsMap.find(loc) != dfInPtsMap.end();
407 }

◆ hasDFInSet() [2/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::hasDFInSet ( LocID  loc,
const Key var 
) const
inlineoverridevirtual

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Definition at line 414 of file PersistentPointsToDS.h.

415 {
416 typename DFKeyToIDMap::const_iterator foundInKeyToId = dfInPtsMap.find(loc);
417 if (foundInKeyToId == dfInPtsMap.end()) return false;
418 const KeyToIDMap &inKeyToId = foundInKeyToId->second;
419 return (inKeyToId.find(var) != inKeyToId.end());
420 }
BasePersPTData::KeyToIDMap KeyToIDMap

◆ hasDFOutSet() [1/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::hasDFOutSet ( LocID  loc) const
inlineoverridevirtual

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Definition at line 409 of file PersistentPointsToDS.h.

410 {
411 return dfOutPtsMap.find(loc) != dfOutPtsMap.end();
412 }

◆ hasDFOutSet() [2/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::hasDFOutSet ( LocID  loc,
const Key var 
) const
inlineoverridevirtual

Access points-to set from data-flow IN/OUT set.

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Definition at line 422 of file PersistentPointsToDS.h.

423 {
424 typename DFKeyToIDMap::const_iterator foundOutKeyToId = dfOutPtsMap.find(loc);
425 if (foundOutKeyToId == dfOutPtsMap.end()) return false;
426 const KeyToIDMap &outKeyToId = foundOutKeyToId->second;
427 return (outKeyToId.find(var) != outKeyToId.end());
428 }

◆ remapAllPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::remapAllPts ( )
inlineoverridevirtual

Remaps all points-to sets to use the current mapping.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 394 of file PersistentPointsToDS.h.

395 {
397 }
void remapAllPts(void)
Remaps all points-to sets stored in the cache to the current mapping.

◆ unionPts() [1/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::unionPts ( const Key dstVar,
const DataSet &  srcDataSet 
)
inlineoverridevirtual

Performs pts(dstVar) = pts(dstVar) U srcDataSet.

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 374 of file PersistentPointsToDS.h.

375 {
376 return persPTData.unionPts(dstKey, srcDataSet);
377 }

◆ unionPts() [2/2]

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::unionPts ( const Key dstVar,
const Key srcVar 
)
inlineoverridevirtual

Performs pts(dstVar) = pts(dstVar) U pts(srcVar).

Implements SVF::PTData< Key, KeySet, Data, DataSet >.

Definition at line 369 of file PersistentPointsToDS.h.

370 {
371 return persPTData.unionPts(dstKey, srcKey);
372 }

◆ unionPtsThroughIds()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::unionPtsThroughIds ( PointsToID dst,
PointsToID src 
)
inlineprotected

Definition at line 549 of file PersistentPointsToDS.h.

550 {
551 PointsToID oldDst = dst;
552 dst = ptCache.unionPts(dst, src);
553 return oldDst != dst;
554 }
PointsToID unionPts(PointsToID lhs, PointsToID rhs)
Unions lhs and rhs and returns their union's ID.

◆ updateAllDFInFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateAllDFInFromIn ( LocID  srcLoc,
const Key srcVar,
LocID  dstLoc,
const Key dstVar 
)
inlineoverridevirtual

Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 447 of file PersistentPointsToDS.h.

448 {
450 }
bool updateDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override

◆ updateAllDFInFromOut()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateAllDFInFromOut ( LocID  srcLoc,
const Key srcVar,
LocID  dstLoc,
const Key dstVar 
)
inlineoverridevirtual

Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 457 of file PersistentPointsToDS.h.

458 {
460 }
bool updateDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).

◆ updateAllDFOutFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateAllDFOutFromIn ( LocID  loc,
const Key singleton,
bool  strongUpdates 
)
inlineoverridevirtual

For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).

Enable strong updates if required.

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 467 of file PersistentPointsToDS.h.

468 {
469 bool changed = false;
470 if (this->hasDFInSet(loc))
471 {
473 for (const typename KeyToIDMap::value_type &ki : inKeyToId)
474 {
475 const Key var = ki.first;
477 if (strongUpdates && var == singleton) continue;
478
479 if (updateDFOutFromIn(loc, var, loc, var)) changed = true;
480 }
481 }
482
483 return changed;
484 }
bool hasDFInSet(LocID loc) const override
bool updateDFOutFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).

◆ updateATVPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateATVPts ( const Key srcVar,
LocID  dstLoc,
const Key dstVar 
)
inlineoverridevirtual

Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 496 of file PersistentPointsToDS.h.

497 {
499 }
bool unionPtsThroughIds(PointsToID &dst, PointsToID &src)
PointsToID & getDFOutPtIdRef(LocID loc, const Key &var)

◆ updateDFInFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateDFInFromIn ( LocID  srcLoc,
const Key srcVar,
LocID  dstLoc,
const Key dstVar 
)
inlineoverridevirtual

Update points-to for IN/OUT set IN[loc:var] represents the points-to of variable var in the IN set of location loc. union(ptsDst, ptsSrc) represents ptsDst = ptsDst U ptsSrc.

Union (IN[dstLoc:dstVar], IN[srcLoc:srcVar]).

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 442 of file PersistentPointsToDS.h.

443 {
445 }
PointsToID & getDFInPtIdRef(LocID loc, const Key &var)

◆ updateDFInFromOut()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateDFInFromOut ( LocID  srcLoc,
const Key srcVar,
LocID  dstLoc,
const Key dstVar 
)
inlineoverridevirtual

Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 452 of file PersistentPointsToDS.h.

◆ updateDFOutFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateDFOutFromIn ( LocID  srcLoc,
const Key srcVar,
LocID  dstLoc,
const Key dstVar 
)
inlineoverridevirtual

Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 462 of file PersistentPointsToDS.h.

◆ updateTLVPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::updateTLVPts ( LocID  srcLoc,
const Key srcVar,
const Key dstVar 
)
inlineoverridevirtual

Update points-to set of top-level pointers with IN[srcLoc:srcVar].

Implements SVF::DFPTData< Key, KeySet, Data, DataSet >.

Reimplemented in SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 491 of file PersistentPointsToDS.h.

492 {
494 }

Member Data Documentation

◆ dfInPtsMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
DFKeyToIDMap SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::dfInPtsMap
protected

Address-taken points-to sets in IN-sets.

Definition at line 573 of file PersistentPointsToDS.h.

◆ dfOutPtsMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
DFKeyToIDMap SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::dfOutPtsMap
protected

Address-taken points-to sets in OUT-sets.

Definition at line 575 of file PersistentPointsToDS.h.

◆ persPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
PersistentPTData<Key, KeySet, Data, DataSet> SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::persPTData
protected

PTData for top-level pointers. We will also use its cache for address-taken pointers.

Definition at line 570 of file PersistentPointsToDS.h.

◆ ptCache

template<typename Key , typename KeySet , typename Data , typename DataSet >
PersistentPointsToCache<DataSet>& SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >::ptCache
protected

Definition at line 567 of file PersistentPointsToDS.h.


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