svf-lib 1.0.998 → 1.0.1001
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/Release-build/lib/libSvf.a +0 -0
- package/SVF-linux/include/Graphs/GraphPrinter.h +1 -0
- package/SVF-linux/include/Graphs/SVFG.h +0 -5
- package/SVF-linux/include/MSSA/MSSAMuChi.h +2 -2
- package/SVF-linux/include/MTA/MTA.h +1 -0
- package/SVF-linux/include/SABER/SaberCheckerAPI.h +1 -1
- package/SVF-linux/include/SVF-FE/BasicTypes.h +60 -1
- package/SVF-linux/include/SVF-FE/DataFlowUtil.h +1 -0
- package/SVF-linux/include/SVF-FE/LLVMModule.h +1 -0
- package/SVF-linux/include/Util/BasicTypes.h +0 -46
- package/SVF-linux/include/Util/ExtAPI.h +2 -3
- package/SVF-linux/include/Util/SVFBasicTypes.h +0 -2
- package/SVF-linux/include/Util/ThreadAPI.h +2 -2
- package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/Graphs/GraphPrinter.h +1 -0
- package/SVF-osx/include/Graphs/SVFG.h +0 -5
- package/SVF-osx/include/MSSA/MSSAMuChi.h +2 -2
- package/SVF-osx/include/SABER/SaberCheckerAPI.h +1 -1
- package/SVF-osx/include/SVF-FE/BasicTypes.h +4 -0
- package/SVF-osx/include/SVF-FE/LLVMModule.h +1 -0
- package/SVF-osx/include/Util/BasicTypes.h +0 -4
- package/SVF-osx/include/Util/ExtAPI.h +2 -3
- package/SVF-osx/include/Util/SVFBasicTypes.h +0 -2
- package/SVF-osx/include/Util/ThreadAPI.h +2 -2
- package/package.json +1 -1
|
Binary file
|
|
@@ -173,11 +173,6 @@ public:
|
|
|
173
173
|
return getSVFGNode(getDef(pagNode));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
/// Return the corresponding SVFGNodes to a given llvm::Value.
|
|
177
|
-
/// return an empty list, if the no mapping is possible
|
|
178
|
-
std::set<const SVFGNode*> fromValue(const llvm::Value* value) const;
|
|
179
|
-
|
|
180
|
-
|
|
181
176
|
/// Perform statistics
|
|
182
177
|
void performStat();
|
|
183
178
|
|
|
@@ -183,7 +183,7 @@ public:
|
|
|
183
183
|
//@}
|
|
184
184
|
|
|
185
185
|
/// Return load instruction
|
|
186
|
-
inline const LoadStmt*
|
|
186
|
+
inline const LoadStmt* getLoadStmt() const
|
|
187
187
|
{
|
|
188
188
|
return inst;
|
|
189
189
|
}
|
|
@@ -482,7 +482,7 @@ public:
|
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
/// Get store instruction
|
|
485
|
-
inline const StoreStmt*
|
|
485
|
+
inline const StoreStmt* getStoreStmt() const
|
|
486
486
|
{
|
|
487
487
|
return inst;
|
|
488
488
|
}
|
|
@@ -1,20 +1,48 @@
|
|
|
1
1
|
#ifndef SVF_FE_BASIC_TYPES_H
|
|
2
2
|
#define SVF_FE_BASIC_TYPES_H
|
|
3
3
|
|
|
4
|
+
#include "SVF-FE/GEPTypeBridgeIterator.h"
|
|
5
|
+
|
|
6
|
+
#include <llvm/Pass.h>
|
|
7
|
+
|
|
4
8
|
#include <llvm/IR/Instructions.h>
|
|
5
9
|
#include <llvm/IR/IntrinsicInst.h>
|
|
10
|
+
#include <llvm/IR/LLVMContext.h>
|
|
6
11
|
#include <llvm/IR/Metadata.h>
|
|
7
12
|
#include <llvm/IR/DataLayout.h>
|
|
13
|
+
#include <llvm/IR/IRBuilder.h>
|
|
14
|
+
#include <llvm/IR/DebugInfo.h>
|
|
15
|
+
#include <llvm/IR/InstIterator.h>
|
|
16
|
+
#include <llvm/IR/GetElementPtrTypeIterator.h>
|
|
17
|
+
#include <llvm/IR/DerivedTypes.h>
|
|
8
18
|
|
|
9
19
|
#include <llvm/Analysis/MemoryLocation.h>
|
|
20
|
+
#include <llvm/Analysis/ScalarEvolution.h>
|
|
21
|
+
#include <llvm/Analysis/ScalarEvolutionExpressions.h>
|
|
22
|
+
|
|
23
|
+
#include <llvm/Transforms/Utils/UnifyFunctionExitNodes.h>
|
|
10
24
|
|
|
11
25
|
#include <llvm/Support/SourceMgr.h>
|
|
12
26
|
|
|
27
|
+
typedef llvm::LLVMContext LLVMContext;
|
|
28
|
+
typedef llvm::Use Use;
|
|
29
|
+
typedef llvm::ModulePass ModulePass;
|
|
30
|
+
typedef llvm::IRBuilder<> IRBuilder;
|
|
31
|
+
#if LLVM_VERSION_MAJOR >= 12
|
|
32
|
+
typedef llvm::UnifyFunctionExitNodesLegacyPass UnifyFunctionExitNodes;
|
|
33
|
+
#else
|
|
34
|
+
typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes;
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
|
|
13
38
|
typedef llvm::SMDiagnostic SMDiagnostic;
|
|
14
39
|
|
|
15
|
-
typedef llvm::MetadataAsValue MetadataAsValue;
|
|
16
40
|
typedef llvm::BlockAddress BlockAddress;
|
|
17
41
|
|
|
42
|
+
// LLVM Metadata
|
|
43
|
+
typedef llvm::MDString MDString;
|
|
44
|
+
typedef llvm::MetadataAsValue MetadataAsValue;
|
|
45
|
+
|
|
18
46
|
// LLVM data layout
|
|
19
47
|
typedef llvm::StructLayout StructLayout;
|
|
20
48
|
typedef llvm::ConstantStruct ConstantStruct;
|
|
@@ -25,6 +53,7 @@ typedef llvm::ConstantAggregate ConstantAggregate;
|
|
|
25
53
|
typedef llvm::ConstantAggregateZero ConstantAggregateZero;
|
|
26
54
|
typedef llvm::ConstantDataSequential ConstantDataSequential;
|
|
27
55
|
typedef llvm::ConstantExpr ConstantExpr;
|
|
56
|
+
typedef llvm::ConstantDataArray ConstantDataArray;
|
|
28
57
|
|
|
29
58
|
// LLVM Instructions
|
|
30
59
|
typedef llvm::AllocaInst AllocaInst;
|
|
@@ -60,4 +89,34 @@ typedef llvm::BinaryOperator BinaryOperator;
|
|
|
60
89
|
typedef llvm::UnaryOperator UnaryOperator;
|
|
61
90
|
typedef llvm::UndefValue UndefValue;
|
|
62
91
|
|
|
92
|
+
// LLVM Debug Information
|
|
93
|
+
typedef llvm::DebugInfoFinder DebugInfoFinder;
|
|
94
|
+
typedef llvm::DISubroutineType DISubroutineType;
|
|
95
|
+
typedef llvm::DIBasicType DIBasicType;
|
|
96
|
+
typedef llvm::DISubrange DISubrange;
|
|
97
|
+
typedef llvm::DINode DINode;
|
|
98
|
+
typedef llvm::DINodeArray DINodeArray;
|
|
99
|
+
typedef llvm::DITypeRefArray DITypeRefArray;
|
|
100
|
+
|
|
101
|
+
// Iterators.
|
|
102
|
+
typedef llvm::inst_iterator inst_iterator;
|
|
103
|
+
typedef llvm::gep_type_iterator gep_type_iterator;
|
|
104
|
+
typedef llvm::bridge_gep_iterator bridge_gep_iterator;
|
|
105
|
+
typedef llvm::const_inst_iterator const_inst_iterator;
|
|
106
|
+
typedef llvm::const_pred_iterator const_pred_iterator;
|
|
107
|
+
|
|
108
|
+
// LLVM Scalar Evolution.
|
|
109
|
+
typedef llvm::ScalarEvolutionWrapperPass ScalarEvolutionWrapperPass;
|
|
110
|
+
typedef llvm::SCEVAddRecExpr SCEVAddRecExpr;
|
|
111
|
+
typedef llvm::SCEVConstant SCEVConstant;
|
|
112
|
+
typedef llvm::ScalarEvolution ScalarEvolution;
|
|
113
|
+
typedef llvm::SCEV SCEV;
|
|
114
|
+
|
|
115
|
+
// LLVM Types.
|
|
116
|
+
typedef llvm::VectorType VectorType;
|
|
117
|
+
#if (LLVM_VERSION_MAJOR >= 9)
|
|
118
|
+
typedef llvm::FunctionCallee FunctionCallee;
|
|
119
|
+
#endif
|
|
120
|
+
|
|
121
|
+
|
|
63
122
|
#endif // SVF_FE_BASIC_TYPES_H
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
#define BASICTYPES_H_
|
|
32
32
|
|
|
33
33
|
#include "Util/SVFBasicTypes.h"
|
|
34
|
-
#include "SVF-FE/GEPTypeBridgeIterator.h"
|
|
35
34
|
#include "Graphs/GraphPrinter.h"
|
|
36
35
|
#include "Util/Casting.h"
|
|
37
36
|
#include <llvm/ADT/SparseBitVector.h>
|
|
@@ -39,7 +38,6 @@
|
|
|
39
38
|
#include <llvm/IR/InstVisitor.h> // for instruction visitor
|
|
40
39
|
#include <llvm/IR/InstIterator.h> // for inst iteration
|
|
41
40
|
#include <llvm/IR/GetElementPtrTypeIterator.h> //for gep iterator
|
|
42
|
-
#include <llvm/Analysis/ScalarEvolution.h>
|
|
43
41
|
#include <llvm/ADT/StringExtras.h> // for utostr_32
|
|
44
42
|
#include <llvm/Analysis/AliasAnalysis.h>
|
|
45
43
|
#include <llvm/Analysis/CallGraph.h> // call graph
|
|
@@ -48,15 +46,10 @@
|
|
|
48
46
|
#include <llvm/Bitcode/BitcodeWriter.h> // for WriteBitcodeToFile
|
|
49
47
|
#include <llvm/Bitcode/BitcodeReader.h> /// for isBitcode
|
|
50
48
|
#include <llvm/IRReader/IRReader.h> // IR reader for bit file
|
|
51
|
-
#include <llvm/Transforms/Utils/UnifyFunctionExitNodes.h>
|
|
52
49
|
#include <llvm/Analysis/DominanceFrontier.h>
|
|
53
50
|
#include <llvm/Analysis/PostDominators.h>
|
|
54
|
-
#include <llvm/Analysis/ScalarEvolutionExpressions.h>
|
|
55
51
|
#include <llvm/ADT/GraphTraits.h> // for Graphtraits
|
|
56
|
-
#include <llvm/Support/GraphWriter.h> // for graph write
|
|
57
|
-
#include <llvm/IR/IRBuilder.h> // for instrument svf.main
|
|
58
52
|
#include <llvm/Transforms/Utils/Local.h> // for FindDbgAddrUses
|
|
59
|
-
#include <llvm/IR/DebugInfo.h>
|
|
60
53
|
|
|
61
54
|
#include "llvm/Analysis/LoopInfo.h"
|
|
62
55
|
#include "llvm/IR/CFG.h"
|
|
@@ -68,7 +61,6 @@ class BddCond;
|
|
|
68
61
|
|
|
69
62
|
|
|
70
63
|
/// LLVM Basic classes
|
|
71
|
-
typedef llvm::LLVMContext LLVMContext;
|
|
72
64
|
typedef llvm::Type Type;
|
|
73
65
|
typedef llvm::Function Function;
|
|
74
66
|
typedef llvm::BasicBlock BasicBlock;
|
|
@@ -80,28 +72,19 @@ typedef llvm::GlobalValue GlobalValue;
|
|
|
80
72
|
typedef llvm::GlobalVariable GlobalVariable;
|
|
81
73
|
typedef llvm::Module Module;
|
|
82
74
|
typedef llvm::User User;
|
|
83
|
-
typedef llvm::Use Use;
|
|
84
75
|
typedef llvm::Loop Loop;
|
|
85
76
|
typedef llvm::LoopInfo LoopInfo;
|
|
86
|
-
#if LLVM_VERSION_MAJOR >= 12
|
|
87
|
-
typedef llvm::UnifyFunctionExitNodesLegacyPass UnifyFunctionExitNodes;
|
|
88
|
-
#else
|
|
89
|
-
typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes;
|
|
90
|
-
#endif
|
|
91
|
-
typedef llvm::ModulePass ModulePass;
|
|
92
77
|
|
|
93
78
|
/// LLVM outputs
|
|
94
79
|
typedef llvm::raw_string_ostream raw_string_ostream;
|
|
95
80
|
typedef llvm::raw_fd_ostream raw_fd_ostream;
|
|
96
81
|
typedef llvm::StringRef StringRef;
|
|
97
|
-
typedef llvm::ToolOutputFile ToolOutputFile;
|
|
98
82
|
|
|
99
83
|
/// LLVM types
|
|
100
84
|
typedef llvm::StructType StructType;
|
|
101
85
|
typedef llvm::ArrayType ArrayType;
|
|
102
86
|
typedef llvm::PointerType PointerType;
|
|
103
87
|
typedef llvm::FunctionType FunctionType;
|
|
104
|
-
typedef llvm::VectorType VectorType;
|
|
105
88
|
|
|
106
89
|
/// LLVM data layout
|
|
107
90
|
typedef llvm::DataLayout DataLayout;
|
|
@@ -114,66 +97,37 @@ typedef llvm::ConstantInt ConstantInt;
|
|
|
114
97
|
typedef llvm::ConstantPointerNull ConstantPointerNull;
|
|
115
98
|
typedef llvm::ConstantArray ConstantArray;
|
|
116
99
|
typedef llvm::GlobalAlias GlobalAlias;
|
|
117
|
-
typedef llvm::ConstantDataArray ConstantDataArray;
|
|
118
100
|
|
|
119
101
|
/// LLVM metadata
|
|
120
102
|
typedef llvm::NamedMDNode NamedMDNode;
|
|
121
|
-
typedef llvm::MDString MDString;
|
|
122
103
|
typedef llvm::MDNode MDNode;
|
|
123
104
|
|
|
124
|
-
|
|
125
105
|
/// LLVM Instructions
|
|
126
106
|
typedef llvm::CallInst CallInst;
|
|
127
107
|
typedef llvm::StoreInst StoreInst;
|
|
128
108
|
typedef llvm::LoadInst LoadInst;
|
|
129
109
|
|
|
130
|
-
#if (LLVM_VERSION_MAJOR >= 9)
|
|
131
|
-
typedef llvm::FunctionCallee FunctionCallee;
|
|
132
|
-
#endif
|
|
133
|
-
|
|
134
|
-
/// LLVM scalar evolution
|
|
135
|
-
typedef llvm::ScalarEvolutionWrapperPass ScalarEvolutionWrapperPass;
|
|
136
|
-
typedef llvm::ScalarEvolution ScalarEvolution;
|
|
137
|
-
typedef llvm::SCEVAddRecExpr SCEVAddRecExpr;
|
|
138
|
-
typedef llvm::SCEVConstant SCEVConstant;
|
|
139
|
-
typedef llvm::SCEV SCEV;
|
|
140
|
-
|
|
141
110
|
/// LLVM Dominators
|
|
142
111
|
typedef llvm::DominanceFrontier DominanceFrontier;
|
|
143
112
|
typedef llvm::DominatorTree DominatorTree;
|
|
144
113
|
typedef llvm::PostDominatorTree PostDominatorTree;
|
|
145
114
|
typedef llvm::DomTreeNode DomTreeNode;
|
|
146
115
|
typedef llvm::DominanceFrontierBase<BasicBlock, false> DominanceFrontierBase;
|
|
147
|
-
typedef llvm::PostDominatorTreeWrapperPass PostDominatorTreeWrapperPass;
|
|
148
|
-
typedef llvm::LoopInfoWrapperPass LoopInfoWrapperPass;
|
|
149
116
|
|
|
150
117
|
/// LLVM Iterators
|
|
151
|
-
typedef llvm::inst_iterator inst_iterator;
|
|
152
118
|
#if LLVM_VERSION_MAJOR >= 11
|
|
153
119
|
typedef llvm::const_succ_iterator succ_const_iterator;
|
|
154
120
|
#else
|
|
155
121
|
typedef llvm::succ_const_iterator succ_const_iterator;
|
|
156
122
|
#endif
|
|
157
|
-
typedef llvm::const_inst_iterator const_inst_iterator;
|
|
158
|
-
typedef llvm::const_pred_iterator const_pred_iterator;
|
|
159
|
-
typedef llvm::gep_type_iterator gep_type_iterator;
|
|
160
|
-
typedef llvm::bridge_gep_iterator bridge_gep_iterator;
|
|
161
123
|
typedef llvm::GraphPrinter GraphPrinter;
|
|
162
|
-
typedef llvm::IRBuilder<> IRBuilder;
|
|
163
124
|
typedef llvm::IntegerType IntegerType;
|
|
164
125
|
|
|
165
126
|
/// LLVM debug information
|
|
166
|
-
typedef llvm::DebugInfoFinder DebugInfoFinder;
|
|
167
127
|
typedef llvm::DIType DIType;
|
|
168
|
-
typedef llvm::DIBasicType DIBasicType;
|
|
169
128
|
typedef llvm::DICompositeType DICompositeType;
|
|
170
129
|
typedef llvm::DIDerivedType DIDerivedType;
|
|
171
|
-
typedef llvm::DISubroutineType DISubroutineType;
|
|
172
130
|
typedef llvm::DISubprogram DISubprogram;
|
|
173
|
-
typedef llvm::DISubrange DISubrange;
|
|
174
|
-
typedef llvm::DINode DINode;
|
|
175
|
-
typedef llvm::DINodeArray DINodeArray;
|
|
176
|
-
typedef llvm::DITypeRefArray DITypeRefArray;
|
|
177
131
|
namespace dwarf = llvm::dwarf;
|
|
178
132
|
|
|
179
133
|
class SVFFunction : public SVFValue
|
|
@@ -93,8 +93,7 @@ public:
|
|
|
93
93
|
private:
|
|
94
94
|
|
|
95
95
|
//Each Function name is mapped to its extf_t
|
|
96
|
-
|
|
97
|
-
llvm::StringMap<extf_t> info;
|
|
96
|
+
Map<std::string, extf_t> info;
|
|
98
97
|
//A cache of is_ext results for all SVFFunction*'s (hash_map is fastest).
|
|
99
98
|
Map<const SVFFunction*, bool> isext_cache;
|
|
100
99
|
|
|
@@ -141,7 +140,7 @@ public:
|
|
|
141
140
|
unsigned end = funName.substr(start + 1).find('.');
|
|
142
141
|
funName = "llvm." + funName.substr(start + 1, end);
|
|
143
142
|
}
|
|
144
|
-
|
|
143
|
+
Map<std::string, extf_t>::const_iterator it= info.find(funName);
|
|
145
144
|
if(it == info.end())
|
|
146
145
|
return EFT_OTHER;
|
|
147
146
|
else
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
|
|
38
38
|
#include <llvm/ADT/SparseBitVector.h> // for points-to
|
|
39
39
|
#include <llvm/Support/CommandLine.h> // for command line options
|
|
40
|
-
#include <llvm/ADT/StringMap.h> // for StringMap
|
|
41
40
|
|
|
42
41
|
#include <iostream>
|
|
43
42
|
#include <vector>
|
|
@@ -129,7 +128,6 @@ template<typename Key, typename Value, typename Hash = Hash<Key>,
|
|
|
129
128
|
typedef std::deque<NodeID> NodeDeque;
|
|
130
129
|
typedef NodeSet EdgeSet;
|
|
131
130
|
typedef std::vector<u32_t> CallStrCxt;
|
|
132
|
-
typedef llvm::StringMap<u32_t> StringMap;
|
|
133
131
|
|
|
134
132
|
typedef unsigned Version;
|
|
135
133
|
typedef Set<Version> VersionSet;
|
|
@@ -67,7 +67,7 @@ public:
|
|
|
67
67
|
HARE_PAR_FOR
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
typedef
|
|
70
|
+
typedef Map<std::string, TD_TYPE> TDAPIMap;
|
|
71
71
|
|
|
72
72
|
private:
|
|
73
73
|
/// API map, from a string to threadAPI type
|
|
@@ -333,7 +333,7 @@ public:
|
|
|
333
333
|
//@}
|
|
334
334
|
|
|
335
335
|
void performAPIStat(SVFModule* m);
|
|
336
|
-
void statInit(
|
|
336
|
+
void statInit(Map<std::string, u32_t>& tdAPIStatMap);
|
|
337
337
|
};
|
|
338
338
|
|
|
339
339
|
} // End namespace SVF
|
|
Binary file
|
|
Binary file
|
|
@@ -173,11 +173,6 @@ public:
|
|
|
173
173
|
return getSVFGNode(getDef(pagNode));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
/// Return the corresponding SVFGNodes to a given llvm::Value.
|
|
177
|
-
/// return an empty list, if the no mapping is possible
|
|
178
|
-
std::set<const SVFGNode*> fromValue(const llvm::Value* value) const;
|
|
179
|
-
|
|
180
|
-
|
|
181
176
|
/// Perform statistics
|
|
182
177
|
void performStat();
|
|
183
178
|
|
|
@@ -183,7 +183,7 @@ public:
|
|
|
183
183
|
//@}
|
|
184
184
|
|
|
185
185
|
/// Return load instruction
|
|
186
|
-
inline const LoadStmt*
|
|
186
|
+
inline const LoadStmt* getLoadStmt() const
|
|
187
187
|
{
|
|
188
188
|
return inst;
|
|
189
189
|
}
|
|
@@ -482,7 +482,7 @@ public:
|
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
/// Get store instruction
|
|
485
|
-
inline const StoreStmt*
|
|
485
|
+
inline const StoreStmt* getStoreStmt() const
|
|
486
486
|
{
|
|
487
487
|
return inst;
|
|
488
488
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#include <llvm/IR/Instructions.h>
|
|
5
5
|
#include <llvm/IR/IntrinsicInst.h>
|
|
6
|
+
#include <llvm/IR/LLVMContext.h>
|
|
6
7
|
#include <llvm/IR/Metadata.h>
|
|
7
8
|
#include <llvm/IR/DataLayout.h>
|
|
8
9
|
|
|
@@ -10,6 +11,9 @@
|
|
|
10
11
|
|
|
11
12
|
#include <llvm/Support/SourceMgr.h>
|
|
12
13
|
|
|
14
|
+
typedef llvm::LLVMContext LLVMContext;
|
|
15
|
+
typedef llvm::Use Use;
|
|
16
|
+
|
|
13
17
|
typedef llvm::SMDiagnostic SMDiagnostic;
|
|
14
18
|
|
|
15
19
|
typedef llvm::MetadataAsValue MetadataAsValue;
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
#include <llvm/Analysis/PostDominators.h>
|
|
54
54
|
#include <llvm/Analysis/ScalarEvolutionExpressions.h>
|
|
55
55
|
#include <llvm/ADT/GraphTraits.h> // for Graphtraits
|
|
56
|
-
#include <llvm/Support/GraphWriter.h> // for graph write
|
|
57
56
|
#include <llvm/IR/IRBuilder.h> // for instrument svf.main
|
|
58
57
|
#include <llvm/Transforms/Utils/Local.h> // for FindDbgAddrUses
|
|
59
58
|
#include <llvm/IR/DebugInfo.h>
|
|
@@ -68,7 +67,6 @@ class BddCond;
|
|
|
68
67
|
|
|
69
68
|
|
|
70
69
|
/// LLVM Basic classes
|
|
71
|
-
typedef llvm::LLVMContext LLVMContext;
|
|
72
70
|
typedef llvm::Type Type;
|
|
73
71
|
typedef llvm::Function Function;
|
|
74
72
|
typedef llvm::BasicBlock BasicBlock;
|
|
@@ -80,7 +78,6 @@ typedef llvm::GlobalValue GlobalValue;
|
|
|
80
78
|
typedef llvm::GlobalVariable GlobalVariable;
|
|
81
79
|
typedef llvm::Module Module;
|
|
82
80
|
typedef llvm::User User;
|
|
83
|
-
typedef llvm::Use Use;
|
|
84
81
|
typedef llvm::Loop Loop;
|
|
85
82
|
typedef llvm::LoopInfo LoopInfo;
|
|
86
83
|
#if LLVM_VERSION_MAJOR >= 12
|
|
@@ -94,7 +91,6 @@ typedef llvm::ModulePass ModulePass;
|
|
|
94
91
|
typedef llvm::raw_string_ostream raw_string_ostream;
|
|
95
92
|
typedef llvm::raw_fd_ostream raw_fd_ostream;
|
|
96
93
|
typedef llvm::StringRef StringRef;
|
|
97
|
-
typedef llvm::ToolOutputFile ToolOutputFile;
|
|
98
94
|
|
|
99
95
|
/// LLVM types
|
|
100
96
|
typedef llvm::StructType StructType;
|
|
@@ -93,8 +93,7 @@ public:
|
|
|
93
93
|
private:
|
|
94
94
|
|
|
95
95
|
//Each Function name is mapped to its extf_t
|
|
96
|
-
|
|
97
|
-
llvm::StringMap<extf_t> info;
|
|
96
|
+
Map<std::string, extf_t> info;
|
|
98
97
|
//A cache of is_ext results for all SVFFunction*'s (hash_map is fastest).
|
|
99
98
|
Map<const SVFFunction*, bool> isext_cache;
|
|
100
99
|
|
|
@@ -141,7 +140,7 @@ public:
|
|
|
141
140
|
unsigned end = funName.substr(start + 1).find('.');
|
|
142
141
|
funName = "llvm." + funName.substr(start + 1, end);
|
|
143
142
|
}
|
|
144
|
-
|
|
143
|
+
Map<std::string, extf_t>::const_iterator it= info.find(funName);
|
|
145
144
|
if(it == info.end())
|
|
146
145
|
return EFT_OTHER;
|
|
147
146
|
else
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
|
|
38
38
|
#include <llvm/ADT/SparseBitVector.h> // for points-to
|
|
39
39
|
#include <llvm/Support/CommandLine.h> // for command line options
|
|
40
|
-
#include <llvm/ADT/StringMap.h> // for StringMap
|
|
41
40
|
|
|
42
41
|
#include <iostream>
|
|
43
42
|
#include <vector>
|
|
@@ -129,7 +128,6 @@ template<typename Key, typename Value, typename Hash = Hash<Key>,
|
|
|
129
128
|
typedef std::deque<NodeID> NodeDeque;
|
|
130
129
|
typedef NodeSet EdgeSet;
|
|
131
130
|
typedef std::vector<u32_t> CallStrCxt;
|
|
132
|
-
typedef llvm::StringMap<u32_t> StringMap;
|
|
133
131
|
|
|
134
132
|
typedef unsigned Version;
|
|
135
133
|
typedef Set<Version> VersionSet;
|
|
@@ -67,7 +67,7 @@ public:
|
|
|
67
67
|
HARE_PAR_FOR
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
typedef
|
|
70
|
+
typedef Map<std::string, TD_TYPE> TDAPIMap;
|
|
71
71
|
|
|
72
72
|
private:
|
|
73
73
|
/// API map, from a string to threadAPI type
|
|
@@ -333,7 +333,7 @@ public:
|
|
|
333
333
|
//@}
|
|
334
334
|
|
|
335
335
|
void performAPIStat(SVFModule* m);
|
|
336
|
-
void statInit(
|
|
336
|
+
void statInit(Map<std::string, u32_t>& tdAPIStatMap);
|
|
337
337
|
};
|
|
338
338
|
|
|
339
339
|
} // End namespace SVF
|