svf-lib 1.0.2421 → 1.0.2422
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,7 +45,8 @@ typedef WTOComponent<ICFG> ICFGWTOComp;
|
|
|
45
45
|
typedef WTONode<ICFG> ICFGSingletonWTO;
|
|
46
46
|
typedef WTOCycle<ICFG> ICFGCycleWTO;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
/// Interprocedural Weak Topological Order
|
|
49
|
+
/// Each IWTO has an entry ICFGNode within an function-level SCC boundary. Here scc is one or more functions.
|
|
49
50
|
class ICFGWTO : public WTO<ICFG>
|
|
50
51
|
{
|
|
51
52
|
public:
|
|
@@ -53,10 +54,11 @@ public:
|
|
|
53
54
|
typedef WTOComponentVisitor<ICFG>::WTONodeT ICFGWTONode;
|
|
54
55
|
Set<const FunObjVar*> scc;
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
// 1st argument is the SCC's entry ICFGNode and 2nd argument is the function(s) in this SCC.
|
|
58
|
+
explicit ICFGWTO(const ICFGNode* node, Set<const FunObjVar*> funcScc = {}) :
|
|
59
|
+
Base(node), scc(funcScc)
|
|
58
60
|
{
|
|
59
|
-
if (scc.empty()) // if
|
|
61
|
+
if (scc.empty()) // if funcScc is empty, the scc is the function itself
|
|
60
62
|
scc.insert(node->getFun());
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -554,13 +554,12 @@ protected:
|
|
|
554
554
|
NodeRefToCycleDepthNumber _nodeToCDN;
|
|
555
555
|
CycleDepthNumber _num;
|
|
556
556
|
Stack _stack;
|
|
557
|
-
GraphT* _graph;
|
|
558
557
|
const NodeT* _entry;
|
|
559
558
|
|
|
560
559
|
public:
|
|
561
560
|
|
|
562
561
|
/// Compute the weak topological order of the given graph
|
|
563
|
-
explicit WTO(
|
|
562
|
+
explicit WTO(const NodeT* entry) : _num(0), _entry(entry)
|
|
564
563
|
{
|
|
565
564
|
}
|
|
566
565
|
|
|
Binary file
|