Static Value-Flow Analysis
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet > Class Template Reference

Incremental version of the persistent data-flow points-to data structure. More...

#include <PersistentPointsToDS.h>

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

Public Types

typedef PTData< Key, KeySet, Data, DataSet > BasePTData
 
typedef PersistentPTData< Key, KeySet, Data, DataSet > BasePersPTData
 
typedef DFPTData< Key, KeySet, Data, DataSet > BaseDFPTData
 
typedef PersistentDFPTData< Key, KeySet, Data, DataSet > BasePersDFPTData
 
typedef BasePTData::PTDataTy PTDataTy
 
typedef BaseDFPTData::LocID LocID
 
typedef Map< LocID, KeySet > UpdatedVarMap
 
- Public Types inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >
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

 PersistentIncDFPTData (PersistentPointsToCache< DataSet > &cache, bool reversePT=true, PTDataTy ty=BasePTData::PersIncDataFlow)
 Constructor. More...
 
 ~PersistentIncDFPTData () override=default
 
bool updateDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 
bool updateDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]). More...
 
bool updateDFOutFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]). More...
 
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. More...
 
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. More...
 
bool updateAllDFOutFromIn (LocID loc, const Key &singleton, bool strongUpdates) override
 For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var). More...
 
bool updateTLVPts (LocID srcLoc, const Key &srcVar, const Key &dstVar) override
 Update points-to set of top-level pointers with IN[srcLoc:srcVar]. More...
 
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. More...
 
void clearAllDFOutUpdatedVar (LocID loc) override
 
void clear () override
 Clears all points-to sets as if nothing is stored. More...
 
- Public Member Functions inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >
 PersistentDFPTData (PersistentPointsToCache< DataSet > &cache, bool reversePT=true, PTDataTy ty=PTDataTy::PersDataFlow)
 
 ~PersistentDFPTData () override=default
 
const DataSet & getPts (const Key &var) override
 Get points-to set of var. More...
 
const KeySet & getRevPts (const Data &) override
 Get reverse points-to set of a datum. More...
 
bool unionPts (const Key &dstKey, const Key &srcKey) override
 Performs pts(dstVar) = pts(dstVar) U pts(srcVar). More...
 
bool unionPts (const Key &dstKey, const DataSet &srcDataSet) override
 Performs pts(dstVar) = pts(dstVar) U srcDataSet. More...
 
bool addPts (const Key &dstKey, const Data &element) override
 Adds element to the points-to set associated with var. More...
 
void clearPts (const Key &var, const Data &element) override
 Clears element from the points-to set of var. More...
 
void clearFullPts (const Key &var) override
 Fully clears the points-to set of var. More...
 
void remapAllPts () override
 Remaps all points-to sets to use the current mapping. More...
 
void dumpPTData () override
 Dump stored keys and points-to sets. More...
 
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
 
Map< DataSet, unsigned > getAllPts (bool liveOnly) const override
 
- Public Member Functions inherited from SVF::DFPTData< Key, KeySet, Data, DataSet >
 DFPTData (bool reversePT=true, PTDataTy ty=BasePTData::DataFlow)
 Constructor. More...
 
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. More...
 

Static Public Member Functions

static bool classof (const PersistentIncDFPTData< Key, KeySet, Data, DataSet > *)
 
static bool classof (const PTData< Key, KeySet, Data, DataSet > *ptd)
 
- Static Public Member Functions inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >
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)
 

Private Member Functions

void setVarDFInSetUpdated (LocID loc, const Key &var)
 Handle address-taken variables whose IN pts changed. More...
 
void removeVarFromDFInUpdatedSet (LocID loc, const Key &var)
 Remove var from loc's IN updated set. More...
 
bool varHasNewDFInPts (LocID loc, const Key &var)
 Return TRUE if var has a new pts in loc's IN set. More...
 
const KeySet & getDFInUpdatedVar (LocID loc)
 Get all variables which have new pts information in loc's IN set. More...
 
void setVarDFOutSetUpdated (LocID loc, const Key &var)
 
