svf-tools 1.0.975 → 1.0.976
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 +1 -1
- package/svf/include/AE/Svfexe/AbstractInterpretation.h +1 -1
- package/svf/include/DDA/ContextDDA.h +2 -2
- package/svf/include/DDA/DDAVFSolver.h +5 -5
- package/svf/include/DDA/FlowDDA.h +1 -1
- package/svf/include/Graphs/{PTACallGraph.h → CallGraph.h} +41 -41
- package/svf/include/Graphs/ICFG.h +2 -2
- package/svf/include/Graphs/ThreadCallGraph.h +24 -24
- package/svf/include/Graphs/VFG.h +4 -4
- package/svf/include/MSSA/MemRegion.h +4 -4
- package/svf/include/MTA/LockAnalysis.h +1 -1
- package/svf/include/MTA/MHP.h +2 -2
- package/svf/include/MTA/PCG.h +3 -3
- package/svf/include/MTA/TCT.h +7 -7
- package/svf/include/MemoryModel/PointerAnalysis.h +13 -13
- package/svf/include/SABER/SaberSVFGBuilder.h +1 -1
- package/svf/include/SABER/SrcSnkDDA.h +7 -7
- package/svf/include/Util/CallGraphBuilder.h +5 -5
- package/svf/lib/AE/Svfexe/AbstractInterpretation.cpp +1 -1
- package/svf/lib/CFL/CFLSVFGBuilder.cpp +1 -1
- package/svf/lib/DDA/ContextDDA.cpp +9 -9
- package/svf/lib/DDA/DDAClient.cpp +3 -3
- package/svf/lib/DDA/DDAPass.cpp +4 -4
- package/svf/lib/DDA/FlowDDA.cpp +2 -2
- package/svf/lib/Graphs/{PTACallGraph.cpp → CallGraph.cpp} +66 -66
- package/svf/lib/Graphs/ICFG.cpp +6 -6
- package/svf/lib/Graphs/SVFG.cpp +7 -7
- package/svf/lib/Graphs/SVFGReadWrite.cpp +6 -6
- package/svf/lib/Graphs/SVFGStat.cpp +1 -1
- package/svf/lib/Graphs/ThreadCallGraph.cpp +17 -17
- package/svf/lib/Graphs/VFG.cpp +1 -1
- package/svf/lib/MSSA/MemRegion.cpp +7 -7
- package/svf/lib/MTA/LockAnalysis.cpp +18 -18
- package/svf/lib/MTA/MHP.cpp +19 -19
- package/svf/lib/MTA/MTA.cpp +1 -1
- package/svf/lib/MTA/PCG.cpp +12 -12
- package/svf/lib/MTA/TCT.cpp +23 -23
- package/svf/lib/MemoryModel/PointerAnalysis.cpp +12 -12
- package/svf/lib/SABER/LeakChecker.cpp +4 -4
- package/svf/lib/SABER/SaberSVFGBuilder.cpp +4 -4
- package/svf/lib/SABER/SrcSnkDDA.cpp +1 -1
- package/svf/lib/Util/CallGraphBuilder.cpp +2 -2
- package/svf/lib/Util/PTAStat.cpp +7 -7
- package/svf/lib/WPA/VersionedFlowSensitive.cpp +2 -2
- package/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +1 -1
- package/svf-llvm/lib/SVFIRBuilder.cpp +5 -5
- package/svf-llvm/tools/AE/ae.cpp +1 -1
- package/svf-llvm/tools/Example/svf-ex.cpp +1 -1
- package/svf-llvm/tools/MTA/LockResultValidator.cpp +2 -2
package/svf/lib/Util/PTAStat.cpp
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
#include <iomanip>
|
|
31
|
-
#include "Graphs/
|
|
31
|
+
#include "Graphs/CallGraph.h"
|
|
32
32
|
#include "Util/PTAStat.h"
|
|
33
33
|
#include "MemoryModel/PointerAnalysisImpl.h"
|
|
34
34
|
#include "SVFIR/SVFIR.h"
|
|
@@ -81,7 +81,7 @@ void PTAStat::performStat()
|
|
|
81
81
|
void PTAStat::callgraphStat()
|
|
82
82
|
{
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
CallGraph* graph = pta->getCallGraph();
|
|
85
85
|
PointerAnalysis::CallGraphSCC* callgraphSCC = new PointerAnalysis::CallGraphSCC(graph);
|
|
86
86
|
callgraphSCC->find();
|
|
87
87
|
|
|
@@ -93,8 +93,8 @@ void PTAStat::callgraphStat()
|
|
|
93
93
|
unsigned edgeInCycle = 0;
|
|
94
94
|
|
|
95
95
|
NodeSet sccRepNodeSet;
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
CallGraph::iterator it = graph->begin();
|
|
97
|
+
CallGraph::iterator eit = graph->end();
|
|
98
98
|
for (; it != eit; ++it)
|
|
99
99
|
{
|
|
100
100
|
totalNode++;
|
|
@@ -107,11 +107,11 @@ void PTAStat::callgraphStat()
|
|
|
107
107
|
maxNodeInCycle = subNodes.count();
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
CallGraphNode::const_iterator edgeIt = it->second->InEdgeBegin();
|
|
111
|
+
CallGraphNode::const_iterator edgeEit = it->second->InEdgeEnd();
|
|
112
112
|
for (; edgeIt != edgeEit; ++edgeIt)
|
|
113
113
|
{
|
|
114
|
-
|
|
114
|
+
CallGraphEdge *edge = *edgeIt;
|
|
115
115
|
totalEdge+= edge->getDirectCalls().size() + edge->getIndirectCalls().size();
|
|
116
116
|
if(callgraphSCC->repNode(edge->getSrcID()) == callgraphSCC->repNode(edge->getDstID()))
|
|
117
117
|
{
|
|
@@ -483,9 +483,9 @@ void VersionedFlowSensitive::buildDeltaMaps(void)
|
|
|
483
483
|
bool isDelta = false;
|
|
484
484
|
if (const SVFFunction *fn = svfg->isFunEntrySVFGNode(s))
|
|
485
485
|
{
|
|
486
|
-
|
|
486
|
+
CallGraphEdge::CallInstSet callsites;
|
|
487
487
|
/// use pre-analysis call graph to approximate all potential callsites
|
|
488
|
-
ander->
|
|
488
|
+
ander->getCallGraph()->getIndCallSitesInvokingCallee(fn, callsites);
|
|
489
489
|
isDelta = !callsites.empty();
|
|
490
490
|
|
|
491
491
|
if (isDelta)
|
|
@@ -1146,17 +1146,17 @@ void SVFIRBuilder::handleIndCall(CallBase* cs)
|
|
|
1146
1146
|
pag->addIndirectCallsites(cbn,pag->getValueNode(svfcalledval));
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
|
-
void SVFIRBuilder::updateCallGraph(
|
|
1149
|
+
void SVFIRBuilder::updateCallGraph(CallGraph* callgraph)
|
|
1150
1150
|
{
|
|
1151
|
-
|
|
1152
|
-
|
|
1151
|
+
CallGraph::CallEdgeMap::const_iterator iter = callgraph->getIndCallMap().begin();
|
|
1152
|
+
CallGraph::CallEdgeMap::const_iterator eiter = callgraph->getIndCallMap().end();
|
|
1153
1153
|
for (; iter != eiter; iter++)
|
|
1154
1154
|
{
|
|
1155
1155
|
const CallICFGNode* callBlock = iter->first;
|
|
1156
1156
|
const CallBase* callbase = SVFUtil::cast<CallBase>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(callBlock->getCallSite()));
|
|
1157
1157
|
assert(callBlock->isIndirectCall() && "this is not an indirect call?");
|
|
1158
|
-
const
|
|
1159
|
-
for (
|
|
1158
|
+
const CallGraph::FunctionSet& functions = iter->second;
|
|
1159
|
+
for (CallGraph::FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
|
|
1160
1160
|
{
|
|
1161
1161
|
const Function* callee = SVFUtil::cast<Function>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(*func_iter));
|
|
1162
1162
|
|
package/svf-llvm/tools/AE/ae.cpp
CHANGED
|
@@ -880,7 +880,7 @@ int main(int argc, char** argv)
|
|
|
880
880
|
SVFIRBuilder builder(svfModule);
|
|
881
881
|
SVFIR* pag = builder.build();
|
|
882
882
|
AndersenWaveDiff* ander = AndersenWaveDiff::createAndersenWaveDiff(pag);
|
|
883
|
-
|
|
883
|
+
CallGraph* callgraph = ander->getCallGraph();
|
|
884
884
|
builder.updateCallGraph(callgraph);
|
|
885
885
|
pag->getICFG()->updateCallGraph(callgraph);
|
|
886
886
|
if (Options::ICFGMergeAdjacentNodes())
|
|
@@ -224,11 +224,11 @@ const Instruction* LockResultValidator::getPreviousMemoryAccessInst( const Instr
|
|
|
224
224
|
|
|
225
225
|
if(LLVMUtil::isCallSite(I))
|
|
226
226
|
{
|
|
227
|
-
|
|
227
|
+
CallGraph::FunctionSet callees;
|
|
228
228
|
const SVFInstruction* svfInst = LLVMModuleSet::getLLVMModuleSet()->getSVFInstruction(I);
|
|
229
229
|
_la->getTCT()->getThreadCallGraph()->getCallees(getCBN(svfInst), callees);
|
|
230
230
|
|
|
231
|
-
for(
|
|
231
|
+
for(CallGraph::FunctionSet::const_iterator cit = callees.begin(),
|
|
232
232
|
ecit = callees.end(); cit!=ecit; cit++)
|
|
233
233
|
{
|
|
234
234
|
if(*cit != nullptr)
|