SVF
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SVF::FlowSensitiveTBHC Class Reference

#include <FlowSensitiveTBHC.h>

Inheritance diagram for SVF::FlowSensitiveTBHC:
SVF::FlowSensitive SVF::TypeBasedHeapCloning SVF::WPAFSSolver< GraphType > SVF::BVDataPTAImpl SVF::WPASolver< GraphType > SVF::PointerAnalysis

Public Member Functions

 FlowSensitiveTBHC (PAG *_pag, PTATY type=FSTBHC_WPA)
 Constructor. More...
 
virtual ~FlowSensitiveTBHC ()
 Destructor. More...
 
virtual void analyze () override
 Flow sensitive analysis with FSTBHC. More...
 
virtual void initialize () override
 Initialize analysis. More...
 
virtual void finalize () override
 Finalize analysis. More...
 
virtual const std::string PTAName () const override
 Get PTA name. More...
 
virtual bool propAlongIndirectEdge (const IndirectSVFGEdge *edge) override
 Propagate points-to information along an INDIRECT SVFG edge. More...
 
virtual bool propAlongDirectEdge (const DirectSVFGEdge *edge) override
 Propagate points-to information along a DIRECT SVFG edge. More...
 
virtual bool processAddr (const AddrSVFGNode *addr) override
 
virtual bool processGep (const GepSVFGNode *gep) override
 
virtual bool processLoad (const LoadSVFGNode *load) override
 
virtual bool processStore (const StoreSVFGNode *store) override
 
virtual bool processPhi (const PHISVFGNode *phi) override
 
virtual bool processCopy (const CopySVFGNode *copy) override
 
virtual const NodeBSgetAllFieldsObjNode (NodeID id) override
 
virtual bool updateInFromIn (const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar) override
 
virtual bool updateInFromOut (const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar) override
 
virtual bool unionPtsFromIn (const SVFGNode *stmt, NodeID srcVar, NodeID dstVar) override
 
virtual bool unionPtsFromTop (const SVFGNode *stmt, NodeID srcVar, NodeID dstVar) override
 
virtual bool propDFOutToIn (const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar) override
 
virtual bool propDFInToIn (const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar) override
 
virtual void expandFIObjs (const PointsTo &pts, PointsTo &expandedPts) override
 Expand FI objects. More...
 
const DITypegetTypeFromCTirMetadata (const SVFGNode *)
 
- Public Member Functions inherited from SVF::FlowSensitive
 FlowSensitive (PAG *_pag, PTATY type=FSSPARSE_WPA)
 Constructor. More...
 
virtual ~FlowSensitive ()
 Destructor. More...
 
virtual bool runOnModule (SVFModule *)
 We start from here. More...
 
SVFGgetSVFG () const
 Return SVFG. More...
 
- Public Member Functions inherited from SVF::WPAFSSolver< GraphType >
 WPAFSSolver ()
 Constructor. More...
 
virtual ~WPAFSSolver ()
 Destructor. More...
 
virtual NodeID sccRepNode (NodeID id) const
 SCC methods. More...
 
- Public Member Functions inherited from SVF::BVDataPTAImpl
 BVDataPTAImpl (PAG *pag, PointerAnalysis::PTATY type, bool alias_check=true)
 Constructor. More...
 
virtual ~BVDataPTAImpl ()
 Destructor. More...
 
void destroy ()
 Release memory. More...
 
virtual void clearPts (NodeID id, NodeID element)
 Remove element from the points-to set of id. More...
 
virtual void clearFullPts (NodeID id)
 Clear points-to set of id. More...
 
virtual void clearAllPts ()
 Clear all data. More...
 
virtual AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB)
 Interface expose to users of our pointer analysis, given Location infos. More...
 
virtual AliasResult alias (const Value *V1, const Value *V2)
 Interface expose to users of our pointer analysis, given Value infos. More...
 
virtual AliasResult alias (NodeID node1, NodeID node2)
 Interface expose to users of our pointer analysis, given PAGNodeID. More...
 
virtual AliasResult alias (const PointsTo &pts1, const PointsTo &pts2)
 Interface expose to users of our pointer analysis, given two pts. More...
 
virtual const PointsTogetPts (NodeID id)
 
virtual const NodeBSgetRevPts (NodeID nodeId)
 
virtual bool unionPts (NodeID id, const PointsTo &target)
 
virtual bool unionPts (NodeID id, NodeID ptd)
 
virtual bool addPts (NodeID id, NodeID ptd)
 
virtual void writeToFile (const std::string &filename)
 Interface for analysis result storage on filesystem. More...
 
virtual bool readFromFile (const std::string &filename)
 
virtual void dumpCPts ()
 dump and debug, print out conditional pts More...
 
virtual void dumpTopLevelPtsTo ()
 
virtual void dumpAllPts ()
 
- Public Member Functions inherited from SVF::PointerAnalysis
Size_t getNumOfResolvedIndCallEdge () const
 Return number of resolved indirect call edges. More...
 
PTACallGraphgetPTACallGraph () const
 Return call graph. More...
 
CallGraphSCCgetCallGraphSCC () const
 Return call graph SCC. More...
 
 PointerAnalysis (PAG *pag, PTATY ty=Default_PTA, bool alias_check=true)
 Constructor. More...
 
PTATY getAnalysisTy () const
 Type of pointer analysis. More...
 
PTAImplTy getImplTy () const
 Return implementation type of the pointer analysis. More...
 
PTAStatgetStat () const
 Get PTA stat. More...
 
SVFModulegetModule () const
 Module. More...
 
OrderedNodeSetgetAllValidPtrs ()
 Get all Valid Pointers for resolution. More...
 
virtual ~PointerAnalysis ()
 Destructor. More...
 
virtual void computeDDAPts (NodeID)
 Compute points-to results on-demand, overridden by derived classes. More...
 
virtual void clearPts ()
 Clear points-to data. More...
 
void printIndCSTargets (const CallBlockNode *cs, const FunctionSet &targets)
 Print targets of a function pointer. More...
 
void dumpStat ()
 Dump the statistics. More...
 
bool printStat ()
 Whether print statistics. More...
 
void disablePrintStat ()
 Whether print statistics. More...
 
virtual void resolveIndCalls (const CallBlockNode *cs, const PointsTo &target, CallEdgeMap &newEdges, LLVMCallGraph *callgraph=nullptr)
 Resolve indirect call edges. More...
 
bool matchArgs (const CallBlockNode *cs, const SVFFunction *callee)
 Match arguments for callsite at caller and callee. More...
 
CommonCHGraphgetCHGraph () const
 get CHGraph More...
 
void getVFnsFromCHA (const CallBlockNode *cs, VFunSet &vfns)
 
void getVFnsFromPts (const CallBlockNode *cs, const PointsTo &target, VFunSet &vfns)
 
void connectVCallToVFns (const CallBlockNode *cs, const VFunSet &vfns, CallEdgeMap &newEdges)
 