void removeVarFromDFOutUpdatedSet (LocID loc, const Key &var)
 Remove var from loc's OUT updated set. More...
 
bool varHasNewDFOutPts (LocID loc, const Key &var)
 Return TRUE if var has a new pts in loc's OUT set. More...
 
const KeySet & getDFOutUpdatedVar (LocID loc)
 Get all variables which have new pts info in loc's OUT set. More...
 

Private Attributes

UpdatedVarMap outUpdatedVarMap
 
UpdatedVarMap inUpdatedVarMap
 

Additional Inherited Members

- Protected Member Functions inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >
bool unionPtsThroughIds (PointsToID &dst, PointsToID &src)
 
PointsToIDgetDFInPtIdRef (LocID loc, const Key &var)
 
PointsToIDgetDFOutPtIdRef (LocID loc, const Key &var)
 
- Protected Attributes inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >
PersistentPointsToCache< DataSet > & ptCache
 
PersistentPTData< Key, KeySet, Data, DataSet > persPTData
 PTData for top-level pointers. We will also use its cache for address-taken pointers. More...
 
DFKeyToIDMap dfInPtsMap
 Address-taken points-to sets in IN-sets. More...
 
DFKeyToIDMap dfOutPtsMap
 Address-taken points-to sets in OUT-sets. More...
 
- Protected Attributes inherited from SVF::PTData< Key, KeySet, Data, DataSet >
bool rev
 Whether we maintain reverse points-to sets or not. More...
 
PTDataTy ptdTy
 

Detailed Description

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

Incremental version of the persistent data-flow points-to data structure.

Definition at line 580 of file PersistentPointsToDS.h.

Member Typedef Documentation

◆ BaseDFPTData

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

Definition at line 585 of file PersistentPointsToDS.h.

◆ BasePersDFPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef PersistentDFPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePersDFPTData

Definition at line 586 of file PersistentPointsToDS.h.

◆ BasePersPTData

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

Definition at line 584 of file PersistentPointsToDS.h.

◆ BasePTData

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

Definition at line 583 of file PersistentPointsToDS.h.

◆ LocID

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef BaseDFPTData::LocID SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::LocID

Definition at line 589 of file PersistentPointsToDS.h.

◆ PTDataTy

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

Definition at line 587 of file PersistentPointsToDS.h.

◆ UpdatedVarMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef Map<LocID, KeySet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::UpdatedVarMap

Definition at line 590 of file PersistentPointsToDS.h.

Constructor & Destructor Documentation

◆ PersistentIncDFPTData()

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

Constructor.

Definition at line 594 of file PersistentPointsToDS.h.

595  : BasePersDFPTData(cache, reversePT, ty) { }
PersistentDFPTData< Key, KeySet, Data, DataSet > BasePersDFPTData

◆ ~PersistentIncDFPTData()

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

Member Function Documentation

◆ classof() [1/2]

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

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

Definition at line 721 of file PersistentPointsToDS.h.

722  {
723  return true;
724  }

◆ classof() [2/2]

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

Definition at line 726 of file PersistentPointsToDS.h.

727  {
728  return ptd->getPTDTY() == BasePTData::PersIncDataFlow;
729  }

◆ clear()

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

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

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 712 of file PersistentPointsToDS.h.

713  {
714  outUpdatedVarMap.clear();
715  inUpdatedVarMap.clear();
717  }
void clear() override
Clears all points-to sets as if nothing is stored.

◆ clearAllDFOutUpdatedVar()

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

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 700 of file PersistentPointsToDS.h.

701  {
702  if (this->hasDFOutSet(loc))
703  {
704  const KeySet vars = getDFOutUpdatedVar(loc);
705  for (const Key &var : vars)
706  {
708  }
709  }
710  }
bool hasDFOutSet(LocID loc) const override
const KeySet & getDFOutUpdatedVar(LocID loc)
Get all variables which have new pts info in loc's OUT set.
void removeVarFromDFOutUpdatedSet(LocID loc, const Key &var)
Remove var from loc's OUT updated set.

◆ getDFInUpdatedVar()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const KeySet& SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::getDFInUpdatedVar ( LocID  loc)
inlineprivate

