34 #ifndef FSPTANALYSIS_H_
35 #define FSPTANALYSIS_H_
79 return !(*
this == rhs);
260 template <>
struct std::hash<
SVF::SVFGNodeLockSpan>
264 std::hash<SVF::StmtSVFGNode* >h;
MHP * getMHP() const
Get MHP.
FSMPTA(MHP *m, LockAnalysis *la)
Constructor.
static FSMPTA * createFSMPTA(SVFModule *module, MHP *m, LockAnalysis *la)
Create single instance of flow-sensitive pointer analysis.
void initialize() override
Initialize analysis.
static void releaseFSMPTA()
Release flow-sensitive pointer analysis.
void analyze() override
Flow sensitive analysis.
void initialize() override
Initialize analysis.
TCT * getTCT() const
Get Thread Creation Tree.
static u32_t numOfNewSVFGEdges
Number of newly added SVFG edges.
static u32_t numOfRemovedSVFGEdges
static u32_t numOfRemovedPTS
void performAddingMHPEdges()
perform adding/removing MHP Edges in value flow graph
void connectMHPEdges(PointerAnalysis *pta)
Connect MHP indirect value-flow edges for two nodes that may-happen-in-parallel.
Set< NodeIDPair > recordedges
void handleStoreStoreWithLockPrecisely(const StmtSVFGNode *n1, const StmtSVFGNode *n2, PointerAnalysis *pta)
Map< NodeIDPair, PointsTo > edge2pts
static const u32_t ADDEDGE_NOMHP
void handleStoreLoad(const StmtSVFGNode *n1, const StmtSVFGNode *n2, PointerAnalysis *pta)
void performRemovingMHPEdges()
Map< const StmtSVFGNode *, SVFGNodeIDSet > prevset
PointerAnalysis::FunctionSet FunctionSet
void handleStoreStore(const StmtSVFGNode *n1, const StmtSVFGNode *n2, PointerAnalysis *pta)
static const u32_t ADDEDGE_NONSPARSE
std::vector< const SVFGNode * > SVFGNodeVec
SVFGEdge * addTDEdges(NodeID srcId, NodeID dstId, PointsTo &pts)
bool recordAddingEdge(NodeID id1, NodeID id2, PointsTo pts)
virtual void buildSVFG()
Re-write create SVFG method.
Set< const SVFGNode * > SVFGNodeSet
void collectLoadStoreSVFGNodes()
Collect all loads/stores SVFGNodes.
virtual ~MTASVFGBuilder()
Destructor.
void readPrecision()
For o, n2-o->n1, n1 and n2 are write. Foreach n3:n1->n3, n2->n3; then remove n2->n1.
bool recordEdge(NodeID id1, NodeID id2, PointsTo pts)
Record edges.
PointerAnalysis::CallEdgeMap CallEdgeMap
bool isHeadofSpan(const StmtSVFGNode *n, LockAnalysis::LockSpan lspan)
whether is a first write in the lock span.
PointerAnalysis::CallSiteSet CallSiteSet
SVFGNodeIDSet getSuccNodes(const StmtSVFGNode *n)
SVFGNodeSet stnodeSet
all stores/loads SVFGNodes
SVFGNodeIDSet getPrevNodes(const StmtSVFGNode *n)
static const u32_t ADDEDGE_NOEDGE
static const u32_t ADDEDGE_ALLOPT
static const u32_t ADDEDGE_NOLOCK
void handleStoreLoadNonSparse(const StmtSVFGNode *n1, const StmtSVFGNode *n2, PointerAnalysis *pta)
void handleStoreStoreNonSparse(const StmtSVFGNode *n1, const StmtSVFGNode *n2, PointerAnalysis *pta)
bool recordRemovingEdge(NodeID id1, NodeID id2, PointsTo pts)
static const u32_t ADDEDGE_NOALIAS
PairToBoolMap pairtailmap
void handleStoreLoadWithLockPrecisely(const StmtSVFGNode *n1, const StmtSVFGNode *n2, PointerAnalysis *pta)
Set< const SVFInstruction * > InstSet
bool isTailofSpan(const StmtSVFGNode *n, LockAnalysis::LockSpan lspan)
whether is a last write in the lock span.
Map< const StmtSVFGNode *, SVFGNodeIDSet > succset
Map< const StmtSVFGNode *, bool > headmap
Map< const StmtSVFGNode *, bool > tailmap
static const u32_t ADDEDGE_NORP
void mergeSpan(NodeBS comlocks, InstSet &res)
MTASVFGBuilder(MHP *m, LockAnalysis *la)
Constructor.
std::pair< NodeID, NodeID > NodeIDPair
Map< SVFGNodeLockSpan, bool > PairToBoolMap
PairToBoolMap pairheadmap
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
Set< const CallICFGNode * > CallSiteSet
Indirect call edges type, map a callsite to a set of callees.
Set< const SVFFunction * > FunctionSet
SVFGNodeLockSpan(const StmtSVFGNode *SVFGnode, LockAnalysis::LockSpan lockspan)
const LockAnalysis::LockSpan getLockSpan() const
bool operator<(const SVFGNodeLockSpan &rhs) const
LockAnalysis::LockSpan lockSpan
bool operator==(const SVFGNodeLockSpan &rhs) const
const StmtSVFGNode * getSVFGNode() const
const StmtSVFGNode * SVFGNode
virtual ~SVFGNodeLockSpan()
bool operator!=(const SVFGNodeLockSpan &rhs) const
SVFGNodeLockSpan & operator=(const SVFGNodeLockSpan &rhs)
PointerAnalysis * getPTA() const
Get PTA.
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
size_t operator()(const SVF::SVFGNodeLockSpan &cs) const