virtual void resolveCPPIndCalls (const CallBlockNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
 Resolve cpp indirect call edges. More...
 
const TypeSystemgetTypeSystem () const
 get TypeSystem More...
 
PAGgetPAG () const
 
virtual void dumpPts (NodeID ptr, const PointsTo &pts)
 
void printIndCSTargets ()
 
void dumpAllTypes ()
 
bool containBlackHoleNode (const PointsTo &pts)
 Determine whether a points-to contains a black hole or constant node. More...
 
bool containConstantNode (const PointsTo &pts)
 
virtual bool isBlkObjOrConstantObj (NodeID ptd) const
 
bool isNonPointerObj (NodeID ptd) const
 
bool isHeapMemObj (NodeID id) const
 Whether this object is heap or array. More...
 
bool isArrayMemObj (NodeID id) const
 
bool isFIObjNode (NodeID id) const
 
NodeID getBaseObjNode (NodeID id)
 
NodeID getFIObjNode (NodeID id)
 
NodeID getGepObjNode (NodeID id, const LocationSet &ls)
 
void setObjFieldInsensitive (NodeID id)
 
bool isFieldInsensitive (NodeID id) const
 
CallEdgeMapgetIndCallMap ()
 Get callees from an indirect callsite. More...
 
bool hasIndCSCallees (const CallBlockNode *cs) const
 
const FunctionSetgetIndCSCallees (const CallBlockNode *cs) const
 
void callGraphSCCDetection ()
 CallGraph SCC related methods. More...
 
NodeID getCallGraphSCCRepNode (NodeID id) const
 Get SCC rep node of a SVFG node. More...
 
bool inSameCallGraphSCC (const SVFFunction *fun1, const SVFFunction *fun2)
 Return TRUE if this edge is inside a CallGraph SCC, i.e., src node and dst node are in the same SCC on the SVFG. More...
 
bool isInRecursion (const SVFFunction *fun) const
 
bool isLocalVarInRecursiveFun (NodeID id) const
 Whether a local variable is in function recursions. More...
 
- Public Member Functions inherited from SVF::TypeBasedHeapCloning
virtual ~TypeBasedHeapCloning ()
 

Static Public Member Functions

static const MDNodegetRawCTirMetadata (const SVFGNode *)
 
static bool classof (const FlowSensitiveTBHC *)
 For LLVM RTTI. More...
 
static bool classof (const PointerAnalysis *pta)
 For LLVM RTTI. More...
 
- Static Public Member Functions inherited from SVF::FlowSensitive
static FlowSensitivecreateFSWPA (PAG *_pag)
 Create signle instance of flow-sensitive pointer analysis. More...
 
static void releaseFSWPA ()
 Release flow-sensitive pointer analysis. More...
 
static bool classof (const FlowSensitive *)
 Methods for support type inquiry through isa, cast, and dyn_cast. More...
 
static bool classof (const PointerAnalysis *pta)
 
- Static Public Member Functions inherited from SVF::BVDataPTAImpl
static bool classof (const PointerAnalysis *pta)
 
- Static Public Member Functions inherited from SVF::TypeBasedHeapCloning
static const MDNodegetRawCTirMetadata (const Value *)
 Returns raw ctir metadata of a Value. Returns null if it doesn't exist. More...
 

Protected Member Functions

virtual void backPropagate (NodeID clone) override
 
virtual void countAliases (Set< std::pair< NodeID, NodeID >> cmp, unsigned *mayAliases, unsigned *noAliases) override
 Fills may/noAliases for the location/pointer pairs in cmp. More...
 
- Protected Member Functions inherited from SVF::FlowSensitive
virtual NodeStackSCCDetect ()
 SCC detection. More...
 
bool isStrongUpdate (const SVFGNode *node, NodeID &singleton)
 Return TRUE if this is a strong update STORE statement. More...
 
virtual void printCTirAliasStats (void)
 
void svfgStat ()
 
virtual bool propFromSrcToDst (SVFGEdge *edge)
 Propagation. More...
 
virtual bool propVarPtsFromSrcToDst (NodeID var, const SVFGNode *src, const SVFGNode *dst)
 Propagate points-to information of a certain variable from src to dst. More...
 
virtual bool propagateFromAPToFP (const ActualParmSVFGNode *ap, const SVFGNode *dst)
 
virtual bool propagateFromFRToAR (const FormalRetSVFGNode *fr, const SVFGNode *dst)
 
virtual bool weakUpdateOutFromIn (const SVFGNode *node)
 Handle weak updates. More...
 
virtual bool strongUpdateOutFromIn (const SVFGNode *node, NodeID singleton)
 Handle strong updates. More...
 
bool propVarPtsAfterCGUpdated (NodeID var, const SVFGNode *src, const SVFGNode *dst)
 
bool updateOutFromIn (const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
 Update data-flow points-to data. More...
 
void clearAllDFOutVarFlag (const SVFGNode *stmt)
 
virtual void processNode (NodeID nodeId)
 Handle various constraints. More...
 
bool processSVFGNode (SVFGNode *node)
 
bool updateCallGraph (const CallSiteToFunPtrMap &callsites)
 Update call graph. More...
 
void connectCallerAndCallee (const CallEdgeMap &newEdges, SVFGEdgeSetTy &edges)
 Connect nodes in SVFG. More...
 
virtual void updateConnectedNodes (const SVFGEdgeSetTy &edges)
 Update nodes connected during updating call graph. More...
 
const PointsTogetDFInPtsSet (const SVFGNode *stmt, const NodeID node)
 Get points-to set for a node from data flow IN/OUT set at a statement. More...
 
const PointsTogetDFOutPtsSet (const SVFGNode *stmt, const NodeID node)
 
const DFInOutMapgetDFInputMap () const
 
const DFInOutMapgetDFOutputMap () const
 
- Protected Member Functions inherited from SVF::WPASolver< GraphType >
 WPASolver ()
 Constructor. More...
 
virtual ~WPASolver ()
 Destructor. More...
 
SCCgetSCCDetector () const
 Get SCC detector. More...
 
virtual NodeStackSCCDetect (NodeSet &candidates)
 
virtual void initWorklist ()
 
virtual void solveWorklist ()
 
GNODENode (NodeID id)
 Get node on the graph. More...
 
NodeID Node_Index (GNODE node)
 Get node ID. More...
 
const GraphType graph ()
 Get/Set graph methods. More...
 
void setGraph (GraphType g)
 
virtual void collapsePWCNode (NodeID)
 collapse positive weight cycles of a graph More...
 
virtual void collapseFields ()
 
virtual void propagate (GNODE *v)
 
virtual bool propFromSrcToDst (GEDGE *)
 Propagate information from source to destination node, to be implemented in the child class. More...
 
NodeID popFromWorklist ()
 Worklist operations. More...
 
virtual void pushIntoWorklist (NodeID id)
 
bool isWorklistEmpty ()
 
bool isInWorklist (NodeID id)
 
- Protected Member Functions inherited from SVF::BVDataPTAImpl
PTDataTygetPTDataTy () const
 Get points-to data structure. More...
 
DiffPTDataTygetDiffPTDataTy () const
 
DFPTDataTygetDFPTDataTy () const
 
MutDFPTDataTygetMutDFPTDataTy () const
 
VersionedPTDataTygetVersionedPTDataTy () const
 
virtual void onTheFlyCallGraphSolve (const CallSiteToFunPtrMap &callsites, CallEdgeMap &newEdges)
 On the fly call graph construction. More...
 
virtual void normalizePointsTo ()
 
- Protected Member Functions inherited from SVF::PointerAnalysis
const CallSiteToFunPtrMapgetIndirectCallsites () const
 Return all indirect callsites. More...
 
NodeID getFunPtr (const CallBlockNode *cs) const
 Return function pointer PAGNode at a callsite cs. More...
 
bool dumpGraph ()
 Whether to dump the graph for debugging purpose. More...
 
void resetObjFieldSensitive ()
 Reset all object node as field-sensitive. More...
 
virtual void validateTests ()
 Alias check functions to verify correctness of pointer analysis. More...
 
virtual void validateSuccessTests (std::string fun)
 
virtual void validateExpectedFailureTests (std::string fun)
 
- Protected Member Functions inherited from SVF::TypeBasedHeapCloning
 TypeBasedHeapCloning (BVDataPTAImpl *pta)
 Constructor. pta is the pointer analysis using this object (i.e. that which is extending). More...
 
void setDCHG (DCHGraph *dchg)
 DCHG must be set by extending class once the DCHG is available. More...
 
void setPAG (PAG *pag)
 PAG must be set by extending class once the PAG is available. More...
 
bool isBlkObjOrConstantObj (NodeID o) const
 
bool isBase (const DIType *a, const DIType *b) const
 
bool isClone (NodeID o) const
 Returns true if o is a clone. More...
 
void setType (NodeID o, const DIType *t)
 Sets the type (in objToType) of o. More...
 
const DITypegetType (NodeID o) const
 Returns the type (from objToType) of o. Asserts existence. More...
 
void setAllocationSite (NodeID o, NodeID site)
 Sets the allocation site (in objToAllocation) of o. More...
 
NodeID getAllocationSite (NodeID o) const
 Returns the allocation site (from objToAllocation) of o. Asserts existence. More...
 
const NodeBS getObjsWithClones (void)
 Returns objects that have clones (any key in objToClones). More...
 
void addClone (NodeID o, NodeID c)
 Add a clone c to object o. More...
 
const NodeBSgetClones (NodeID o)
 Returns all the clones of o. More...
 
void setOriginalObj (NodeID c, NodeID o)
 
NodeID getOriginalObj (NodeID c) const
 Returns the original object c is cloned from. If c is not a clone, returns itself. More...
 
PointsTogetFilterSet (NodeID loc)
 Returns the filter set of a location. Not const; could create empty PointsTo. More...
 
void addGepToObj (NodeID gep, NodeID base, unsigned offset)
 Associates gep with base (through objToGeps and memObjToGeps). More...
 
const NodeBSgetGepObjsFromMemObj (const MemObj *memObj, unsigned offset)
 
const NodeBSgetGepObjs (NodeID base)
 
const NodeBS getGepObjClones (NodeID base, unsigned offset)
 
bool init (NodeID loc, NodeID p, const DIType *tildet, bool reuse, bool gep=false)
 
NodeID cloneObject (NodeID o, const DIType *type, bool reuse)
 
NodeID addCloneDummyObjNode (const MemObj *mem)
 Add clone dummy object node to PAG. More...
 
NodeID addCloneGepObjNode (const MemObj *mem, const LocationSet &l)
 Add clone GEP object node to PAG. More...
 
NodeID addCloneFIObjNode (const MemObj *mem)
 Add clone FI object node to PAG. More...
 
const DITypegetTypeFromCTirMetadata (const Value *)
 
void validateTBHCTests (SVFModule *svfMod)
 
void dumpStats (void)
 Dump some statistics we tracked. More...
 

Private Member Functions

void determineWhichGepsAreLoads (void)
 
bool gepIsLoad (NodeID gep)
 

Private Attributes

bool storeReuse
 Whether to allow for reuse at stores. More...
 
bool allReuse
 
Map< NodeID, NodeBSgepToSVFGRetrievers
 Maps GEP objects to the SVFG nodes that retrieved them with getGepObjClones. More...
 
NodeBS loadGeps
 Maps whether a (SVFG) GEP node is a load or not. More...
 

Additional Inherited Members

- Public Types inherited from SVF::FlowSensitive
typedef BVDataPTAImpl::MutDFPTDataTy MutDFPTDataTy
 
typedef BVDataPTAImpl::MutDFPTDataTy::DFPtsMap DFInOutMap
 
typedef BVDataPTAImpl::MutDFPTDataTy::PtsMap PtsMap
 
- Public Types inherited from SVF::WPASolver< GraphType >
typedef llvm::GraphTraits< GraphType > GTraits
 Define the GTraits and node iterator for printing. More...
 
typedef GTraits::NodeRef GNODE
 
typedef GTraits::EdgeType GEDGE
 
typedef GTraits::ChildIteratorType child_iterator
 
typedef SCCDetection< GraphType > SCC
 
typedef FIFOWorkList< NodeIDWorkList
 
- Public Types inherited from SVF::BVDataPTAImpl
typedef PTData< NodeID, NodeBS, NodeID, PointsToPTDataTy
 
typedef MutablePTData< NodeID, NodeBS, NodeID, PointsToMutPTDataTy
 
typedef DiffPTData< NodeID, NodeBS, NodeID, PointsToDiffPTDataTy
 
typedef MutableDiffPTData< NodeID, NodeBS, NodeID, PointsToMutDiffPTDataTy
 
typedef DFPTData< NodeID, NodeBS, NodeID, PointsToDFPTDataTy
 
typedef MutableDFPTData< NodeID, NodeBS, NodeID, PointsToMutDFPTDataTy
 
typedef IncMutableDFPTData< NodeID, NodeBS, NodeID, PointsToIncMutDFPTDataTy
 
typedef VersionedPTData< NodeID, NodeBS, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > VersionedPTDataTy
 
typedef MutableVersionedPTData< NodeID, NodeBS, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > MutVersionedPTDataTy
 
- Public Types inherited from SVF::PointerAnalysis
enum  PTATY {
  Andersen_BASE, Andersen_WPA, AndersenLCD_WPA, AndersenHCD_WPA,
  AndersenHLCD_WPA, AndersenSCD_WPA, AndersenSFR_WPA, AndersenWaveDiff_WPA,
  AndersenWaveDiffWithType_WPA, Steensgaard_WPA, CSCallString_WPA, CSSummary_WPA,
  FSDATAFLOW_WPA, FSSPARSE_WPA, FSTBHC_WPA, VFS_WPA,
  FSCS_WPA, FSCSPS_WPA, ADAPTFSCS_WPA, ADAPTFSCSPS_WPA,
  TypeCPP_WPA, FieldS_DDA, FlowS_DDA, PathS_DDA,
  Cxt_DDA, Default_PTA
}
 Pointer analysis type list. More...
 
enum  PTAImplTy { BaseImpl, BVDataImpl, CondImpl }
 Implementation type: BVDataPTAImpl or CondPTAImpl. More...
 
typedef llvm::AliasAnalysis AliasAnalysis
 Indirect call edges type, map a callsite to a set of callees. More...
 
typedef Set< const CallBlockNode * > CallSiteSet
 
typedef PAG::CallSiteToFunPtrMap CallSiteToFunPtrMap
 
typedef Set< const SVFFunction * > FunctionSet
 
typedef OrderedMap< const CallBlockNode *, FunctionSetCallEdgeMap
 
typedef SCCDetection< PTACallGraph * > CallGraphSCC
 
typedef Set< const GlobalValue * > VTableSet
 
typedef Set< const SVFFunction * > VFunSet
 
- Public Attributes inherited from SVF::WPASolver< GraphType >
u32_t numOfIteration
 num of iterations during constaint solving More...
 
- Static Public Attributes inherited from SVF::PointerAnalysis
static const std::string aliasTestMayAlias = "MAYALIAS"
 
static const std::string aliasTestMayAliasMangled = "_Z8MAYALIASPvS_"
 
static const std::string aliasTestNoAlias = "NOALIAS"
 
static const std::string aliasTestNoAliasMangled = "_Z7NOALIASPvS_"
 
static const std::string aliasTestPartialAlias = "PARTIALALIAS"
 
static const std::string aliasTestPartialAliasMangled = "_Z12PARTIALALIASPvS_"
 
static const std::string aliasTestMustAlias = "MUSTALIAS"
 
static const std::string aliasTestMustAliasMangled = "_Z9MUSTALIASPvS_"
 
static const std::string aliasTestFailMayAlias = "EXPECTEDFAIL_MAYALIAS"
 
static const std::string aliasTestFailMayAliasMangled = "_Z21EXPECTEDFAIL_MAYALIASPvS_"
 
static const std::string aliasTestFailNoAlias = "EXPECTEDFAIL_NOALIAS"
 
static const std::string aliasTestFailNoAliasMangled = "_Z20EXPECTEDFAIL_NOALIASPvS_"
 
- Protected Types inherited from SVF::FlowSensitive
typedef SVFG::SVFGEdgeSetTy SVFGEdgeSetTy
 
- Protected Attributes inherited from SVF::FlowSensitive
SVFGsvfg
 
SVFGBuilder memSSA
 
AndersenWaveDiffander
 
Size_t numOfProcessedAddr
 Statistics. More...
 
Size_t numOfProcessedCopy
 Number of processed Addr node. More...
 
Size_t numOfProcessedGep
 Number of processed Copy node. More...
 
Size_t numOfProcessedPhi
 Number of processed Gep node. More...
 
Size_t numOfProcessedLoad
 Number of processed Phi node. More...
 
Size_t numOfProcessedStore
 Number of processed Load node. More...
 
Size_t numOfProcessedActualParam
 Number of processed Store node. More...
 
Size_t numOfProcessedFormalRet
 Number of processed actual param node. More...
 
Size_t numOfProcessedMSSANode
 Number of processed formal ret node. More...
 
Size_t maxSCCSize
 Number of processed mssa node. More...
 
Size_t numOfSCC
 
Size_t numOfNodesInSCC
 
double solveTime
 time of solve. More...
 
double sccTime
 time of SCC detection. More...
 
double processTime
 time of processNode. More...
 
double propagationTime
 time of points-to propagation. More...
 
double directPropaTime
 time of points-to propagation of address-taken objects More...
 
double indirectPropaTime
 time of points-to propagation of top-level pointers More...
 
double updateTime
 time of strong/weak updates. More...
 
double addrTime
 time of handling address edges More...
 
double copyTime
 time of handling copy edges More...
 
double gepTime
 time of handling gep edges More...
 
double loadTime
 time of load edges More...
 
double storeTime
 time of store edges More...
 
double phiTime
 time of phi nodes. More...
 
double updateCallGraphTime
 time of updating call graph More...
 
NodeBS svfgHasSU
 
- Protected Attributes inherited from SVF::WPAFSSolver< GraphType >
NodeStack nodeStack
 stack used for processing nodes. More...
 
- Protected Attributes inherited from SVF::WPASolver< GraphType >
bool reanalyze
 Reanalyze if any constraint value changed. More...
 
u32_t iterationForPrintStat
 print out statistics for i-th iteration More...
 
GraphType _graph
 Graph. More...
 
SCCscc
 SCC. More...
 
WorkList worklist
 Worklist for resolution. More...
 
- Protected Attributes inherited from SVF::PointerAnalysis
SVFModulesvfMod
 Module. More...
 
PTATY ptaTy
 Pointer analysis Type. More...
 
PTAImplTy ptaImplTy
 PTA implementation type. More...
 
PTAStatstat
 Statistics. More...
 
PTACallGraphptaCallGraph
 Call graph used for pointer analysis. More...
 
CallGraphSCCcallGraphSCC
 SCC for CallGraph. More...
 
ICFGicfg
 Interprocedural control-flow graph. More...
 
TypeSystemtypeSystem
 TypeSystem. More...
 
bool print_stat
 User input flags. More...
 
bool alias_validation
 Flag for validating points-to/alias results. More...
 
u32_t OnTheFlyIterBudgetForStat
 Flag for iteration budget for on-the-fly statistics. More...
 
- Protected Attributes inherited from SVF::TypeBasedHeapCloning
DCHGraphdchg = nullptr
 
- Static Protected Attributes inherited from SVF::FlowSensitive
static FlowSensitivefspta = nullptr
 
- Static Protected Attributes inherited from SVF::PointerAnalysis
static PAGpag = nullptr
 PAG. More...
 
static CommonCHGraphchgraph = nullptr
 CHGraph. More...
 
- Static Protected Attributes inherited from SVF::TypeBasedHeapCloning
static const DITypeundefType = nullptr
 The undefined type (•); void. More...
 
static const std::string derefFnName = "deref"
 deref function for TBHC alias tests. More...
 
static const std::string mangledDerefFnName = "_Z5derefv"
 deref function (mangled) for TBHC alias tests. More...
 

Detailed Description

Flow sensitive whole program pointer analysis with type-based heap cloning.

Definition at line 27 of file FlowSensitiveTBHC.h.

Constructor & Destructor Documentation

◆ FlowSensitiveTBHC()

FlowSensitiveTBHC::FlowSensitiveTBHC ( PAG _pag,
PTATY  type = FSTBHC_WPA 
)

Constructor.

Definition at line 19 of file FlowSensitiveTBHC.cpp.

19  : FlowSensitive(_pag, type), TypeBasedHeapCloning(this)
20 {
21  // Using `this` as the argument for TypeBasedHeapCloning is okay. As PointerAnalysis, it's
22  // already constructed. TypeBasedHeapCloning also doesn't use pta in the constructor so it
23  // just needs to be allocated, which it is.
26 }
TypeBasedHeapCloning(BVDataPTAImpl *pta)
Constructor. pta is the pointer analysis using this object (i.e. that which is extending).
bool storeReuse
Whether to allow for reuse at stores.
FlowSensitive(PAG *_pag, PTATY type=FSSPARSE_WPA)
Constructor.
Definition: FlowSensitive.h:59
static const llvm::cl::opt< bool > TBHCStoreReuse
Whether we allow reuse for TBHC.
Definition: Options.h:193
static const llvm::cl::opt< bool > TBHCAllReuse
Definition: Options.h:194

◆ ~FlowSensitiveTBHC()

virtual SVF::FlowSensitiveTBHC::~FlowSensitiveTBHC ( )
inlinevirtual

Destructor.

Definition at line 38 of file FlowSensitiveTBHC.h.

38 { };

Member Function Documentation

◆ analyze()

void FlowSensitiveTBHC::analyze ( )
overridevirtual

Flow sensitive analysis with FSTBHC.

Reimplemented from SVF::FlowSensitive.

Definition at line 28 of file FlowSensitiveTBHC.cpp.

29 {
31 }
virtual void analyze()
Flow sensitive analysis.

◆ backPropagate()

void FlowSensitiveTBHC::backPropagate ( NodeID  clone)
overrideprotectedvirtual

Required by user. Handles back-propagation of newly created clone after all metadata has been set. Used by cloneObject.

Implements SVF::TypeBasedHeapCloning.

Definition at line 63 of file FlowSensitiveTBHC.cpp.

64 {
65  PAGNode *cloneObj = pag->getPAGNode(clone);
66  assert(cloneObj && "FSTBHC: clone does not exist in PAG?");
67  PAGNode *originalObj = pag->getPAGNode(getOriginalObj(clone));
68  assert(cloneObj && "FSTBHC: original object does not exist in PAG?");
69  // Check the original object too because when reuse of a gep occurs, the new object
70  // is an FI object.
71  if (SVFUtil::isa<CloneGepObjPN>(cloneObj) || SVFUtil::isa<GepObjPN>(originalObj))
72  {
73  // Since getGepObjClones is updated, some GEP nodes need to be redone.
74  const NodeBS &retrievers = gepToSVFGRetrievers[getOriginalObj(clone)];
75  for (NodeID r : retrievers)
76  {
78  }
79  }
80  else if (SVFUtil::isa<CloneFIObjPN>(cloneObj) || SVFUtil::isa<CloneDummyObjPN>(cloneObj))
81  {
83  }
84  else
85  {
86  assert(false && "FSTBHC: unexpected object type?");
87  }
88 }
virtual void pushIntoWorklist(NodeID id)
Definition: WPASolver.h:163
u32_t NodeID
Definition: SVFBasicTypes.h:80
#define assert(ex)
Definition: util.h:141
PAGNode * getPAGNode(NodeID id) const
Get PAGNode ID.
Definition: PAG.h:513
NodeID getAllocationSite(NodeID o) const
Returns the allocation site (from objToAllocation) of o. Asserts existence.
llvm::SparseBitVector NodeBS
Definition: SVFBasicTypes.h:87
Map< NodeID, NodeBS > gepToSVFGRetrievers
Maps GEP objects to the SVFG nodes that retrieved them with getGepObjClones.
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
static PAG * pag
PAG.

◆ classof() [1/2]

static bool SVF::FlowSensitiveTBHC::classof ( const FlowSensitiveTBHC )
inlinestatic

For LLVM RTTI.

Definition at line 54 of file FlowSensitiveTBHC.h.

55  {
56  return true;
57  }

◆ classof() [2/2]

static bool SVF::FlowSensitiveTBHC::classof ( const PointerAnalysis pta)
inlinestatic

For LLVM RTTI.

Definition at line 60 of file FlowSensitiveTBHC.h.

61  {
62  return pta->getAnalysisTy() == FSTBHC_WPA;
63  }
Sparse flow-sensitive type-based heap cloning WPA.
PTATY getAnalysisTy() const
Type of pointer analysis.
BVDataPTAImpl * pta
PTA extending this class.

◆ countAliases()

void FlowSensitiveTBHC::countAliases ( Set< std::pair< NodeID, NodeID >>  cmp,
unsigned *  mayAliases,
unsigned *  noAliases 
)
overrideprotectedvirtual

Fills may/noAliases for the location/pointer pairs in cmp.

Reimplemented from SVF::FlowSensitive.

Definition at line 658 of file FlowSensitiveTBHC.cpp.

659 {
661  for (std::pair<NodeID, NodeID> locP : cmp)
662  {
663  const PointsTo &filterSet = getFilterSet(locP.first);
664  const PointsTo &pts = getPts(locP.second);
665  PointsTo &ptsFiltered = filteredPts[locP];
666 
667  for (NodeID o : pts)
668  {
669  if (filterSet.test(o)) continue;
670  ptsFiltered.set(o);
671  }
672  }
673 
674  for (std::pair<NodeID, NodeID> locPA : cmp)
675  {
676  const PointsTo &aPts = filteredPts[locPA];
677  for (std::pair<NodeID, NodeID> locPB : cmp)
678  {
679  if (locPB == locPA) continue;
680  const PointsTo &bPts = filteredPts[locPB];
681 
682  switch (alias(aPts, bPts))
683  {
684  case llvm::NoAlias:
685  ++(*noAliases);
686  break;
687  case llvm::MayAlias:
688  ++(*mayAliases);
689  break;
690  default:
691  assert("Not May/NoAlias?");
692  }
693  }
694  }
695 
696 }
u32_t NodeID
Definition: SVFBasicTypes.h:80
#define assert(ex)
Definition: util.h:141
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
Definition: SVFBasicTypes.h:98
virtual const PointsTo & getPts(NodeID id)
PointsTo & getFilterSet(NodeID loc)
Returns the filter set of a location. Not const; could create empty PointsTo.
NodeBS PointsTo
Definition: SVFBasicTypes.h:88
virtual AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB)
Interface expose to users of our pointer analysis, given Location infos.

◆ determineWhichGepsAreLoads()

void FlowSensitiveTBHC::determineWhichGepsAreLoads ( void  )
private

Determines whether each GEP is for a load or not. Builds gepIsLoad map. This is a quick heuristic; if all destination nodes are loads, it's a load.

Definition at line 576 of file FlowSensitiveTBHC.cpp.

577 {
578  for (SVFG::iterator nI = svfg->begin(); nI != svfg->end(); ++nI)
579  {
580  SVFGNode *svfgNode = nI->second;
581  if (const StmtSVFGNode *gep = SVFUtil::dyn_cast<GepSVFGNode>(svfgNode))
582  {
583  // Only care about ctir nodes - they have the reuse problem.
584  if (getTypeFromCTirMetadata(gep))
585  {
586  bool isLoad = true;
587  for (const SVFGEdge *e : gep->getOutEdges())
588  {
589  SVFGNode *dst = e->getDstNode();
590 
591  // Loop on itself - don't care.
592  if (gep == dst) continue;
593 
594  if (!SVFUtil::isa<LoadSVFGNode>(dst))
595  {
596  isLoad = false;
597  break;
598  }
599  }
600 
601  if (isLoad)
602  {
603  loadGeps.set(gep->getId());
604  }
605  }
606  }
607  }
608 }
iterator begin()
Iterators.
Definition: GenericGraph.h:365
NodeBS loadGeps
Maps whether a (SVFG) GEP node is a load or not.
VFGNodeIDToNodeMapTy::iterator iterator
Definition: VFG.h:77
const DIType * getTypeFromCTirMetadata(const SVFGNode *)

◆ expandFIObjs()

void FlowSensitiveTBHC::expandFIObjs ( const PointsTo pts,
PointsTo expandedPts 
)
overridevirtual

Expand FI objects.

Expand all fields of an aggregate in all points-to sets

Reimplemented from SVF::BVDataPTAImpl.

Definition at line 644 of file FlowSensitiveTBHC.cpp.

645 {
646  expandedPts = pts;
647  for (NodeID o : pts)
648  {
649  expandedPts |= getAllFieldsObjNode(o);
650  while (const GepObjPN *gepObj = SVFUtil::dyn_cast<GepObjPN>(pag->getPAGNode(o)))
651  {
652  expandedPts |= getAllFieldsObjNode(o);
653  o = gepObj->getBaseNode();
654  }
655  }
656 }
u32_t NodeID
Definition: SVFBasicTypes.h:80
virtual const NodeBS & getAllFieldsObjNode(NodeID id) override
PAGNode * getPAGNode(NodeID id) const
Get PAGNode ID.
Definition: PAG.h:513
static PAG * pag
PAG.

◆ finalize()

void FlowSensitiveTBHC::finalize ( void  )
overridevirtual

Finalize analysis.

Reimplemented from SVF::FlowSensitive.

Definition at line 51 of file FlowSensitiveTBHC.cpp.

52 {
54  // ^ Will print call graph and alias stats.
55 
56  if(print_stat)
57  dumpStats();
58  // getDFPTDataTy()->dumpPTData();
59 
61 }
virtual void finalize()
Finalize analysis.
SVFModule * svfMod
Module.
void dumpStats(void)
Dump some statistics we tracked.
void validateTBHCTests(SVFModule *svfMod)
bool print_stat
User input flags.

◆ gepIsLoad()

bool FlowSensitiveTBHC::gepIsLoad ( NodeID  gep)
private

Returns true if the given GEP is for loads, false otherwise. If the node ID is not for a GEP SVFG node, returns false.

Definition at line 610 of file FlowSensitiveTBHC.cpp.

611 {
612  // Handles when gep is not even a GEP; loadGeps only contains GEPs.
613  return loadGeps.test(gep);
614 }
NodeBS loadGeps
Maps whether a (SVFG) GEP node is a load or not.

◆ getAllFieldsObjNode()

const NodeBS & FlowSensitiveTBHC::getAllFieldsObjNode ( NodeID  id)
inlineoverridevirtual

Reimplemented from SVF::PointerAnalysis.

Definition at line 531 of file FlowSensitiveTBHC.cpp.

532 {
533  return getGepObjs(id);
534 }
const NodeBS & getGepObjs(NodeID base)

◆ getRawCTirMetadata()

const MDNode * FlowSensitiveTBHC::getRawCTirMetadata ( const SVFGNode s)
static

Returns raw ctir metadata of the instruction behind a SVFG node. Wraps getRawCTirMetadata(const Value *). Returns null if it doesn't exist.

Definition at line 616 of file FlowSensitiveTBHC.cpp.

617 {
618  if (const StmtSVFGNode *stmt = SVFUtil::dyn_cast<StmtSVFGNode>(s))
619  {
620  const Value *v = stmt->getInst() ? stmt->getInst() : stmt->getPAGEdge()->getValue();
621  if (v != nullptr)
622  {
624  }
625  }
626 
627  return nullptr;
628 }
static const MDNode * getRawCTirMetadata(const Value *)
Returns raw ctir metadata of a Value. Returns null if it doesn&#39;t exist.
llvm::Value Value
Definition: BasicTypes.h:78

◆ getTypeFromCTirMetadata()

const DIType * FlowSensitiveTBHC::getTypeFromCTirMetadata ( const SVFGNode s)

Extracts the value from SVFGNode (if it exists), and calls getTypeFromCTirMetadata(const Value *). If no ctir type exists, returns null (void).

Definition at line 630 of file FlowSensitiveTBHC.cpp.

631 {
632  if (const StmtSVFGNode *stmt = SVFUtil::dyn_cast<StmtSVFGNode>(s))
633  {
634  const Value *v = stmt->getInst();
635  if (v != nullptr)
636  {
638  }
639  }
640 
641  return nullptr;
642 }
const DIType * getTypeFromCTirMetadata(const Value *)
llvm::Value Value
Definition: BasicTypes.h:78

◆ initialize()

void FlowSensitiveTBHC::initialize ( )
overridevirtual

Initialize analysis.

Reimplemented from SVF::FlowSensitive.

Definition at line 33 of file FlowSensitiveTBHC.cpp.

34 {
37  svfg = memSSA.buildFullSVFG(ander);
38  setGraph(svfg);
39  stat = new FlowSensitiveStat(this);
40 
42  assert(dchg != nullptr && "FSTBHC: DCHGraph required!");
43 
46 
47  // Populates loadGeps.
49 }
SVFG * buildFullSVFG(BVDataPTAImpl *pta)
Definition: SVFGBuilder.cpp:54
#define assert(ex)
Definition: util.h:141
Dwarf based CHG.
Definition: DCHG.h:208
friend class FlowSensitiveStat
Definition: FlowSensitive.h:49
void setPAG(PAG *pag)
PAG must be set by extending class once the PAG is available.
void setGraph(GraphType g)
Definition: WPASolver.h:82
void setDCHG(DCHGraph *dchg)
DCHG must be set by extending class once the DCHG is available.
CommonCHGraph * getCHGraph() const
get CHGraph
static AndersenWaveDiff * createAndersenWaveDiff(PAG *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
Definition: Andersen.h:429
PTAStat * stat
Statistics.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
Definition: Casting.h:343
AndersenWaveDiff * ander
SVFGBuilder memSSA
virtual void initialize()
Initialization of a pointer analysis, including building symbol table and PAG etc.
static PAG * pag
PAG.

◆ processAddr()

bool FlowSensitiveTBHC::processAddr ( const AddrSVFGNode addr)
overridevirtual

Process address node

TODO: If this object has been set as field-insensitive, just add the insensitive object node into dst pointer's pts.

Reimplemented from SVF::FlowSensitive.

Definition at line 216 of file FlowSensitiveTBHC.cpp.

217 {
218  double start = stat->getClk();
219 
220  NodeID srcID = addr->getPAGSrcNodeID();
221  NodeID dstID = addr->getPAGDstNodeID();
222 
223  double end = stat->getClk();
224  addrTime += (end - start) / TIMEINTERVAL;
225 
226  if (!addr->getPAGEdge()->isPTAEdge()) return false;
227 
228  bool changed = FlowSensitive::processAddr(addr);
229 
230  start = stat->getClk();
231 
232  const DIType *objType;
233  if (isHeapMemObj(srcID))
234  {
235  objType = undefType;
236  }
237  else if (pag->isConstantObj(srcID))
238  {
239  // Probably constants that have been merged into one.
240  // We make it undefined even though it's technically a global
241  // to keep in line with SVF's design.
242  // This will end up splitting into one for each type of constant.
243  objType = undefType;
244  }
245  else
246  {
247  // Stack/global.
248  objType = getTypeFromCTirMetadata(addr);
249  }
250 
251  setType(srcID, objType);
252  setAllocationSite(srcID, addr->getId());
253 
254  // All the typed versions of srcID. This handles back-propagation.
255  const NodeBS &clones = getClones(srcID);
256  for (NodeID c : clones)
257  {
258  changed = addPts(dstID, c) || changed;
259  // No need for typing these are all clones; they are all typed.
260  }
261 
262  end = stat->getClk();
263  addrTime += (end - start) / TIMEINTERVAL;
264 
265  return changed;
266 }
NodeID getPAGDstNodeID() const
Definition: VFGNode.h:139
u32_t NodeID
Definition: SVFBasicTypes.h:80
double addrTime
time of handling address edges
void setType(NodeID o, const DIType *t)
Sets the type (in objToType) of o.
const PAGEdge * getPAGEdge() const
Definition: VFGNode.h:129
bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
Definition: PAG.cpp:1010
static const DIType * undefType
The undefined type (•); void.
bool isConstantObj(NodeID id) const
Definition: PAG.h:621
virtual bool addPts(NodeID id, NodeID ptd)
virtual bool processAddr(const AddrSVFGNode *addr)
const DIType * getTypeFromCTirMetadata(const SVFGNode *)
NodeID getPAGSrcNodeID() const
Definition: VFGNode.h:134
PTAStat * stat
Statistics.
#define TIMEINTERVAL
bool isHeapMemObj(NodeID id) const
Whether this object is heap or array.
void setAllocationSite(NodeID o, NodeID site)
Sets the allocation site (in objToAllocation) of o.
static double getClk(bool mark=false)
Definition: PTAStat.h:139
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
llvm::SparseBitVector NodeBS
Definition: SVFBasicTypes.h:87
const NodeBS & getClones(NodeID o)
Returns all the clones of o.
llvm::DIType DIType
Definition: BasicTypes.h:217
static PAG * pag
PAG.

◆ processCopy()

bool FlowSensitiveTBHC::processCopy ( const CopySVFGNode copy)
overridevirtual

Process copy node

Reimplemented from SVF::FlowSensitive.

Definition at line 518 of file FlowSensitiveTBHC.cpp.

519 {
520  const DIType *vtInitType = getVTInitType(copy, dchg);
521  bool changed = false;
522  if (vtInitType != nullptr)
523  {
524  // Setting the virtual table pointer.
525  changed = init(copy->getId(), copy->getPAGSrcNodeID(), vtInitType, true);
526  }
527 
528  return FlowSensitive::processCopy(copy) || changed;
529 }
virtual bool processCopy(const CopySVFGNode *copy)
NodeID getPAGSrcNodeID() const
Definition: VFGNode.h:134
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
static const DIType * getVTInitType(const CopySVFGNode *copy, DCHGraph *dchg)
bool init(NodeID loc, NodeID p, const DIType *tildet, bool reuse, bool gep=false)
llvm::DIType DIType
Definition: BasicTypes.h:217

◆ processGep()

bool FlowSensitiveTBHC::processGep ( const GepSVFGNode edge)
overridevirtual

Process gep node

Reimplemented from SVF::FlowSensitive.

Definition at line 268 of file FlowSensitiveTBHC.cpp.

269 {
270  // Copy of that in FlowSensitive.cpp + some changes.
271  double start = stat->getClk();
272  bool changed = false;
273 
274  NodeID q = gep->getPAGSrcNodeID();
275 
276  const DIType *tildet = getTypeFromCTirMetadata(gep);
277  if (tildet != undefType)
278  {
279  bool reuse = Options::TBHCAllReuse || (Options::TBHCStoreReuse && !gepIsLoad(gep->getId()));
280  changed = init(gep->getId(), q, tildet, reuse, true);
281  }
282 
283  if (!gep->getPAGEdge()->isPTAEdge())
284  {
285  return changed;
286  }
287 
288  const PointsTo& qPts = getPts(q);
289  PointsTo &filterSet = getFilterSet(gep->getId());
290  PointsTo tmpDstPts;
291  for (NodeID oq : qPts)
292  {
293  if (filterSet.test(oq)) continue;
294 
296  {
297  tmpDstPts.set(oq);
298  }
299  else
300  {
301  if (SVFUtil::isa<VariantGepPE>(gep->getPAGEdge()))
302  {
304  tmpDstPts.set(oq);
305  const DIType *t = getType(oq);
306  if (t && (t->getTag() == dwarf::DW_TAG_array_type || t->getTag() == dwarf::DW_TAG_pointer_type))
307  {
308  const NodeBS fieldClones = getGepObjClones(oq, 1);
309  for (NodeID fc : fieldClones)
310  {
311  gepToSVFGRetrievers[getOriginalObj(fc)].set(gep->getId());
312  tmpDstPts.set(fc);
313  }
314  }
315  }
316  else if (const NormalGepPE* normalGep = SVFUtil::dyn_cast<NormalGepPE>(gep->getPAGEdge()))
317  {
318  const DIType *baseType = getType(oq);
319 
320  // Drop down to field insensitive.
321  if (baseType == nullptr)
322  {
324  NodeID fiObj = oq;
325  tmpDstPts.set(fiObj);
326  continue;
327  }
328 
329  if (DCHGraph::isAgg(baseType) && baseType->getTag() != dwarf::DW_TAG_array_type
330  && normalGep->getLocationSet().getOffset() >= dchg->getNumFields(baseType))
331  {
332  // If the field offset is too high for this object, it is killed. It seems that a
333  // clone was made on this GEP but this is not the base (e.g. base->f1->f2), and SVF
334  // expects to operate on the base (hence the large offset). The base will have been
335  // cloned at another GEP and back-propagated, thus it'll reach here safe and sound.
336  // We ignore arrays/pointers because those are array accesses/pointer arithmetic we
337  // assume are correct.
338  // Obviously, non-aggregates cannot have their fields taken so they are spurious.
339  filterSet.set(oq);
340  }
341  else
342  {
343  // Operate on the field and all its clones.
344  const NodeBS fieldClones = getGepObjClones(oq, normalGep->getLocationSet().getOffset());
345  for (NodeID fc : fieldClones)
346  {
347  gepToSVFGRetrievers[getOriginalObj(fc)].set(gep->getId());
348  tmpDstPts.set(fc);
349  }
350  }
351  }
352  else
353  {
354  assert(false && "FSTBHC: new gep edge?");
355  }
356  }
357  }
358 
359  double end = stat->getClk();
360  gepTime += (end - start) / TIMEINTERVAL;
361 
362  changed = unionPts(gep->getPAGDstNodeID(), tmpDstPts) || changed;
363  return changed;
364 }
unsigned getNumFields(const DIType *base)
Definition: DCHG.h:335
u32_t NodeID
Definition: SVFBasicTypes.h:80
#define assert(ex)
Definition: util.h:141
bool isBlkObjOrConstantObj(NodeID o) const
virtual bool unionPts(NodeID id, const PointsTo &target)
static const DIType * undefType
The undefined type (•); void.
static const llvm::cl::opt< bool > TBHCStoreReuse
Whether we allow reuse for TBHC.
Definition: Options.h:193
static bool isAgg(const DIType *t)
Definition: DCHG.cpp:342
static const llvm::cl::opt< bool > TBHCAllReuse
Definition: Options.h:194
virtual const PointsTo & getPts(NodeID id)
const DIType * getTypeFromCTirMetadata(const SVFGNode *)
void setObjFieldInsensitive(NodeID id)
PTAStat * stat
Statistics.
#define TIMEINTERVAL
const DIType * getType(NodeID o) const
Returns the type (from objToType) of o. Asserts existence.
static double getClk(bool mark=false)
Definition: PTAStat.h:139
llvm::SparseBitVector NodeBS
Definition: SVFBasicTypes.h:87
Map< NodeID, NodeBS > gepToSVFGRetrievers
Maps GEP objects to the SVFG nodes that retrieved them with getGepObjClones.
PointsTo & getFilterSet(NodeID loc)
Returns the filter set of a location. Not const; could create empty PointsTo.
const NodeBS getGepObjClones(NodeID base, unsigned offset)
double gepTime
time of handling gep edges
bool init(NodeID loc, NodeID p, const DIType *tildet, bool reuse, bool gep=false)
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
NodeBS PointsTo
Definition: SVFBasicTypes.h:88
llvm::DIType DIType
Definition: BasicTypes.h:217

◆ processLoad()

bool FlowSensitiveTBHC::processLoad ( const LoadSVFGNode load)
overridevirtual

Process load node

Foreach node src pts(dst) = union pts(node)

If the ptd is a field-insensitive node, we should also get all field nodes' points-to sets and pass them to pagDst.

If the ptd is a field-insensitive node, we should also get all field nodes' points-to sets and pass them to pagDst.

Reimplemented from SVF::FlowSensitive.

Definition at line 366 of file FlowSensitiveTBHC.cpp.

367 {
368  double start = stat->getClk();
369 
370  bool changed = false;
371  const DIType *tildet = getTypeFromCTirMetadata(load);
372  if (tildet != undefType)
373  {
374  changed = init(load->getId(), load->getPAGSrcNodeID(), tildet, Options::TBHCAllReuse);
375  }
376 
377  // We want to perform the initialisation for non-pointer nodes but not process the load.
378  if (!load->getPAGEdge()->isPTAEdge())
379  {
380  return changed;
381  }
382 
383  NodeID dstVar = load->getPAGDstNodeID();
384 
385  const PointsTo& srcPts = getPts(load->getPAGSrcNodeID());
386  const PointsTo &filterSet = getFilterSet(load->getId());
387  // unionPtsFromIn is going to call getOriginalObj on ptd anyway.
388  // This results in fewer loop iterations. o_t, o_s --> o.
389  PointsTo srcOriginalObjs;
390  for (NodeID s : srcPts)
391  {
392  if (filterSet.test(s)) continue;
393  if (pag->isConstantObj(s) || pag->isNonPointerObj(s)) continue;
394  srcOriginalObjs.set(getOriginalObj(s));
395  }
396 
397  for (NodeID ptd : srcOriginalObjs)
398  {
399  // filterSet tests happened while building srcOriginalObjs.
400  if (unionPtsFromIn(load, ptd, dstVar))
401  changed = true;
402 
403  if (isFIObjNode(ptd))
404  {
407  const NodeBS &allFields = getAllFieldsObjNode(ptd);
408  for (NodeID f : allFields)
409  {
410  if (unionPtsFromIn(load, f, dstVar))
411  changed = true;
412  }
413  }
414  }
415 
416  double end = stat->getClk();
417  loadTime += (end - start) / TIMEINTERVAL;
418  return changed;
419 }
NodeID getPAGDstNodeID() const
Definition: VFGNode.h:139
double loadTime
time of load edges
u32_t NodeID
Definition: SVFBasicTypes.h:80
virtual const NodeBS & getAllFieldsObjNode(NodeID id) override
bool isNonPointerObj(NodeID id) const
Definition: PAG.h:627
const PAGEdge * getPAGEdge() const
Definition: VFGNode.h:129
bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
Definition: PAG.cpp:1010
static const DIType * undefType
The undefined type (•); void.
bool isConstantObj(NodeID id) const
Definition: PAG.h:621
static const llvm::cl::opt< bool > TBHCAllReuse
Definition: Options.h:194
virtual const PointsTo & getPts(NodeID id)
const DIType * getTypeFromCTirMetadata(const SVFGNode *)
virtual bool unionPtsFromIn(const SVFGNode *stmt, NodeID srcVar, NodeID dstVar) override
NodeID getPAGSrcNodeID() const
Definition: VFGNode.h:134
PTAStat * stat
Statistics.
#define TIMEINTERVAL
static double getClk(bool mark=false)
Definition: PTAStat.h:139
bool isFIObjNode(NodeID id) const
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
llvm::SparseBitVector NodeBS
Definition: SVFBasicTypes.h:87
PointsTo & getFilterSet(NodeID loc)
Returns the filter set of a location. Not const; could create empty PointsTo.
bool init(NodeID loc, NodeID p, const DIType *tildet, bool reuse, bool gep=false)
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
NodeBS PointsTo
Definition: SVFBasicTypes.h:88
llvm::DIType DIType
Definition: BasicTypes.h:217
static PAG * pag
PAG.

◆ processPhi()

bool FlowSensitiveTBHC::processPhi ( const PHISVFGNode phi)
overridevirtual

Process mssa phi node

Reimplemented from SVF::FlowSensitive.

Definition at line 496 of file FlowSensitiveTBHC.cpp.

497 {
498  if (!phi->isPTANode()) return false;
499  return FlowSensitive::processPhi(phi);
500 }
virtual bool processPhi(const PHISVFGNode *phi)
bool isPTANode() const
Whether this phi node is of pointer type (used for pointer analysis).
Definition: VFGNode.h:578

◆ processStore()

bool FlowSensitiveTBHC::processStore ( const StoreSVFGNode store)
overridevirtual

Process store node

foreach node dst pts(node) = union pts(src)

STORE statement can only be processed if the pointer on the LHS points to something. If we handle STORE with an empty points-to set, the OUT set will be updated from IN set. Then if LHS pointer points-to one target and it has been identified as a strong update, we can't remove those points-to information computed before this strong update from the OUT set.

check if this is a strong updates store

STORE statement can only be processed if the pointer on the LHS points to something. If we handle STORE with an empty points-to set, the OUT set will be updated from IN set. Then if LHS pointer points-to one target and it has been identified as a strong update, we can't remove those points-to information computed before this strong update from the OUT set.

check if this is a strong updates store

Reimplemented from SVF::FlowSensitive.

Definition at line 421 of file FlowSensitiveTBHC.cpp.

422 {
423  double start = stat->getClk();
424 
425  bool changed = false;
426  const DIType *tildet = getTypeFromCTirMetadata(store);
427  if (tildet != undefType)
428  {
429  changed = init(store->getId(), store->getPAGDstNodeID(), tildet, Options::TBHCAllReuse || Options::TBHCStoreReuse);
430  }
431 
432  // Like processLoad: we want to perform initialisation for non-pointers but not the store.
433  if (!store->getPAGEdge()->isPTAEdge())
434  {
435  // Pass through and return because there may be some pointer nodes
436  // relying on this node's parents.
437  changed = getDFPTDataTy()->updateAllDFOutFromIn(store->getId(), 0, false);
438  return changed;
439  }
440 
441  const PointsTo & dstPts = getPts(store->getPAGDstNodeID());
442 
449  if (dstPts.empty())
450  {
451  return changed;
452  }
453 
454  changed = false;
455  const PointsTo &filterSet = getFilterSet(store->getId());
456  if(getPts(store->getPAGSrcNodeID()).empty() == false)
457  {
458  for (NodeID ptd : dstPts)
459  {
460  if (filterSet.test(ptd)) continue;
461 
462  if (pag->isConstantObj(ptd) || pag->isNonPointerObj(ptd))
463  continue;
464 
465  if (unionPtsFromTop(store, store->getPAGSrcNodeID(), ptd))
466  changed = true;
467  }
468  }
469 
470  double end = stat->getClk();
471  storeTime += (end - start) / TIMEINTERVAL;
472 
473  double updateStart = stat->getClk();
474  // also merge the DFInSet to DFOutSet.
476  NodeID singleton;
477  bool isSU = isStrongUpdate(store, singleton);
478  if (isSU)
479  {
480  svfgHasSU.set(store->getId());
481  if (strongUpdateOutFromIn(store, singleton))
482  changed = true;
483  }
484  else
485  {
486  svfgHasSU.reset(store->getId());
487  if (weakUpdateOutFromIn(store))
488  changed = true;
489  }
490  double updateEnd = stat->getClk();
491  updateTime += (updateEnd - updateStart) / TIMEINTERVAL;
492 
493  return changed;
494 }
NodeID getPAGDstNodeID() const
Definition: VFGNode.h:139
u32_t NodeID
Definition: SVFBasicTypes.h:80
bool isNonPointerObj(NodeID id) const
Definition: PAG.h:627
bool isStrongUpdate(const SVFGNode *node, NodeID &singleton)
Return TRUE if this is a strong update STORE statement.
const PAGEdge * getPAGEdge() const
Definition: VFGNode.h:129
bool isPTAEdge() const
Whether src and dst nodes are both of pointer type.
Definition: PAG.cpp:1010
static const DIType * undefType
The undefined type (•); void.
virtual bool weakUpdateOutFromIn(const SVFGNode *node)
Handle weak updates.
bool isConstantObj(NodeID id) const
Definition: PAG.h:621
static const llvm::cl::opt< bool > TBHCStoreReuse
Whether we allow reuse for TBHC.
Definition: Options.h:193
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).
static const llvm::cl::opt< bool > TBHCAllReuse
Definition: Options.h:194
virtual const PointsTo & getPts(NodeID id)
const DIType * getTypeFromCTirMetadata(const SVFGNode *)
NodeID getPAGSrcNodeID() const
Definition: VFGNode.h:134
PTAStat * stat
Statistics.
#define TIMEINTERVAL
virtual bool unionPtsFromTop(const SVFGNode *stmt, NodeID srcVar, NodeID dstVar) override
static double getClk(bool mark=false)
Definition: PTAStat.h:139
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
PointsTo & getFilterSet(NodeID loc)
Returns the filter set of a location. Not const; could create empty PointsTo.
double storeTime
time of store edges
static DdNode * empty
Definition: cuddZddLin.c:94
virtual bool strongUpdateOutFromIn(const SVFGNode *node, NodeID singleton)
Handle strong updates.
bool init(NodeID loc, NodeID p, const DIType *tildet, bool reuse, bool gep=false)
NodeBS PointsTo
Definition: SVFBasicTypes.h:88
DFPTDataTy * getDFPTDataTy() const
double updateTime
time of strong/weak updates.
llvm::DIType DIType
Definition: BasicTypes.h:217
static PAG * pag
PAG.

◆ propAlongDirectEdge()

bool FlowSensitiveTBHC::propAlongDirectEdge ( const DirectSVFGEdge edge)
overridevirtual

Propagate points-to information along a DIRECT SVFG edge.

Propagate points-to information along DIRECT SVFG edge.

Reimplemented from SVF::FlowSensitive.

Definition at line 183 of file FlowSensitiveTBHC.cpp.

184 {
185  double start = stat->getClk();
186  bool changed = false;
187 
188  SVFGNode* src = edge->getSrcNode();
189  SVFGNode* dst = edge->getDstNode();
190  // If this is an actual-param or formal-ret, top-level pointer's pts must be
191  // propagated from src to dst.
192  if (ActualParmSVFGNode* ap = SVFUtil::dyn_cast<ActualParmSVFGNode>(src))
193  {
194  if (!ap->getParam()->isPointer()) return false;
195  changed = propagateFromAPToFP(ap, dst);
196  }
197  else if (FormalRetSVFGNode* fp = SVFUtil::dyn_cast<FormalRetSVFGNode>(src))
198  {
199  if (!fp->getRet()->isPointer()) return false;
200  changed = propagateFromFRToAR(fp, dst);
201  }
202  else
203  {
204  // Direct SVFG edge links between def and use of a top-level pointer.
205  // There's no points-to information propagated along direct edge.
206  // Since the top-level pointer's value has been changed at src node,
207  // return TRUE to put dst node into the work list.
208  changed = true;
209  }
210 
211  double end = stat->getClk();
212  directPropaTime += (end - start) / TIMEINTERVAL;
213  return changed;
214 }
virtual bool propagateFromAPToFP(const ActualParmSVFGNode *ap, const SVFGNode *dst)
NodeType * getDstNode() const
Definition: GenericGraph.h:89
PTAStat * stat
Statistics.
NodeType * getSrcNode() const
Definition: GenericGraph.h:85
#define TIMEINTERVAL
double directPropaTime
time of points-to propagation of address-taken objects
static double getClk(bool mark=false)
Definition: PTAStat.h:139
virtual bool propagateFromFRToAR(const FormalRetSVFGNode *fr, const SVFGNode *dst)

◆ propAlongIndirectEdge()

bool FlowSensitiveTBHC::propAlongIndirectEdge ( const IndirectSVFGEdge edge)
overridevirtual

Propagate points-to information along an INDIRECT SVFG edge.

Propagate points-to information along INDIRECT SVFG edge.

If this is a field-insensitive obj, propagate all field node's pts

If this is a field-insensitive obj, propagate all field node's pts

Reimplemented from SVF::FlowSensitive.

Definition at line 90 of file FlowSensitiveTBHC.cpp.

91 {
92  SVFGNode* src = edge->getSrcNode();
93  SVFGNode* dst = edge->getDstNode();
94 
95  bool changed = false;
96 
97  // Get points-to targets may be used by next SVFG node.
98  // Propagate points-to set for node used in dst.
99  const PointsTo& pts = edge->getPointsTo();
100 
101  // Since the base Andersen's analysis does NOT perform type-based heap cloning,
102  // it uses only the base objects; we want to account for clones too.
103  PointsTo edgePtsAndClones;
104 
105  // TODO: the conditional bool may be unnecessary.
106  // Adding all clones is redundant, and introduces too many calls to propVarPts...
107  // This introduces performance and precision penalties.
108  // We should filter out according to src.
109  bool isStore = false;
110  const DIType *tildet = nullptr;
111  PointsTo storePts;
112  if (const StoreSVFGNode *store = SVFUtil::dyn_cast<StoreSVFGNode>(src))
113  {
114  tildet = getTypeFromCTirMetadata(store);
115  isStore = true;
116  storePts = getPts(store->getPAGDstNodeID());
117  }
118 
119  const PointsTo &filterSet = getFilterSet(src->getId());
120  for (NodeID o : pts)
121  {
122  if (!filterSet.test(o))
123  {
124  edgePtsAndClones.set(o);
125  }
126 
127  for (NodeID c : getClones(o))
128  {
129  if (!isStore)
130  {
131  if (!filterSet.test(c))
132  {
133  edgePtsAndClones.set(c);
134  }
135  }
136  else
137  {
138  if (storePts.test(c) && !filterSet.test(c))
139  {
140  edgePtsAndClones.set(c);
141  }
142  }
143  }
144 
145  if (GepObjPN *gep = SVFUtil::dyn_cast<GepObjPN>(pag->getPAGNode(o)))
146  {
147  // Want the geps which are at the same "level" as this one (same mem obj, same offset).
148  const NodeBS &geps = getGepObjsFromMemObj(gep->getMemObj(), gep->getLocationSet().getOffset());
149  for (NodeID g : geps)
150  {
151  const DIType *gepType = getType(g);
152  if (!isStore || gepType || isBase(tildet, gepType))
153  {
154  if (!filterSet.test(g))
155  {
156  edgePtsAndClones.set(g);
157  }
158  }
159  }
160  }
161  }
162 
163  for (NodeID o : edgePtsAndClones)
164  {
165  if (propVarPtsFromSrcToDst(o, src, dst))
166  changed = true;
167 
168  if (isFIObjNode(o))
169  {
171  const NodeBS &allFields = getAllFieldsObjNode(o);
172  for (NodeID f : allFields)
173  {
174  if (propVarPtsFromSrcToDst(f, src, dst))
175  changed = true;
176  }
177  }
178  }
179 
180  return changed;
181 }
u32_t NodeID
Definition: SVFBasicTypes.h:80
virtual const NodeBS & getAllFieldsObjNode(NodeID id) override
PAGNode * getPAGNode(NodeID id) const
Get PAGNode ID.
Definition: PAG.h:513
NodeType * getDstNode() const
Definition: GenericGraph.h:89
virtual const PointsTo & getPts(NodeID id)
const DIType * getTypeFromCTirMetadata(const SVFGNode *)
const NodeBS & getGepObjsFromMemObj(const MemObj *memObj, unsigned offset)
const PointsTo & getPointsTo() const
Definition: SVFGEdge.h:61
NodeType * getSrcNode() const
Definition: GenericGraph.h:85
bool isBase(const DIType *a, const DIType *b) const
const DIType * getType(NodeID o) const
Returns the type (from objToType) of o. Asserts existence.
bool isFIObjNode(NodeID id) const
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
llvm::SparseBitVector NodeBS
Definition: SVFBasicTypes.h:87
const NodeBS & getClones(NodeID o)
Returns all the clones of o.
PointsTo & getFilterSet(NodeID loc)
Returns the filter set of a location. Not const; could create empty PointsTo.
virtual bool propVarPtsFromSrcToDst(NodeID var, const SVFGNode *src, const SVFGNode *dst)
Propagate points-to information of a certain variable from src to dst.
NodeBS PointsTo
Definition: SVFBasicTypes.h:88
llvm::DIType DIType
Definition: BasicTypes.h:217
static PAG * pag
PAG.

◆ propDFInToIn()

bool FlowSensitiveTBHC::propDFInToIn ( const SVFGNode srcStmt,
NodeID  srcVar,
const SVFGNode dstStmt,
NodeID  dstVar 
)
inlineoverridevirtual

Reimplemented from SVF::FlowSensitive.

Definition at line 562 of file FlowSensitiveTBHC.cpp.

563 {
564  // IN sets are only based on the original object.
565  return getDFPTDataTy()->updateAllDFInFromIn(srcStmt->getId(), getOriginalObj(srcVar),
566  dstStmt->getId(), getOriginalObj(dstVar));
567 }
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
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.
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
DFPTDataTy * getDFPTDataTy() const

◆ propDFOutToIn()

bool FlowSensitiveTBHC::propDFOutToIn ( const SVFGNode srcStmt,
NodeID  srcVar,
const SVFGNode dstStmt,
NodeID  dstVar 
)
inlineoverridevirtual

Reimplemented from SVF::FlowSensitive.

Definition at line 569 of file FlowSensitiveTBHC.cpp.

570 {
571  // OUT/IN sets only have original objects.
572  return getDFPTDataTy()->updateAllDFInFromOut(srcStmt->getId(), getOriginalObj(srcVar),
573  dstStmt->getId(), getOriginalObj(dstVar));
574 }
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
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...
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
DFPTDataTy * getDFPTDataTy() const

◆ PTAName()

virtual const std::string SVF::FlowSensitiveTBHC::PTAName ( ) const
inlineoverridevirtual

Get PTA name.

Reimplemented from SVF::FlowSensitive.

Definition at line 48 of file FlowSensitiveTBHC.h.

49  {
50  return "FSTBHC";
51  }

◆ unionPtsFromIn()

bool FlowSensitiveTBHC::unionPtsFromIn ( const SVFGNode stmt,
NodeID  srcVar,
NodeID  dstVar 
)
inlineoverridevirtual

Reimplemented from SVF::FlowSensitive.

Definition at line 550 of file FlowSensitiveTBHC.cpp.

551 {
552  // IN sets only have original objects.
553  return getDFPTDataTy()->updateTLVPts(stmt->getId(), getOriginalObj(srcVar), dstVar);
554 }
virtual bool updateTLVPts(LocID srcLoc, const Key &srcVar, const Key &dstVar)=0
Update points-to set of top-level pointers with IN[srcLoc:srcVar].
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
DFPTDataTy * getDFPTDataTy() const

◆ unionPtsFromTop()

bool FlowSensitiveTBHC::unionPtsFromTop ( const SVFGNode stmt,
NodeID  srcVar,
NodeID  dstVar 
)
inlineoverridevirtual

Reimplemented from SVF::FlowSensitive.

Definition at line 556 of file FlowSensitiveTBHC.cpp.

557 {
558  // OUT sets only have original objects.
559  return getDFPTDataTy()->updateATVPts(srcVar, stmt->getId(), getOriginalObj(dstVar));
560 }
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.
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
DFPTDataTy * getDFPTDataTy() const

◆ updateInFromIn()

bool FlowSensitiveTBHC::updateInFromIn ( const SVFGNode srcStmt,
NodeID  srcVar,
const SVFGNode dstStmt,
NodeID  dstVar 
)
inlineoverridevirtual

Reimplemented from SVF::FlowSensitive.

Definition at line 536 of file FlowSensitiveTBHC.cpp.

537 {
538  // IN sets are only based on the original object.
539  return getDFPTDataTy()->updateDFInFromIn(srcStmt->getId(), getOriginalObj(srcVar),
540  dstStmt->getId(), getOriginalObj(dstVar));
541 }
virtual bool updateDFInFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
DFPTDataTy * getDFPTDataTy() const

◆ updateInFromOut()

bool FlowSensitiveTBHC::updateInFromOut ( const SVFGNode srcStmt,
NodeID  srcVar,
const SVFGNode dstStmt,
NodeID  dstVar 
)
inlineoverridevirtual

Reimplemented from SVF::FlowSensitive.

Definition at line 543 of file FlowSensitiveTBHC.cpp.

544 {
545  // OUT/IN sets only have original objects.
546  return getDFPTDataTy()->updateDFInFromOut(srcStmt->getId(), getOriginalObj(srcVar),
547  dstStmt->getId(), getOriginalObj(dstVar));
548 }
virtual bool updateDFInFromOut(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164
NodeID getOriginalObj(NodeID c) const
Returns the original object c is cloned from. If c is not a clone, returns itself.
DFPTDataTy * getDFPTDataTy() const

Member Data Documentation

◆ allReuse

bool SVF::FlowSensitiveTBHC::allReuse
private

Whether to allow reuse at all instructions (load/store/field). allReuse => storeReuse.

Definition at line 111 of file FlowSensitiveTBHC.h.

◆ gepToSVFGRetrievers

Map<NodeID, NodeBS> SVF::FlowSensitiveTBHC::gepToSVFGRetrievers
private

Maps GEP objects to the SVFG nodes that retrieved them with getGepObjClones.

Definition at line 114 of file FlowSensitiveTBHC.h.

◆ loadGeps

NodeBS SVF::FlowSensitiveTBHC::loadGeps
private

Maps whether a (SVFG) GEP node is a load or not.

Definition at line 116 of file FlowSensitiveTBHC.h.

◆ storeReuse

bool SVF::FlowSensitiveTBHC::storeReuse
private

Whether to allow for reuse at stores.

Definition at line 108 of file FlowSensitiveTBHC.h.


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