Get all variables which have new pts information in loc's IN set.

Definition at line 758 of file PersistentPointsToDS.h.

759  {
760  return inUpdatedVarMap[loc];
761  }

◆ getDFOutUpdatedVar()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const KeySet& SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::getDFOutUpdatedVar ( LocID  loc)
inlineprivate

Get all variables which have new pts info in loc's OUT set.

Definition at line 788 of file PersistentPointsToDS.h.

789  {
790  return outUpdatedVarMap[loc];
791  }

◆ removeVarFromDFInUpdatedSet()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::removeVarFromDFInUpdatedSet ( LocID  loc,
const Key &  var 
)
inlineprivate

Remove var from loc's IN updated set.

Definition at line 743 of file PersistentPointsToDS.h.

744  {
745  typename UpdatedVarMap::iterator it = inUpdatedVarMap.find(loc);
746  if (it != inUpdatedVarMap.end()) it->second.erase(var);
747  }

◆ removeVarFromDFOutUpdatedSet()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::removeVarFromDFOutUpdatedSet ( LocID  loc,
const Key &  var 
)
inlineprivate

Remove var from loc's OUT updated set.

Definition at line 773 of file PersistentPointsToDS.h.

774  {
775  typename UpdatedVarMap::iterator it = outUpdatedVarMap.find(loc);
776  if (it != outUpdatedVarMap.end()) it->second.erase(var);
777  }

◆ setVarDFInSetUpdated()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::setVarDFInSetUpdated ( LocID  loc,
const Key &  var 
)
inlineprivate

Handle address-taken variables whose IN pts changed.

Add var into loc's IN updated set. Called when var's pts in loc's IN set is changed.

Definition at line 737 of file PersistentPointsToDS.h.

738  {
740  }
void insertKey(const Key &key, KeySet &keySet)
Inserts an element into a Set/CondSet (with ::insert).
Definition: SVFUtil.h:239

◆ setVarDFOutSetUpdated()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::setVarDFOutSetUpdated ( LocID  loc,
const Key &  var 
)
inlineprivate

Handle address-taken variables whose OUT pts changed

Add var into loc's OUT updated set. Called when var's pts in loc's OUT set changed

Definition at line 767 of file PersistentPointsToDS.h.

768  {
770  }

◆ updateAllDFInFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< 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.

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 649 of file PersistentPointsToDS.h.

650  {
651  if (this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFInPtIdRef(srcLoc, srcVar)))
652  {
653  setVarDFInSetUpdated(dstLoc, dstVar);
654  return true;
655  }
656 
657  return false;
658  }
bool unionPtsThroughIds(PointsToID &dst, PointsToID &src)
PointsToID & getDFInPtIdRef(LocID loc, const Key &var)
void setVarDFInSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose IN pts changed.

◆ updateAllDFInFromOut()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< 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.

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 638 of file PersistentPointsToDS.h.

639  {
640  if (this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFOutPtIdRef(srcLoc, srcVar)))
641  {
642  setVarDFInSetUpdated(dstLoc, dstVar);
643  return true;
644  }
645 
646  return false;
647  }
PointsToID & getDFOutPtIdRef(LocID loc, const Key &var)

◆ updateAllDFOutFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< 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).

Only variables which have a new (IN) pts need to be updated.

Enable strong updates if it is required to do so

Enable strong updates if required.

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 660 of file PersistentPointsToDS.h.

661  {
662  bool changed = false;
663  if (this->hasDFInSet(loc))
664  {
666  const KeySet vars = getDFInUpdatedVar(loc);
667  for (const Key &var : vars)
668  {
670  if (strongUpdates && var == singleton) continue;
671  if (updateDFOutFromIn(loc, var, loc, var)) changed = true;
672  }
673  }
674 
675  return changed;
676  }
bool hasDFInSet(LocID loc) const override
const KeySet & getDFInUpdatedVar(LocID loc)
Get all variables which have new pts information in loc's IN set.
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::PersistentIncDFPTData< 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.

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 689 of file PersistentPointsToDS.h.

