52{
54
55
56
60 {
61 const CallGraphNode* node = it->second;
64 continue;
67 rootEntry[rep] = fun;
69 {
71 nonRootSCCs.insert(rep);
72 }
73 }
74
76 {
79 continue;
80
83
84 bool isEntry = false;
85 if (it->second->getInEdges().empty())
86 isEntry = true;
87 for (auto inEdge: it->second->getInEdges())
88 {
89 NodeID srcNodeId = inEdge->getSrcID();
90 if (!cgSCCNodes.test(srcNodeId))
91 isEntry = true;
92 }
93
94
95
96
97
98 if (!nonRootSCCs.count(repNodeId) && rootEntry[repNodeId] == fun)
99 isEntry = true;
100
101 if (isEntry)
102 {
104 for (const auto& node: cgSCCNodes)
105 {
106 funcScc.insert(
callGraph->getGNode(node)->getFunction());
107 }
108 ICFGWTO* iwto =
new ICFGWTO(
icfg->getFunEntryICFGNode(fun), funcScc);
110 funcToWTO[it->second->getFunction()] = iwto;
111 }
112 }
113
114}
const FunObjVar * getFunction() const
Get function of this call node.
virtual const FunObjVar * getFunction() const
Get containing function, or null for globals/constants.
bool isDeclaration() const
const GEdgeSetTy & getInEdges() const
NodeID getId() const
Get ID.
bool isProgEntryFunction(const FunObjVar *)
Program entry function e.g. main.
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map