svf-tools 1.0.1039 → 1.0.1040
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1040",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
package/svf/include/Graphs/SCC.h
CHANGED
|
@@ -130,12 +130,17 @@ public:
|
|
|
130
130
|
return _T;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
inline const GNodeStack& topoNodeStack() const
|
|
134
|
+
{
|
|
135
|
+
return _T;
|
|
136
|
+
}
|
|
137
|
+
|
|
133
138
|
/// Return a handle to the stack of nodes in reverse topological
|
|
134
139
|
/// order. This will be used to seed the initial solution
|
|
135
140
|
/// and improve efficiency.
|
|
136
|
-
inline
|
|
141
|
+
inline FIFOWorkList<NodeID> revTopoNodeStack() const
|
|
137
142
|
{
|
|
138
|
-
|
|
143
|
+
FIFOWorkList<NodeID> revTopoOrder;
|
|
139
144
|
GNodeStack topoOrder = topoNodeStack();
|
|
140
145
|
while(!topoOrder.empty())
|
|
141
146
|
{
|
|
@@ -268,8 +268,6 @@ private:
|
|
|
268
268
|
/// Get all the objects in callee's modref escaped via global objects (the chain pts of globals)
|
|
269
269
|
void getEscapObjviaGlobals(NodeBS& globs, const NodeBS& pts);
|
|
270
270
|
|
|
271
|
-
/// Get reverse topo call graph scc
|
|
272
|
-
void getCallGraphSCCRevTopoOrder(WorkList& worklist);
|
|
273
271
|
|
|
274
272
|
protected:
|
|
275
273
|
MRGenerator(BVDataPTAImpl* p, bool ptrOnly);
|
|
@@ -73,10 +73,10 @@ protected:
|
|
|
73
73
|
|
|
74
74
|
/// Both rep and sub nodes need to be processed later.
|
|
75
75
|
/// Collect sub nodes from SCCDetector.
|
|
76
|
-
|
|
76
|
+
FIFOWorkList<NodeID> revTopoStack = this->getSCCDetector()->revTopoNodeStack();
|
|
77
77
|
while (!revTopoStack.empty())
|
|
78
78
|
{
|
|
79
|
-
NodeID nodeId = revTopoStack.
|
|
79
|
+
NodeID nodeId = revTopoStack.front();
|
|
80
80
|
revTopoStack.pop();
|
|
81
81
|
const NodeBS& subNodes = this->getSCCDetector()->subNodes(nodeId);
|
|
82
82
|
for (NodeBS::iterator it = subNodes.begin(), eit = subNodes.end(); it != eit; ++it)
|
|
@@ -238,12 +238,12 @@ void MRGenerator::collectModRefForCall()
|
|
|
238
238
|
|
|
239
239
|
DBOUT(DGENERAL, outs() << pasMsg("\t\tPerform Callsite Mod-Ref \n"));
|
|
240
240
|
|
|
241
|
-
WorkList worklist;
|
|
242
|
-
getCallGraphSCCRevTopoOrder(worklist);
|
|
241
|
+
WorkList worklist = callGraphSCC->revTopoNodeStack();
|
|
243
242
|
|
|
244
243
|
while(!worklist.empty())
|
|
245
244
|
{
|
|
246
|
-
NodeID callGraphNodeID = worklist.
|
|
245
|
+
NodeID callGraphNodeID = worklist.front();
|
|
246
|
+
worklist.pop();
|
|
247
247
|
/// handle all sub scc nodes of this rep node
|
|
248
248
|
const NodeBS& subNodes = callGraphSCC->subNodes(callGraphNodeID);
|
|
249
249
|
for(NodeBS::iterator it = subNodes.begin(), eit = subNodes.end(); it!=eit; ++it)
|
|
@@ -456,20 +456,6 @@ bool MRGenerator::addModSideEffectOfCallSite(const CallICFGNode* cs, const NodeB
|
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
|
|
459
|
-
/*!
|
|
460
|
-
* Get the reverse topo order of scc call graph
|
|
461
|
-
*/
|
|
462
|
-
void MRGenerator::getCallGraphSCCRevTopoOrder(WorkList& worklist)
|
|
463
|
-
{
|
|
464
|
-
NodeStack revTopoNodeStack = callGraphSCC->revTopoNodeStack();
|
|
465
|
-
while(!revTopoNodeStack.empty())
|
|
466
|
-
{
|
|
467
|
-
NodeID callgraphNodeID = revTopoNodeStack.top();
|
|
468
|
-
revTopoNodeStack.pop();
|
|
469
|
-
worklist.push(callgraphNodeID);
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
|
|
473
459
|
/*!
|
|
474
460
|
* Get all objects might pass into and pass out of callee(s) from a callsite
|
|
475
461
|
*/
|
package/svf/lib/WPA/Andersen.cpp
CHANGED
|
@@ -709,12 +709,12 @@ inline void Andersen::collapseFields()
|
|
|
709
709
|
*/
|
|
710
710
|
void Andersen::mergeSccCycle()
|
|
711
711
|
{
|
|
712
|
-
NodeStack
|
|
713
|
-
while (!revTopoOrder.empty())
|
|
714
|
-
{
|
|
715
|
-
NodeID repNodeId = revTopoOrder.top();
|
|
716
|
-
revTopoOrder.pop();
|
|
712
|
+
NodeStack topoOrder = getSCCDetector()->topoNodeStack();
|
|
717
713
|
|
|
714
|
+
while (!topoOrder.empty())
|
|
715
|
+
{
|
|
716
|
+
NodeID repNodeId = topoOrder.top();
|
|
717
|
+
topoOrder.pop();
|
|
718
718
|
const NodeBS& subNodes = getSCCDetector()->subNodes(repNodeId);
|
|
719
719
|
// merge sub nodes to rep node
|
|
720
720
|
mergeSccNodes(repNodeId, subNodes);
|