690  {
691  if (this->unionPtsThroughIds(this->getDFOutPtIdRef(dstLoc, dstVar), this->persPTData.ptsMap[srcVar]))
692  {
693  setVarDFOutSetUpdated(dstLoc, dstVar);
694  return true;
695  }
696 
697  return false;
698  }
PersistentPTData< Key, KeySet, Data, DataSet > persPTData
PTData for top-level pointers. We will also use its cache for address-taken pointers.
void setVarDFOutSetUpdated(LocID loc, const Key &var)

◆ updateDFInFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< 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]).

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 599 of file PersistentPointsToDS.h.

600  {
601  if (varHasNewDFInPts(srcLoc, srcVar)
602  && this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFInPtIdRef(srcLoc, srcVar)))
603  {
604  setVarDFInSetUpdated(dstLoc, dstVar);
605  return true;
606  }
607 
608  return false;
609  }
bool varHasNewDFInPts(LocID loc, const Key &var)
Return TRUE if var has a new pts in loc's IN set.

◆ updateDFInFromOut()

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

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

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 611 of file PersistentPointsToDS.h.

612  {
613  if (varHasNewDFOutPts(srcLoc, srcVar)
614  && this->unionPtsThroughIds(this->getDFInPtIdRef(dstLoc, dstVar), this->getDFOutPtIdRef(srcLoc, srcVar)))
615  {
616  setVarDFInSetUpdated(dstLoc, dstVar);
617  return true;
618  }
619 
620  return false;
621  }
bool varHasNewDFOutPts(LocID loc, const Key &var)
Return TRUE if var has a new pts in loc's OUT set.

◆ updateDFOutFromIn()

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

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

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 623 of file PersistentPointsToDS.h.

624  {
625  if (varHasNewDFInPts(srcLoc, srcVar))
626  {
627  removeVarFromDFInUpdatedSet(srcLoc, srcVar);
628  if (this->unionPtsThroughIds(this->getDFOutPtIdRef(dstLoc, dstVar), this->getDFInPtIdRef(srcLoc, srcVar)))
629  {
630  setVarDFOutSetUpdated(dstLoc, dstVar);
631  return true;
632  }
633  }
634 
635  return false;
636  }
void removeVarFromDFInUpdatedSet(LocID loc, const Key &var)
Remove var from loc's IN updated set.

◆ updateTLVPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< 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].

Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 678 of file PersistentPointsToDS.h.

679  {
680  if (varHasNewDFInPts(srcLoc, srcVar))
681  {
682  removeVarFromDFInUpdatedSet(srcLoc, srcVar);
683  return this->unionPtsThroughIds(this->persPTData.ptsMap[dstVar], this->getDFInPtIdRef(srcLoc, srcVar));
684  }
685 
686  return false;
687  }

◆ varHasNewDFInPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::varHasNewDFInPts ( LocID  loc,
const Key &  var 
)
inlineprivate

Return TRUE if var has a new pts in loc's IN set.

Definition at line 750 of file PersistentPointsToDS.h.

751  {
752  typename UpdatedVarMap::iterator it = inUpdatedVarMap.find(loc);
753  if (it != inUpdatedVarMap.end()) return it->second.find(var) != it->second.end();
754  return false;
755  }

◆ varHasNewDFOutPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::varHasNewDFOutPts ( LocID  loc,
const Key &  var 
)
inlineprivate

Return TRUE if var has a new pts in loc's OUT set.

Definition at line 780 of file PersistentPointsToDS.h.

781  {
782  typename UpdatedVarMap::iterator it = outUpdatedVarMap.find(loc);
783  if (it != outUpdatedVarMap.end()) return it->second.find(var) != it->second.end();
784  return false;
785  }

Member Data Documentation

◆ inUpdatedVarMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
UpdatedVarMap SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::inUpdatedVarMap
private

Definition at line 797 of file PersistentPointsToDS.h.

◆ outUpdatedVarMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
UpdatedVarMap SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::outUpdatedVarMap
private

Definition at line 796 of file PersistentPointsToDS.h.


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