53#ifndef ABSTRACT_POINTSTO_H_
54#define ABSTRACT_POINTSTO_H_
73template <
typename Key,
typename KeySet,
typename Data,
typename DataSet>
148template <
typename Key,
typename KeySet,
typename Data,
typename DataSet>
182 return ptd->getPTDTY() == PTDataTy::Diff
183 ||
ptd->getPTDTY() == PTDataTy::MutDiff
184 ||
ptd->getPTDTY() == PTDataTy::PersDiff;
193template <
typename Key,
typename KeySet,
typename Data,
typename DataSet>
268template <
typename Key,
typename KeySet,
typename Data,
typename DataSet,
typename VersionedKey,
typename VersionedKeySet>
301 return ptd->getPTDTY() == PTDataTy::Versioned
302 ||
ptd->getPTDTY() == PTDataTy::MutVersioned
303 ||
ptd->getPTDTY() == PTDataTy::PersVersioned;
virtual bool updateATVPts(const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.
static bool classof(const DFPTData< Key, KeySet, Data, DataSet > *)
virtual bool hasDFOutSet(LocID loc, const Key &var) const =0
virtual bool updateDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
virtual bool hasDFOutSet(LocID loc) const =0
virtual const DataSet & getDFInPtsSet(LocID loc, const Key &var)=0
DFPTData(bool reversePT=true, PTDataTy ty=BasePTData::DataFlow)
Constructor.
virtual bool updateAllDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.
PTData< Key, KeySet, Data, DataSet > BasePTData
virtual bool updateAllDFOutFromIn(LocID loc, const Key &singleton, bool strongUpdates)=0
For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).
virtual bool updateDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
virtual bool updateAllDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.
virtual bool updateTLVPts(LocID srcLoc, const Key &srcVar, const Key &dstVar)=0
Update points-to set of top-level pointers with IN[srcLoc:srcVar].
BasePTData::PTDataTy PTDataTy
virtual bool hasDFInSet(LocID loc, const Key &var) const =0
static bool classof(const PTData< Key, KeySet, Data, DataSet > *ptd)
virtual bool hasDFInSet(LocID loc) const =0
virtual void clearAllDFOutUpdatedVar(LocID)=0
virtual bool updateDFOutFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
virtual const DataSet & getDFOutPtsSet(LocID loc, const Key &var)=0
virtual const DataSet & getDiffPts(Key &var)=0
Get diff points to.
static bool classof(const DiffPTData< Key, KeySet, Data, DataSet > *)
virtual void updatePropaPtsMap(Key &src, Key &dst)=0
virtual bool computeDiffPts(Key &var, const DataSet &all)=0
BasePTData::PTDataTy PTDataTy
virtual void clearPropaPts(Key &var)=0
Clear propagated points-to set of var.
DiffPTData(bool reversePT=true, PTDataTy ty=PTDataTy::Diff)
PTData< Key, KeySet, Data, DataSet > BasePTData
static bool classof(const PTData< Key, KeySet, Data, DataSet > *ptd)
virtual void clearPts(const Key &var, const Data &element)=0
Clears element from the points-to set of var.
PTData(bool reversePT=true, PTDataTy ty=PTDataTy::Base)
bool rev
Whether we maintain reverse points-to sets or not.
virtual Map< DataSet, unsigned > getAllPts(bool liveOnly) const =0
PTDataTy
Types of a points-to data structures.
virtual const DataSet & getPts(const Key &var)=0
Get points-to set of var.
virtual void clearFullPts(const Key &var)=0
Fully clears the points-to set of var.
virtual void dumpPTData()=0
Dump stored keys and points-to sets.
virtual bool unionPts(const Key &dstVar, const DataSet &srcDataSet)=0
Performs pts(dstVar) = pts(dstVar) U srcDataSet.
virtual const KeySet & getRevPts(const Data &datum)=0
Get reverse points-to set of a datum.
virtual bool addPts(const Key &var, const Data &element)=0
Adds element to the points-to set associated with var.
virtual void clear()=0
Clears all points-to sets as if nothing is stored.
PTDataTy getPTDTY() const
Get the type of points-to data structure that this is.
virtual void remapAllPts(void)=0
Remaps all points-to sets to use the current mapping.
virtual bool unionPts(const Key &dstVar, const Key &srcVar)=0
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
virtual void clearPts(const VersionedKey &vk, const Data &element)=0
VersionedPTData(bool reversePT=true, PTDataTy ty=PTDataTy::Versioned)
static bool classof(const VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet > *)
virtual void clearFullPts(const VersionedKey &vk)=0
virtual bool unionPts(const VersionedKey &dstVar, const Key &srcVar)=0
static bool classof(const PTData< Key, KeySet, Data, DataSet > *ptd)
virtual const DataSet & getPts(const VersionedKey &vk)=0
virtual bool unionPts(const VersionedKey &dstVar, const VersionedKey &srcVar)=0
virtual bool unionPts(const Key &dstVar, const VersionedKey &srcVar)=0
PTData< Key, KeySet, Data, DataSet > BasePTData
virtual const VersionedKeySet & getVersionedKeyRevPts(const Data &datum)=0
virtual bool unionPts(const VersionedKey &dstVar, const DataSet &srcDataSet)=0
virtual bool addPts(const VersionedKey &vk, const Data &element)=0
BasePTData::PTDataTy PTDataTy
virtual ~VersionedPTData()
llvm::IRBuilder IRBuilder