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 333 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 338 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 339 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 336 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 343 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 342 of file PersistentPointsToDS.h.

◆ LocID

Definition at line 341 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 337 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 345 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:76

◆ ~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 378 of file PersistentPointsToDS.h.

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

◆ 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 535 of file PersistentPointsToDS.h.

536 {
537 return true;
538 }

◆ 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 540 of file PersistentPointsToDS.h.

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

◆ 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 350 of file PersistentPointsToDS.h.

351 {
352 dfInPtsMap.clear();
353 dfOutPtsMap.clear();
354 persPTData.clear();
355 }
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 388 of file PersistentPointsToDS.h.

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

◆ 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 383 of file PersistentPointsToDS.h.

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

◆ 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 398 of file PersistentPointsToDS.h.

399 {
400 persPTData.dumpPTData();
401 }

◆ 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 500 of file PersistentPointsToDS.h.

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

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

◆ 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 429 of file PersistentPointsToDS.h.

430 {
432 return ptCache.getActualPts(id);
433 }
unsigned PointsToID
Definition GeneralType.h:83

◆ 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 560 of file PersistentPointsToDS.h.

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

◆ 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 435 of file PersistentPointsToDS.h.

436 {
438 return ptCache.getActualPts(id);
439 }

◆ 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 357 of file PersistentPointsToDS.h.

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

◆ 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 362 of file PersistentPointsToDS.h.

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

◆ 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 403 of file PersistentPointsToDS.h.

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

◆ 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 413 of file PersistentPointsToDS.h.

414 {
415 typename DFKeyToIDMap::const_iterator foundInKeyToId = dfInPtsMap.find(loc);
416 if (foundInKeyToId == dfInPtsMap.end()) return false;
417 const KeyToIDMap &inKeyToId = foundInKeyToId->second;
418 return (inKeyToId.find(var) != inKeyToId.end());
419 }
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 408 of file PersistentPointsToDS.h.

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

◆ 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 421 of file PersistentPointsToDS.h.

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

◆ 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 393 of file PersistentPointsToDS.h.

394 {
396 }
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 373 of file PersistentPointsToDS.h.

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

◆ 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 368 of file PersistentPointsToDS.h.

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

◆ 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 548 of file PersistentPointsToDS.h.

549 {
550 PointsToID oldDst = dst;
551 dst = ptCache.unionPts(dst, src);
552 return oldDst != dst;
553 }
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 446 of file PersistentPointsToDS.h.

447 {
449 }
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 456 of file PersistentPointsToDS.h.

457 {
459 }
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 466 of file PersistentPointsToDS.h.

467 {
468 bool changed = false;
469 if (this->hasDFInSet(loc))
470 {
472 for (const typename KeyToIDMap::value_type &ki : inKeyToId)
473 {
474 const Key var = ki.first;
476 if (strongUpdates && var == singleton) continue;
477
478 if (updateDFOutFromIn(loc, var, loc, var)) changed = true;
479 }
480 }
481
482 return changed;
483 }
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 495 of file PersistentPointsToDS.h.

496 {
498 }
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 441 of file PersistentPointsToDS.h.

442 {
444 }
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 451 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 461 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 490 of file PersistentPointsToDS.h.

491 {
493 }

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 572 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 574 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 569 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 566 of file PersistentPointsToDS.h.


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