30#ifndef FLOWSENSITIVEANALYSIS_H_
31#define FLOWSENSITIVEANALYSIS_H_
42class AndersenWaveDiff;
119 return "FlowSensitive";
277 static std::unique_ptr<FlowSensitive>
fspta;
MutDFPTDataTy * getMutDFPTDataTy() const
DFPTDataTy * getDFPTDataTy() const
BVDataPTAImpl::MutDFPTDataTy MutDFPTDataTy
bool updateOutFromIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
Update data-flow points-to data.
~FlowSensitive() override=default
Destructor.
void processNode(NodeID nodeId) override
Handle various constraints.
u32_t numOfProcessedLoad
Number of processed Phi node.
static bool classof(const PointerAnalysis *pta)
const PointsTo & getDFInPtsSet(const SVFGNode *stmt, const NodeID node)
Get points-to set for a node from data flow IN/OUT set at a statement.
virtual void solveConstraints()
virtual bool unionPtsFromIn(const SVFGNode *stmt, NodeID srcVar, NodeID dstVar)
virtual void updateConnectedNodes(const SVFGEdgeSetTy &edges)
Update nodes connected during updating call graph.
u32_t numOfProcessedCopy
Number of processed Addr node.
virtual void countAliases(Set< std::pair< NodeID, NodeID > > cmp, unsigned *mayAliases, unsigned *noAliases)
Fills may/noAliases for the location/pointer pairs in cmp.
double gepTime
time of handling gep edges
static std::unique_ptr< FlowSensitive > fspta
double indirectPropaTime
time of points-to propagation of top-level pointers
virtual bool propagateFromAPToFP(const ActualParmSVFGNode *ap, const SVFGNode *dst)
double addrTime
time of handling address edges
virtual bool propagateFromFRToAR(const FormalRetSVFGNode *fr, const SVFGNode *dst)
virtual bool propDFInToIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
const DFInOutMap & getDFOutputMap() const
NodeStack & SCCDetect() override
SCC detection.
double solveTime
time of solve.
bool isStrongUpdate(const SVFGNode *node, NodeID &singleton)
Return TRUE if this is a strong update STORE statement.
virtual void readPtsFromFile(const std::string &filename)
virtual bool unionPtsFromTop(const SVFGNode *stmt, NodeID srcVar, NodeID dstVar)
const DFInOutMap & getDFInputMap() const
virtual void plainMap(void) const
Sets the global best mapping as a plain mapping, i.e. n -> n.
virtual bool propDFOutToIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
virtual bool runOnModule(SVFModule *)
We start from here.
u32_t numOfProcessedStore
Number of processed Load node.
SVFG::SVFGEdgeSetTy SVFGEdgeSetTy
const PointsTo & getDFOutPtsSet(const SVFGNode *stmt, const NodeID node)
void analyze() override
Flow sensitive analysis.
BVDataPTAImpl::MutDFPTDataTy::PtsMap PtsMap
double storeTime
time of store edges
SVFG * getSVFG() const
Return SVFG.
virtual bool updateInFromIn(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
double copyTime
time of handling copy edges
bool propFromSrcToDst(SVFGEdge *edge) override
Propagation.
u32_t numOfProcessedGep
Number of processed Copy node.
virtual void cluster(void)
virtual bool strongUpdateOutFromIn(const SVFGNode *node, NodeID singleton)
Handle strong updates.
void finalize() override
Finalize analysis.
void clearAllDFOutVarFlag(const SVFGNode *stmt)
bool processSVFGNode(SVFGNode *node)
virtual bool processLoad(const LoadSVFGNode *load)
bool propVarPtsAfterCGUpdated(NodeID var, const SVFGNode *src, const SVFGNode *dst)
virtual bool processPhi(const PHISVFGNode *phi)
virtual bool processStore(const StoreSVFGNode *store)
u32_t maxSCCSize
Number of processed mssa node.
virtual bool processCopy(const CopySVFGNode *copy)
double loadTime
time of load edges
FlowSensitive(SVFIR *_pag, PTATY type=FSSPARSE_WPA)
Constructor.
bool updateCallGraph(const CallSiteToFunPtrMap &callsites) override
Update call graph.
virtual bool weakUpdateOutFromIn(const SVFGNode *node)
Handle weak updates.
virtual bool processAddr(const AddrSVFGNode *addr)
u32_t numOfProcessedActualParam
Number of processed Store node.
u32_t numOfProcessedPhi
Number of processed Gep node.
double propagationTime
time of points-to propagation.
const std::string PTAName() const override
Get PTA name.
static bool classof(const FlowSensitive *)
Methods for support type inquiry through isa, cast, and dyn_cast.
virtual bool propAlongDirectEdge(const DirectSVFGEdge *edge)
Propagate points-to information along a DIRECT SVFG edge.
void initialize() override
Initialize analysis.
void connectCallerAndCallee(const CallEdgeMap &newEdges, SVFGEdgeSetTy &edges)
Connect nodes in SVFG.
std::vector< std::pair< hclust_fast_methods, std::vector< NodeID > > > candidateMappings
Save candidate mappings for evaluation's sake.
virtual bool processGep(const GepSVFGNode *edge)
u32_t numOfProcessedFormalRet
Number of processed actual param node.
double directPropaTime
time of points-to propagation of address-taken objects
double processTime
time of processNode.
u32_t numOfProcessedAddr
Statistics.
virtual bool propVarPtsFromSrcToDst(NodeID var, const SVFGNode *src, const SVFGNode *dst)
Propagate points-to information of a certain variable from src to dst.
static void releaseFSWPA()
Release flow-sensitive pointer analysis.
virtual bool propAlongIndirectEdge(const IndirectSVFGEdge *edge)
Propagate points-to information along an INDIRECT SVFG edge.
double phiTime
time of phi nodes.
static FlowSensitive * createFSWPA(SVFIR *_pag)
Create single instance of flow-sensitive pointer analysis.
double sccTime
time of SCC detection.
double updateTime
time of strong/weak updates.
virtual bool updateInFromOut(const SVFGNode *srcStmt, NodeID srcVar, const SVFGNode *dstStmt, NodeID dstVar)
u32_t numOfProcessedMSSANode
Number of processed formal ret node.
BVDataPTAImpl::MutDFPTDataTy::DFPtsMap DFInOutMap
virtual void solveAndwritePtsToFile(const std::string &filename)
double updateCallGraphTime
time of updating call graph
Map< LocID, PtsMap > DFPtsMap
Data-flow point-to map.
const DFPtsMap & getDFIn()
const DFPtsMap & getDFOut()
BaseMutPTData::PtsMap PtsMap
PTATY
Pointer analysis type list.
@ FSSPARSE_WPA
Sparse flow sensitive WPA.
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
PTATY getAnalysisTy() const
Type of pointer analysis.
SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap
u32_t OnTheFlyIterBudgetForStat
Flag for iteration budget for on-the-fly statistics.
NodeID getId() const
Get ID.
VFGEdge::SVFGEdgeSetTy SVFGEdgeSetTy
u32_t iterationForPrintStat
print out statistics for i-th iteration
std::stack< NodeID > NodeStack
WPAFSSolver< SVFG * > WPASVFGFSSolver
llvm::IRBuilder IRBuilder
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set