33 using namespace SVFUtil;
40 while (!isWorklistEmpty())
45 NodeID nodeId = popFromWorklist();
46 collapsePWCNode(nodeId);
58 double propStart = stat->getClk();
61 computeDiffPts(nodeId);
65 NodeID dstNodeId = edge->getDstID();
66 const PointsTo& srcPts = getPts(nodeId);
67 const PointsTo& dstPts = getPts(dstNodeId);
70 if (!srcPts.empty() && srcPts == dstPts && !isMetEdge(edge))
73 addLCDCandidate((edge)->getDstID());
75 processCopy(nodeId, edge);
79 if (
GepCGEdge* gepEdge = SVFUtil::dyn_cast<GepCGEdge>(edge))
80 processGep(nodeId, gepEdge);
83 double propEnd = stat->getClk();
84 timeOfProcessCopyGep += (propEnd - propStart) /
TIMEINTERVAL;
92 if (hasLCDCandidate())
107 sccCandidates.clear();
108 for (NodeSet::iterator it = lcdCandidates.begin(); it != lcdCandidates.end(); ++it)
109 if (sccRepNode(*it) == *it)
110 sccCandidates.insert(*it);
112 double sccStart = stat->getClk();
114 getSCCDetector()->find(sccCandidates);
115 double sccEnd = stat->getClk();
116 timeOfSCCDetection += (sccEnd - sccStart) /
TIMEINTERVAL;
118 double mergeStart = stat->getClk();
121 double mergeEnd = stat->getClk();
122 timeOfSCCMerges += (mergeEnd - mergeStart) /
TIMEINTERVAL;
124 return getSCCDetector()->topoNodeStack();
137 updatePropaPts(newRepId, nodeId);
138 unionPts(newRepId,nodeId);
139 pushIntoWorklist(newRepId);
143 bool gepInsideScc = consCG->moveEdgesToRepNode(node, consCG->getConstraintNode(newRepId));
146 updateNodeRepAndSubs(node->
getId(),newRepId);
148 consCG->removeConstraintNode(node);
std::stack< NodeID > NodeStack
static AndersenLCD * lcdAndersen
bool mergeSrcToTgt(NodeID nodeId, NodeID newRepId)
const ConstraintEdge::ConstraintEdgeSetTy & getCopyOutEdges() const
const ConstraintEdge::ConstraintEdgeSetTy & getGepOutEdges() const
NodeID getId() const
Get ID.
virtual void handleCopyGep(ConstraintNode *node)