svf-lib 1.0.2238 → 1.0.2240
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/SVF-linux-aarch64/Release-build/bin/ae +0 -0
- package/SVF-linux-aarch64/Release-build/bin/cfl +0 -0
- package/SVF-linux-aarch64/Release-build/bin/dvf +0 -0
- package/SVF-linux-aarch64/Release-build/bin/llvm2svf +0 -0
- package/SVF-linux-aarch64/Release-build/bin/mta +0 -0
- package/SVF-linux-aarch64/Release-build/bin/saber +0 -0
- package/SVF-linux-aarch64/Release-build/bin/svf-ex +0 -0
- package/SVF-linux-aarch64/Release-build/bin/wpa +0 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/AbstractState.h +406 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/AbstractValue.h +157 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/AddressValue.h +232 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/ICFGWTO.h +82 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/IntervalValue.h +1055 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/NumericValue.h +1292 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/RelExeState.h +226 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Core/RelationSolver.h +91 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Svfexe/AEDetector.h +323 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Svfexe/AbsExtAPI.h +140 -0
- package/SVF-linux-aarch64/Release-build/include/AE/Svfexe/AbstractInterpretation.h +350 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFGNormalizer.h +84 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFGrammar.h +468 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLAlias.h +168 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLBase.h +118 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLGramGraphChecker.h +74 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLGraphBuilder.h +166 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLSVFGBuilder.h +58 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLSolver.h +374 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLStat.h +67 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/CFLVF.h +68 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/GrammarBuilder.h +100 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/grammar/PAGGrammar.txt +15 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/grammar/PEGGrammar.txt +11 -0
- package/SVF-linux-aarch64/Release-build/include/CFL/grammar/VFGGrammar.txt +7 -0
- package/SVF-linux-aarch64/Release-build/include/DDA/ContextDDA.h +230 -0
- package/SVF-linux-aarch64/Release-build/include/DDA/DDAClient.h +163 -0
- package/SVF-linux-aarch64/Release-build/include/DDA/DDAPass.h +102 -0
- package/SVF-linux-aarch64/Release-build/include/DDA/DDAStat.h +121 -0
- package/SVF-linux-aarch64/Release-build/include/DDA/DDAVFSolver.h +794 -0
- package/SVF-linux-aarch64/Release-build/include/DDA/FlowDDA.h +178 -0
- package/SVF-linux-aarch64/Release-build/include/FastCluster/LICENSE.TXT +13 -0
- package/SVF-linux-aarch64/Release-build/include/FastCluster/fastcluster.h +80 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/BasicBlockG.h +318 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/CDG.h +482 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/CFLGraph.h +232 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/CHG.h +369 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/CallGraph.h +498 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ConsG.h +402 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ConsGEdge.h +355 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ConsGNode.h +418 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/DOTGraphTraits.h +188 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/GenericGraph.h +628 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/GraphPrinter.h +111 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/GraphTraits.h +150 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/GraphWriter.h +380 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ICFG.h +331 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ICFGEdge.h +281 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ICFGNode.h +669 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ICFGStat.h +164 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/IRGraph.h +398 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/SCC.h +375 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/SVFG.h +491 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/SVFGEdge.h +237 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/SVFGNode.h +501 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/SVFGOPT.h +363 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/SVFGStat.h +273 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/ThreadCallGraph.h +400 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/VFG.h +664 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/VFGEdge.h +295 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/VFGNode.h +1266 -0
- package/SVF-linux-aarch64/Release-build/include/Graphs/WTO.h +872 -0
- package/SVF-linux-aarch64/Release-build/include/MSSA/MSSAMuChi.h +722 -0
- package/SVF-linux-aarch64/Release-build/include/MSSA/MemPartition.h +169 -0
- package/SVF-linux-aarch64/Release-build/include/MSSA/MemRegion.h +489 -0
- package/SVF-linux-aarch64/Release-build/include/MSSA/MemSSA.h +452 -0
- package/SVF-linux-aarch64/Release-build/include/MSSA/SVFGBuilder.h +98 -0
- package/SVF-linux-aarch64/Release-build/include/MTA/LockAnalysis.h +533 -0
- package/SVF-linux-aarch64/Release-build/include/MTA/MHP.h +546 -0
- package/SVF-linux-aarch64/Release-build/include/MTA/MTA.h +98 -0
- package/SVF-linux-aarch64/Release-build/include/MTA/MTAStat.h +73 -0
- package/SVF-linux-aarch64/Release-build/include/MTA/TCT.h +620 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/AbstractPointsToDS.h +316 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/AccessPath.h +194 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/ConditionalPT.h +878 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/MutablePointsToDS.h +1025 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/PersistentPointsToCache.h +463 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/PersistentPointsToDS.h +955 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/PointerAnalysis.h +429 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/PointerAnalysisImpl.h +602 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/PointsTo.h +255 -0
- package/SVF-linux-aarch64/Release-build/include/MemoryModel/SVFLoop.h +167 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/DoubleFreeChecker.h +76 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/FileChecker.h +80 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/LeakChecker.h +122 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/ProgSlice.h +327 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/SaberCheckerAPI.h +151 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/SaberCondAllocator.h +317 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/SaberSVFGBuilder.h +114 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/SrcSnkDDA.h +327 -0
- package/SVF-linux-aarch64/Release-build/include/SABER/SrcSnkSolver.h +186 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/BasicTypes.h +280 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/BreakConstantExpr.h +94 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/CHGBuilder.h +78 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/CppUtil.h +184 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/DCHG.h +477 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/ICFGBuilder.h +160 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/LLVMLoopAnalysis.h +60 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/LLVMModule.h +594 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/LLVMUtil.h +438 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/ObjTypeInference.h +130 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/SVFIRBuilder.h +520 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/SVFLLVMValue.h +387 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/SVFModule.h +186 -0
- package/SVF-linux-aarch64/Release-build/include/SVF-LLVM/SymbolTableBuilder.h +132 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/ObjTypeInfo.h +224 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/PAGBuilderFromFile.h +80 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/SVFIR.h +856 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/SVFStatements.h +1328 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/SVFType.h +578 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/SVFValue.h +338 -0
- package/SVF-linux-aarch64/Release-build/include/SVFIR/SVFVariables.h +2204 -0
- package/SVF-linux-aarch64/Release-build/include/Util/Annotator.h +180 -0
- package/SVF-linux-aarch64/Release-build/include/Util/BitVector.h +55 -0
- package/SVF-linux-aarch64/Release-build/include/Util/CDGBuilder.h +107 -0
- package/SVF-linux-aarch64/Release-build/include/Util/CallGraphBuilder.h +62 -0
- package/SVF-linux-aarch64/Release-build/include/Util/Casting.h +426 -0
- package/SVF-linux-aarch64/Release-build/include/Util/CommandLine.h +530 -0
- package/SVF-linux-aarch64/Release-build/include/Util/CoreBitVector.h +214 -0
- package/SVF-linux-aarch64/Release-build/include/Util/CxtStmt.h +502 -0
- package/SVF-linux-aarch64/Release-build/include/Util/DPItem.h +618 -0
- package/SVF-linux-aarch64/Release-build/include/Util/ExtAPI.h +117 -0
- package/SVF-linux-aarch64/Release-build/include/Util/GeneralType.h +127 -0
- package/SVF-linux-aarch64/Release-build/include/Util/GraphReachSolver.h +186 -0
- package/SVF-linux-aarch64/Release-build/include/Util/NodeIDAllocator.h +203 -0
- package/SVF-linux-aarch64/Release-build/include/Util/Options.h +272 -0
- package/SVF-linux-aarch64/Release-build/include/Util/PTAStat.h +83 -0
- package/SVF-linux-aarch64/Release-build/include/Util/SVFBugReport.h +427 -0
- package/SVF-linux-aarch64/Release-build/include/Util/SVFLoopAndDomInfo.h +169 -0
- package/SVF-linux-aarch64/Release-build/include/Util/SVFStat.h +103 -0
- package/SVF-linux-aarch64/Release-build/include/Util/SVFUtil.h +478 -0
- package/SVF-linux-aarch64/Release-build/include/Util/SparseBitVector.h +1252 -0
- package/SVF-linux-aarch64/Release-build/include/Util/ThreadAPI.h +189 -0
- package/SVF-linux-aarch64/Release-build/include/Util/WorkList.h +317 -0
- package/SVF-linux-aarch64/Release-build/include/Util/Z3Expr.h +325 -0
- package/SVF-linux-aarch64/Release-build/include/Util/cJSON.h +300 -0
- package/SVF-linux-aarch64/Release-build/include/Util/config.h +26 -0
- package/SVF-linux-aarch64/Release-build/include/Util/iterator.h +407 -0
- package/SVF-linux-aarch64/Release-build/include/Util/iterator_range.h +76 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/Andersen.h +435 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/AndersenPWC.h +160 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/CSC.h +95 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/FlowSensitive.h +323 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/Steensgaard.h +131 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/TypeAnalysis.h +90 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/VersionedFlowSensitive.h +295 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/WPAFSSolver.h +246 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/WPAPass.h +116 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/WPASolver.h +205 -0
- package/SVF-linux-aarch64/Release-build/include/WPA/WPAStat.h +222 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFConfig.cmake +58 -0
- package/SVF-linux-aarch64/Release-build/lib/cmake/SVF/SVFConfigVersion.cmake +43 -0
- package/SVF-linux-aarch64/Release-build/lib/extapi.bc +2449 -0
- package/SVF-linux-aarch64/Release-build/lib/libSvfCore.so +0 -0
- package/SVF-linux-aarch64/Release-build/lib/libSvfLLVM.so.16 +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
//===- ICFGBuilder.h ----------------------------------------------------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU Affero General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* ICFGBuilder.h
|
|
25
|
+
*
|
|
26
|
+
* Created on:
|
|
27
|
+
* Author: yulei
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef INCLUDE_UTIL_ICFGBUILDER_H_
|
|
31
|
+
#define INCLUDE_UTIL_ICFGBUILDER_H_
|
|
32
|
+
|
|
33
|
+
#include "Graphs/ICFG.h"
|
|
34
|
+
#include "Util/WorkList.h"
|
|
35
|
+
#include "BasicTypes.h"
|
|
36
|
+
#include "LLVMModule.h"
|
|
37
|
+
|
|
38
|
+
namespace SVF
|
|
39
|
+
{
|
|
40
|
+
|
|
41
|
+
class ICFGBuilder
|
|
42
|
+
{
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
|
|
46
|
+
typedef std::vector<const Instruction*> InstVec;
|
|
47
|
+
typedef Set<const Instruction*> BBSet;
|
|
48
|
+
typedef Map<const Instruction*, CallICFGNode *> CSToCallNodeMapTy;
|
|
49
|
+
typedef Map<const Instruction*, RetICFGNode *> CSToRetNodeMapTy;
|
|
50
|
+
typedef Map<const Instruction*, IntraICFGNode *> InstToBlockNodeMapTy;
|
|
51
|
+
typedef Map<const Function*, FunEntryICFGNode *> FunToFunEntryNodeMapTy;
|
|
52
|
+
typedef Map<const Function*, FunExitICFGNode *> FunToFunExitNodeMapTy;
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
private:
|
|
56
|
+
ICFG* icfg;
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
typedef FIFOWorkList<const Instruction*> WorkList;
|
|
60
|
+
|
|
61
|
+
ICFGBuilder() = default;
|
|
62
|
+
|
|
63
|
+
ICFG* build();
|
|
64
|
+
|
|
65
|
+
private:
|
|
66
|
+
|
|
67
|
+
inline LLVMModuleSet* llvmModuleSet()
|
|
68
|
+
{
|
|
69
|
+
return LLVMModuleSet::getLLVMModuleSet();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
|
|
74
|
+
/// Create edges between ICFG nodes within a function
|
|
75
|
+
///@{
|
|
76
|
+
void processFunEntry(const Function* fun, WorkList& worklist);
|
|
77
|
+
|
|
78
|
+
void processUnreachableFromEntry(const Function* fun, WorkList& worklist);
|
|
79
|
+
|
|
80
|
+
void processFunBody(WorkList& worklist);
|
|
81
|
+
|
|
82
|
+
void processFunExit(const Function* fun);
|
|
83
|
+
//@}
|
|
84
|
+
|
|
85
|
+
void checkICFGNodesVisited(const Function* fun);
|
|
86
|
+
|
|
87
|
+
void connectGlobalToProgEntry();
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/// Create edges between ICFG nodes across functions
|
|
91
|
+
void addICFGInterEdges(const Instruction* cs, const Function* callee);
|
|
92
|
+
|
|
93
|
+
inline ICFGNode* getICFGNode(const Instruction* inst)
|
|
94
|
+
{
|
|
95
|
+
return llvmModuleSet()->getICFGNode(inst);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
inline bool hasICFGNode(const Instruction* inst)
|
|
99
|
+
{
|
|
100
|
+
return llvmModuleSet()->hasICFGNode(inst);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/// get a call node
|
|
104
|
+
inline CallICFGNode* getCallICFGNode(const Instruction* cs)
|
|
105
|
+
{
|
|
106
|
+
return llvmModuleSet()->getCallICFGNode(cs);
|
|
107
|
+
}
|
|
108
|
+
/// get a return node
|
|
109
|
+
inline RetICFGNode* getRetICFGNode(const Instruction* cs)
|
|
110
|
+
{
|
|
111
|
+
return llvmModuleSet()->getRetICFGNode(cs);
|
|
112
|
+
}
|
|
113
|
+
/// get a intra node
|
|
114
|
+
inline IntraICFGNode* getIntraICFGNode(const Instruction* inst)
|
|
115
|
+
{
|
|
116
|
+
return llvmModuleSet()->getIntraICFGNode(inst);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/// get a function entry node
|
|
120
|
+
inline FunEntryICFGNode* getFunEntryICFGNode(const Function* fun)
|
|
121
|
+
{
|
|
122
|
+
return llvmModuleSet()->getFunEntryICFGNode(fun);
|
|
123
|
+
}
|
|
124
|
+
/// get a function exit node
|
|
125
|
+
inline FunExitICFGNode* getFunExitICFGNode(const Function* fun)
|
|
126
|
+
{
|
|
127
|
+
return llvmModuleSet()->getFunExitICFGNode(fun);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
inline GlobalICFGNode* getGlobalICFGNode() const
|
|
131
|
+
{
|
|
132
|
+
return icfg->getGlobalICFGNode();
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/// Add/Get an inter block ICFGNode
|
|
136
|
+
InterICFGNode* addInterBlockICFGNode(const Instruction* inst);
|
|
137
|
+
|
|
138
|
+
/// Add/Get a basic block ICFGNode
|
|
139
|
+
inline ICFGNode* addBlockICFGNode(const Instruction* inst);
|
|
140
|
+
|
|
141
|
+
/// Add and get IntraBlock ICFGNode
|
|
142
|
+
IntraICFGNode* addIntraBlockICFGNode(const Instruction* inst);
|
|
143
|
+
|
|
144
|
+
FunEntryICFGNode* addFunEntryBlock(const Function* fun);
|
|
145
|
+
|
|
146
|
+
FunExitICFGNode* addFunExitBlock(const Function* fun);
|
|
147
|
+
|
|
148
|
+
inline void addGlobalICFGNode()
|
|
149
|
+
{
|
|
150
|
+
icfg->globalBlockNode = new GlobalICFGNode(icfg->totalICFGNode++);
|
|
151
|
+
icfg->addICFGNode(icfg->globalBlockNode);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
private:
|
|
155
|
+
BBSet visited;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
} // End namespace SVF
|
|
159
|
+
|
|
160
|
+
#endif /* INCLUDE_UTIL_ICFGBUILDER_H_ */
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//===- LLVMLoopAnalysis.h -- LoopAnalysis of SVF --------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2022> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU Affero General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* LLVMLoopAnalysis.h
|
|
25
|
+
*
|
|
26
|
+
* Created on: 14, 06, 2022
|
|
27
|
+
* Author: Jiawei Wang, Xiao Cheng
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef SVF_LLVMLOOPANALYSIS_H
|
|
31
|
+
#define SVF_LLVMLOOPANALYSIS_H
|
|
32
|
+
|
|
33
|
+
#include "SVFIR/SVFIR.h"
|
|
34
|
+
#include "MemoryModel/SVFLoop.h"
|
|
35
|
+
#include "SVF-LLVM/BasicTypes.h"
|
|
36
|
+
|
|
37
|
+
namespace SVF
|
|
38
|
+
{
|
|
39
|
+
class LLVMLoopAnalysis
|
|
40
|
+
{
|
|
41
|
+
public:
|
|
42
|
+
|
|
43
|
+
/// Constructor
|
|
44
|
+
LLVMLoopAnalysis() = default;;
|
|
45
|
+
|
|
46
|
+
/// Destructor
|
|
47
|
+
virtual ~LLVMLoopAnalysis() = default;
|
|
48
|
+
|
|
49
|
+
/// Build llvm loops based on LoopInfo analysis
|
|
50
|
+
virtual void buildLLVMLoops(ICFG* icfg);
|
|
51
|
+
|
|
52
|
+
/// Start from here
|
|
53
|
+
virtual void build(ICFG *icfg);
|
|
54
|
+
|
|
55
|
+
/// Build SVF loops based on llvm loops
|
|
56
|
+
virtual void buildSVFLoops(ICFG *icfg, std::vector<const Loop *> &llvmLoops);
|
|
57
|
+
};
|
|
58
|
+
} // End namespace SVF
|
|
59
|
+
|
|
60
|
+
#endif //SVF_LLVMLOOPANALYSIS_H
|