56 while (!nodeStack.empty())
58 NodeID nodeId = nodeStack.top();
69 double propStart =
stat->getClk();
73 double propEnd =
stat->getClk();
85 double insertStart =
stat->getClk();
89 double insertEnd =
stat->getClk();
102 double sccStart =
stat->getClk();
104 double sccEnd =
stat->getClk();
107 double mergeStart =
stat->getClk();
109 double mergeEnd =
stat->getClk();
114 sccStart =
stat->getClk();
116 sccEnd =
stat->getClk();
132 for (
NodeID candidate : tmpSccCandidates)
134 tmpSccCandidates.clear();
170 pwcNodes.insert(nId);
173 for (
NodeID subId : pwcNodes)
175 tmpWorkList.
push(subId);
177 while (!tmpWorkList.
empty())
188 if (changed && pwcNodes.find(edge->getDstID()) != pwcNodes.end())
189 tmpWorkList.
push(edge->getDstID());
196 if (changed && pwcNodes.find(edge->getDstID()) != pwcNodes.end())
197 tmpWorkList.
push(edge->getDstID());
211 double insertStart =
stat->getClk();
218 getPts(nodeId).end(); piter != epiter; ++piter)
231 getPts(nodeId).end(); piter != epiter; ++piter)
240 double insertEnd =
stat->getClk();
278 double cgUpdateStart =
stat->getClk();
283 for(CallEdgeMap::iterator it = newEdges.begin(), eit = newEdges.end(); it!=eit; ++it )
285 for(FunctionSet::iterator cit = it->second.begin(), ecit = it->second.end(); cit!=ecit; ++cit)
291 double cgUpdateEnd =
stat->getClk();
294 return (!newEdges.empty());
static double timeOfSCCMerges
static u32_t numOfSCCDetection
static double timeOfUpdateCallGraph
virtual void connectCaller2CalleeParams(const CallICFGNode *cs, const FunObjVar *F, NodePairSet &cpySrcNodes)
Connect formal and actual parameters for indirect callsites.
static u32_t numOfProcessedAddr
Statistics.
static double timeOfSCCDetection
static double timeOfProcessLoadStore
static double timeOfProcessCopyGep
ConstraintGraph * consCG
Constraint Graph.
NodeID sccRepNode(NodeID id) const override
SCC methods.
virtual bool addCopyEdge(NodeID src, NodeID dst)
static AndersenSCD * scdAndersen
virtual bool updateCallGraph(const CallSiteToFunPtrMap &callsites)
virtual void processAddr(const AddrCGEdge *addr)
virtual NodeStack & SCCDetect()
virtual void handleLoadStore(ConstraintNode *node)
virtual void solveWorklist()
virtual void handleCopyGep(ConstraintNode *node)
virtual void processPWC(ConstraintNode *rep)
void addSccCandidate(NodeID nodeId)
void setDetectPWC(bool flag)
virtual void computeDiffPts(NodeID id)
Handle diff points-to set.
virtual bool addCopyEdge(NodeID src, NodeID dst)
Add copy edge on constraint graph.
virtual const PointsTo & getDiffPts(NodeID id)
virtual bool processGep(NodeID node, const GepCGEdge *edge)
virtual void handleCopyGep(ConstraintNode *node)
virtual bool processLoad(NodeID node, const ConstraintEdge *load)
virtual const PointsTo & getPts(NodeID id)
Operation of points-to set.
void collapseFields()
collapse positive weight cycles of a graph
virtual bool processStore(NodeID node, const ConstraintEdge *load)
virtual bool processCopy(NodeID node, const ConstraintEdge *edge)
virtual void collapsePWCNode(NodeID nodeId)
Collapse a field object into its base for field insensitive analysis.
virtual void onTheFlyCallGraphSolve(const CallSiteToFunPtrMap &callsites, CallEdgeMap &newEdges)
On the fly call graph construction.
virtual bool addPts(NodeID id, NodeID ptd)
const_iterator outgoingLoadsEnd() const
const ConstraintEdge::ConstraintEdgeSetTy & getGepOutEdges() const
const_iterator incomingStoresBegin() const
const_iterator incomingStoresEnd() const
ConstraintEdge::ConstraintEdgeSetTy::const_iterator const_iterator
const ConstraintEdge::ConstraintEdgeSetTy & getCopyOutEdges() const
const_iterator outgoingLoadsBegin() const
bool push(const Data &data)
NodeID getSrcID() const
get methods of the components
static Option< bool > DetectPWC
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
PTAStat * stat
Statistics.
SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap
GNodeStack & topoNodeStack()
NodeID getId() const
Get ID.
bool isInWorklist(NodeID id)
SCC * getSCCDetector() const
virtual void pushIntoWorklist(NodeID id)
FIFOWorkList< NodeID > WorkList
LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > dyn_cast(const Y &Val)
std::stack< NodeID > NodeStack
Set< NodePair > NodePairSet