svf-lib 1.0.1301 → 1.0.1302

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.
Files changed (45) hide show
  1. package/package.json +1 -1
  2. package/SVF-linux/include/SVF-FE/BasicTypes.h +0 -219
  3. package/SVF-linux/include/SVF-FE/BreakConstantExpr.h +0 -94
  4. package/SVF-linux/include/SVF-FE/CHG.h +0 -334
  5. package/SVF-linux/include/SVF-FE/CHGBuilder.h +0 -73
  6. package/SVF-linux/include/SVF-FE/CPPUtil.h +0 -130
  7. package/SVF-linux/include/SVF-FE/CallGraphBuilder.h +0 -74
  8. package/SVF-linux/include/SVF-FE/CommonCHG.h +0 -49
  9. package/SVF-linux/include/SVF-FE/DCHG.h +0 -470
  10. package/SVF-linux/include/SVF-FE/DataFlowUtil.h +0 -190
  11. package/SVF-linux/include/SVF-FE/GEPTypeBridgeIterator.h +0 -183
  12. package/SVF-linux/include/SVF-FE/Graph2Json.h +0 -30
  13. package/SVF-linux/include/SVF-FE/ICFGBuilder.h +0 -106
  14. package/SVF-linux/include/SVF-FE/IRAnnotator.h +0 -323
  15. package/SVF-linux/include/SVF-FE/LLVMLoopAnalysis.h +0 -59
  16. package/SVF-linux/include/SVF-FE/LLVMModule.h +0 -319
  17. package/SVF-linux/include/SVF-FE/LLVMUtil.h +0 -303
  18. package/SVF-linux/include/SVF-FE/LocMemModel.h +0 -35
  19. package/SVF-linux/include/SVF-FE/MemModelBuilder.h +0 -102
  20. package/SVF-linux/include/SVF-FE/PAGBuilder.h +0 -390
  21. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +0 -412
  22. package/SVF-linux/include/SVF-FE/SymbolTableBuilder.h +0 -99
  23. package/SVF-linux/include/SVF-FE/SymbolTableInfo.h +0 -439
  24. package/SVF-osx/include/SVF-FE/BasicTypes.h +0 -219
  25. package/SVF-osx/include/SVF-FE/BreakConstantExpr.h +0 -94
  26. package/SVF-osx/include/SVF-FE/CHG.h +0 -334
  27. package/SVF-osx/include/SVF-FE/CHGBuilder.h +0 -73
  28. package/SVF-osx/include/SVF-FE/CPPUtil.h +0 -130
  29. package/SVF-osx/include/SVF-FE/CallGraphBuilder.h +0 -74
  30. package/SVF-osx/include/SVF-FE/CommonCHG.h +0 -49
  31. package/SVF-osx/include/SVF-FE/DCHG.h +0 -470
  32. package/SVF-osx/include/SVF-FE/DataFlowUtil.h +0 -190
  33. package/SVF-osx/include/SVF-FE/GEPTypeBridgeIterator.h +0 -183
  34. package/SVF-osx/include/SVF-FE/Graph2Json.h +0 -30
  35. package/SVF-osx/include/SVF-FE/ICFGBuilder.h +0 -106
  36. package/SVF-osx/include/SVF-FE/IRAnnotator.h +0 -323
  37. package/SVF-osx/include/SVF-FE/LLVMLoopAnalysis.h +0 -59
  38. package/SVF-osx/include/SVF-FE/LLVMModule.h +0 -319
  39. package/SVF-osx/include/SVF-FE/LLVMUtil.h +0 -303
  40. package/SVF-osx/include/SVF-FE/LocMemModel.h +0 -35
  41. package/SVF-osx/include/SVF-FE/MemModelBuilder.h +0 -102
  42. package/SVF-osx/include/SVF-FE/PAGBuilder.h +0 -390
  43. package/SVF-osx/include/SVF-FE/SVFIRBuilder.h +0 -412
  44. package/SVF-osx/include/SVF-FE/SymbolTableBuilder.h +0 -99
  45. package/SVF-osx/include/SVF-FE/SymbolTableInfo.h +0 -439
@@ -1,439 +0,0 @@
1
- //===- SymbolTableInfo.h -- Symbol information from IR------------------------//
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 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 General Public License for more details.
17
-
18
- // You should have received a copy of the GNU General Public License
19
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- //
21
- //===----------------------------------------------------------------------===//
22
-
23
- /*
24
- * SymbolTableInfo.h
25
- *
26
- * Created on: Nov 11, 2013
27
- * Author: Yulei Sui
28
- */
29
-
30
- #ifndef INCLUDE_SVF_FE_SYMBOLTABLEINFO_H_
31
- #define INCLUDE_SVF_FE_SYMBOLTABLEINFO_H_
32
-
33
- #include "MemoryModel/MemModel.h"
34
- #include "SVF-FE/LLVMModule.h"
35
-
36
- namespace SVF
37
- {
38
-
39
- /*!
40
- * Symbol table of the memory model for analysis
41
- */
42
- class SymbolTableInfo
43
- {
44
-
45
- friend class MemModelBuilder;
46
-
47
- public:
48
- /// various maps defined
49
- //{@
50
- /// llvm value to sym id map
51
- /// local (%) and global (@) identifiers are pointer types which have a value node id.
52
- typedef OrderedMap<const Value *, SymID> ValueToIDMapTy;
53
- /// sym id to memory object map
54
- typedef OrderedMap<SymID,MemObj*> IDToMemMapTy;
55
- /// function to sym id map
56
- typedef OrderedMap<const Function *, SymID> FunToIDMapTy;
57
- /// sym id to sym type map
58
- typedef OrderedMap<SymID,SYMTYPE> IDToSymTyMapTy;
59
- /// struct type to struct info map
60
- typedef OrderedMap<const Type*, StInfo*> TypeToFieldInfoMap;
61
- typedef Set<CallSite> CallSiteSet;
62
- typedef OrderedMap<const Instruction*,CallSiteID> CallSiteToIDMapTy;
63
- typedef OrderedMap<CallSiteID,const Instruction*> IDToCallSiteMapTy;
64
-
65
- //@}
66
-
67
- private:
68
- /// Data layout on a target machine
69
- static DataLayout *dl;
70
-
71
- ValueToIDMapTy valSymMap; ///< map a value to its sym id
72
- ValueToIDMapTy objSymMap; ///< map a obj reference to its sym id
73
- IDToMemMapTy objMap; ///< map a memory sym id to its obj
74
- IDToSymTyMapTy symTyMap; /// < map a sym id to its type
75
- FunToIDMapTy returnSymMap; ///< return map
76
- FunToIDMapTy varargSymMap; ///< vararg map
77
-
78
- CallSiteSet callSiteSet;
79
-
80
- // Singleton pattern here to enable instance of SymbolTableInfo can only be created once.
81
- static SymbolTableInfo* symInfo;
82
-
83
- /// Module
84
- SVFModule* mod;
85
-
86
- /// Max field limit
87
- static u32_t maxFieldLimit;
88
-
89
- /// Clean up memory
90
- void destroy();
91
-
92
- /// Whether to model constants
93
- bool modelConstants;
94
-
95
- /// total number of symbols
96
- SymID totalSymNum;
97
-
98
- protected:
99
- /// Constructor
100
- SymbolTableInfo(void) :
101
- mod(nullptr), modelConstants(false), totalSymNum(0), maxStruct(nullptr), maxStSize(0)
102
- {
103
- }
104
-
105
- public:
106
-
107
- /// Singleton design here to make sure we only have one instance during any analysis
108
- //@{
109
- static SymbolTableInfo* SymbolInfo();
110
-
111
- static void releaseSymbolInfo()
112
- {
113
- delete symInfo;
114
- symInfo = nullptr;
115
- }
116
- virtual ~SymbolTableInfo()
117
- {
118
- destroy();
119
- }
120
- //@}
121
-
122
- /// Set / Get modelConstants
123
- //@{
124
- void setModelConstants(bool _modelConstants)
125
- {
126
- modelConstants = _modelConstants;
127
- }
128
- bool getModelConstants() const
129
- {
130
- return modelConstants;
131
- }
132
- //@}
133
-
134
- /// Get callsite set
135
- //@{
136
- inline const CallSiteSet& getCallSiteSet() const
137
- {
138
- return callSiteSet;
139
- }
140
- //@}
141
-
142
- /// Module
143
- inline SVFModule* getModule()
144
- {
145
- return mod;
146
- }
147
- /// Module
148
- inline void setModule(SVFModule* m)
149
- {
150
- mod = m;
151
- }
152
-
153
- /// Get target machine data layout
154
- inline static DataLayout* getDataLayout(Module* mod)
155
- {
156
- if(dl==nullptr)
157
- return dl = new DataLayout(mod);
158
- return dl;
159
- }
160
-
161
- /// Helper method to get the size of the type from target data layout
162
- //@{
163
- u32_t getTypeSizeInBytes(const Type* type);
164
- u32_t getTypeSizeInBytes(const StructType *sty, u32_t field_index);
165
- //@}
166
-
167
- /// special value
168
- // @{
169
- static bool isNullPtrSym(const Value *val);
170
-
171
- static bool isBlackholeSym(const Value *val);
172
-
173
- bool isConstantObjSym(const Value *val);
174
-
175
- static inline bool isBlkPtr(NodeID id)
176
- {
177
- return (id == BlkPtr);
178
- }
179
- static inline bool isNullPtr(NodeID id)
180
- {
181
- return (id == NullPtr);
182
- }
183
- static inline bool isBlkObj(NodeID id)
184
- {
185
- return (id == BlackHole);
186
- }
187
- static inline bool isConstantObj(NodeID id)
188
- {
189
- return (id == ConstantObj);
190
- }
191
- static inline bool isBlkObjOrConstantObj(NodeID id)
192
- {
193
- return (isBlkObj(id) || isConstantObj(id));
194
- }
195
-
196
- inline void createBlkOrConstantObj(SymID symId)
197
- {
198
- assert(isBlkObjOrConstantObj(symId));
199
- assert(objMap.find(symId)==objMap.end());
200
- objMap[symId] = new MemObj(symId, createObjTypeInfo());;
201
- }
202
-
203
- inline MemObj* getBlkObj() const
204
- {
205
- return getObj(blackholeSymID());
206
- }
207
- inline MemObj* getConstantObj() const
208
- {
209
- return getObj(constantSymID());
210
- }
211
-
212
- inline SymID blkPtrSymID() const
213
- {
214
- return BlkPtr;
215
- }
216
-
217
- inline SymID nullPtrSymID() const
218
- {
219
- return NullPtr;
220
- }
221
-
222
- inline SymID constantSymID() const
223
- {
224
- return ConstantObj;
225
- }
226
-
227
- inline SymID blackholeSymID() const
228
- {
229
- return BlackHole;
230
- }
231
-
232
- /// Can only be invoked by PAG::addDummyNode() when creaing PAG from file.
233
- inline const MemObj* createDummyObj(SymID symId, const Type* type)
234
- {
235
- assert(objMap.find(symId)==objMap.end() && "this dummy obj has been created before");
236
- MemObj* memObj = new MemObj(symId, createObjTypeInfo(type));
237
- objMap[symId] = memObj;
238
- return memObj;
239
- }
240
- // @}
241
-
242
- /// Get different kinds of syms
243
- //@{
244
- SymID getValSym(const Value *val)
245
- {
246
-
247
- if(isNullPtrSym(val))
248
- return nullPtrSymID();
249
- else if(isBlackholeSym(val))
250
- return blkPtrSymID();
251
- else
252
- {
253
- ValueToIDMapTy::const_iterator iter = valSymMap.find(val);
254
- assert(iter!=valSymMap.end() &&"value sym not found");
255
- return iter->second;
256
- }
257
- }
258
-
259
- inline bool hasValSym(const Value* val)
260
- {
261
- if (isNullPtrSym(val) || isBlackholeSym(val))
262
- return true;
263
- else
264
- return (valSymMap.find(val) != valSymMap.end());
265
- }
266
-
267
- /// find the unique defined global across multiple modules
268
- inline const Value* getGlobalRep(const Value* val) const
269
- {
270
- if(const GlobalVariable* gvar = SVFUtil::dyn_cast<GlobalVariable>(val))
271
- {
272
- if (LLVMModuleSet::getLLVMModuleSet()->hasGlobalRep(gvar))
273
- val = LLVMModuleSet::getLLVMModuleSet()->getGlobalRep(gvar);
274
- }
275
- return val;
276
- }
277
-
278
- inline SymID getObjSym(const Value *val) const
279
- {
280
- ValueToIDMapTy::const_iterator iter = objSymMap.find(getGlobalRep(val));
281
- assert(iter!=objSymMap.end() && "obj sym not found");
282
- return iter->second;
283
- }
284
-
285
- inline MemObj* getObj(SymID id) const
286
- {
287
- IDToMemMapTy::const_iterator iter = objMap.find(id);
288
- assert(iter!=objMap.end() && "obj not found");
289
- return iter->second;
290
- }
291
-
292
- inline SymID getRetSym(const Function *val) const
293
- {
294
- FunToIDMapTy::const_iterator iter = returnSymMap.find(val);
295
- assert(iter!=returnSymMap.end() && "ret sym not found");
296
- return iter->second;
297
- }
298
-
299
- inline SymID getVarargSym(const Function *val) const
300
- {
301
- FunToIDMapTy::const_iterator iter = varargSymMap.find(val);
302
- assert(iter!=varargSymMap.end() && "vararg sym not found");
303
- return iter->second;
304
- }
305
- //@}
306
-
307
- /// Statistics
308
- //@{
309
- inline Size_t getTotalSymNum() const
310
- {
311
- return totalSymNum;
312
- }
313
- inline u32_t getMaxStructSize() const
314
- {
315
- return maxStSize;
316
- }
317
- //@}
318
-
319
- /// Get different kinds of syms maps
320
- //@{
321
- inline ValueToIDMapTy& valSyms()
322
- {
323
- return valSymMap;
324
- }
325
-
326
- inline ValueToIDMapTy& objSyms()
327
- {
328
- return objSymMap;
329
- }
330
-
331
- inline IDToMemMapTy& idToObjMap()
332
- {
333
- return objMap;
334
- }
335
-
336
- inline FunToIDMapTy& retSyms()
337
- {
338
- return returnSymMap;
339
- }
340
-
341
- inline FunToIDMapTy& varargSyms()
342
- {
343
- return varargSymMap;
344
- }
345
-
346
- //@}
347
-
348
- /// Get struct info
349
- //@{
350
- ///Get an iterator for StructInfo, designed as internal methods
351
- TypeToFieldInfoMap::iterator getStructInfoIter(const Type *T)
352
- {
353
- assert(T);
354
- TypeToFieldInfoMap::iterator it = typeToFieldInfo.find(T);
355
- if (it != typeToFieldInfo.end())
356
- return it;
357
- else
358
- {
359
- collectTypeInfo(T);
360
- return typeToFieldInfo.find(T);
361
- }
362
- }
363
-
364
- ///Get a reference to StructInfo.
365
- inline StInfo* getStructInfo(const Type *T)
366
- {
367
- return getStructInfoIter(T)->second;
368
- }
369
-
370
- ///Get a reference to the components of struct_info.
371
- const inline std::vector<u32_t>& getFattenFieldIdxVec(const Type *T)
372
- {
373
- return getStructInfoIter(T)->second->getFieldIdxVec();
374
- }
375
- const inline std::vector<u32_t>& getFattenFieldOffsetVec(const Type *T)
376
- {
377
- return getStructInfoIter(T)->second->getFieldOffsetVec();
378
- }
379
- const inline std::vector<FieldInfo>& getFlattenFieldInfoVec(const Type *T)
380
- {
381
- return getStructInfoIter(T)->second->getFlattenFieldInfoVec();
382
- }
383
- const inline Type* getOrigSubTypeWithFldInx(const Type* baseType, u32_t field_idx)
384
- {
385
- return getStructInfoIter(baseType)->second->getFieldTypeWithFldIdx(field_idx);
386
- }
387
- const inline Type* getOrigSubTypeWithByteOffset(const Type* baseType, u32_t byteOffset)
388
- {
389
- return getStructInfoIter(baseType)->second->getFieldTypeWithByteOffset(byteOffset);
390
- }
391
- //@}
392
-
393
- /// Compute gep offset
394
- virtual bool computeGepOffset(const User *V, LocationSet& ls);
395
- /// Get the base type and max offset
396
- const Type *getBaseTypeAndFlattenedFields(const Value *V, std::vector<LocationSet> &fields);
397
- /// Replace fields with flatten fields of T if the number of its fields is larger than msz.
398
- u32_t getFields(std::vector<LocationSet>& fields, const Type* T, u32_t msz);
399
- /// Collect type info
400
- void collectTypeInfo(const Type* T);
401
- /// Given an offset from a Gep Instruction, return it modulus offset by considering memory layout
402
- virtual LocationSet getModulusOffset(const MemObj* obj, const LocationSet& ls);
403
-
404
- /// Debug method
405
- void printFlattenFields(const Type* type);
406
-
407
- static std::string toString(SYMTYPE symtype);
408
-
409
- /// Another debug method
410
- virtual void dump();
411
-
412
- protected:
413
- /// Collect the struct info
414
- virtual void collectStructInfo(const StructType *T);
415
- /// Collect the array info
416
- virtual void collectArrayInfo(const ArrayType* T);
417
- /// Collect simple type (non-aggregate) info
418
- virtual void collectSimpleTypeInfo(const Type* T);
419
-
420
- /// Create an objectInfo based on LLVM type (value is null, and type could be null, representing a dummy object)
421
- ObjTypeInfo* createObjTypeInfo(const Type *type = nullptr);
422
-
423
- /// Every type T is mapped to StInfo
424
- /// which contains size (fsize) , offset(foffset)
425
- /// fsize[i] is the number of fields in the largest such struct, else fsize[i] = 1.
426
- /// fsize[0] is always the size of the expanded struct.
427
- TypeToFieldInfoMap typeToFieldInfo;
428
-
429
- ///The struct type with the most fields
430
- const Type* maxStruct;
431
-
432
- ///The number of fields in max_struct
433
- u32_t maxStSize;
434
- };
435
-
436
-
437
- } // End namespace SVF
438
-
439
- #endif /* INCLUDE_SVF_FE_SYMBOLTABLEINFO_H_ */
@@ -1,219 +0,0 @@
1
- #ifndef SVF_FE_BASIC_TYPES_H
2
- #define SVF_FE_BASIC_TYPES_H
3
-
4
- #include "SVF-FE/GEPTypeBridgeIterator.h"
5
-
6
- #include <llvm/Pass.h>
7
-
8
- #include <llvm/IR/Instructions.h>
9
- #include <llvm/IR/IntrinsicInst.h>
10
- #include <llvm/IR/LLVMContext.h>
11
- #include <llvm/IR/Metadata.h>
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>
18
- #include <llvm/IR/Statepoint.h>
19
-
20
- #include <llvm/Analysis/MemoryLocation.h>
21
- #include <llvm/Analysis/DominanceFrontier.h>
22
- #include <llvm/Analysis/PostDominators.h>
23
- #include <llvm/Analysis/ScalarEvolution.h>
24
- #include <llvm/Analysis/ScalarEvolutionExpressions.h>
25
-
26
- #include <llvm/Transforms/Utils/UnifyFunctionExitNodes.h>
27
-
28
- #include <llvm/Support/SourceMgr.h>
29
-
30
- #include <llvm/Bitcode/BitcodeWriter.h> // for WriteBitcodeToFile
31
- #include <llvm/Bitcode/BitcodeReader.h> /// for isBitcode
32
- #include <llvm/IRReader/IRReader.h> // IR reader for bit file
33
- #include <llvm/IR/InstVisitor.h> // for instruction visitor
34
- #include <llvm/IR/InstIterator.h> // for inst iteration
35
-
36
- #include <llvm/Analysis/LoopInfo.h>
37
-
38
- namespace SVF
39
- {
40
-
41
- typedef llvm::LLVMContext LLVMContext;
42
- typedef llvm::GlobalObject GlobalObject;
43
- typedef llvm::Use Use;
44
- typedef llvm::ModulePass ModulePass;
45
- typedef llvm::IRBuilder<> IRBuilder;
46
- #if LLVM_VERSION_MAJOR >= 12
47
- typedef llvm::UnifyFunctionExitNodesLegacyPass UnifyFunctionExitNodes;
48
- #else
49
- typedef llvm::UnifyFunctionExitNodes UnifyFunctionExitNodes;
50
- #endif
51
-
52
- typedef llvm::Module Module;
53
-
54
- typedef llvm::SMDiagnostic SMDiagnostic;
55
-
56
- typedef llvm::BlockAddress BlockAddress;
57
-
58
- // LLVM Metadata
59
- typedef llvm::MDString MDString;
60
- typedef llvm::MetadataAsValue MetadataAsValue;
61
-
62
- // LLVM data layout
63
- typedef llvm::StructLayout StructLayout;
64
- typedef llvm::ConstantStruct ConstantStruct;
65
- typedef llvm::MemoryLocation MemoryLocation;
66
- typedef llvm::DataLayout DataLayout;
67
-
68
- // LLVM Aliases and constants
69
- typedef llvm::ConstantAggregate ConstantAggregate;
70
- typedef llvm::ConstantAggregateZero ConstantAggregateZero;
71
- typedef llvm::ConstantDataSequential ConstantDataSequential;
72
- typedef llvm::ConstantExpr ConstantExpr;
73
- typedef llvm::ConstantDataArray ConstantDataArray;
74
- typedef llvm::ConstantData ConstantData;
75
- typedef llvm::ConstantArray ConstantArray;
76
- typedef llvm::Constant Constant;
77
-
78
- /// LLVM Dominators
79
- typedef llvm::DominatorTree DominatorTree;
80
- typedef llvm::DomTreeNode DomTreeNode;
81
- typedef llvm::DominanceFrontier DominanceFrontier;
82
- typedef llvm::PostDominatorTree PostDominatorTree;
83
- typedef llvm::DominanceFrontierBase<llvm::BasicBlock, false> DominanceFrontierBase;
84
-
85
- /// LLVM Loop
86
- typedef llvm::Loop Loop;
87
- typedef llvm::LoopInfo LoopInfo;
88
- typedef llvm::User User;
89
-
90
- // LLVM Instructions
91
- typedef llvm::CallInst CallInst;
92
- typedef llvm::StoreInst StoreInst;
93
- typedef llvm::LoadInst LoadInst;
94
- typedef llvm::AllocaInst AllocaInst;
95
- typedef llvm::AtomicCmpXchgInst AtomicCmpXchgInst;
96
- typedef llvm::AtomicRMWInst AtomicRMWInst;
97
- typedef llvm::BitCastInst BitCastInst;
98
- typedef llvm::BranchInst BranchInst;
99
- typedef llvm::SwitchInst SwitchInst;
100
- typedef llvm::CallBrInst CallBrInst;
101
- typedef llvm::ReturnInst ReturnInst;
102
- typedef llvm::CastInst CastInst;
103
- typedef llvm::CmpInst CmpInst;
104
- typedef llvm::ExtractValueInst ExtractValueInst;
105
- typedef llvm::ExtractElementInst ExtractElementInst;
106
- typedef llvm::GetElementPtrInst GetElementPtrInst;
107
- typedef llvm::InvokeInst InvokeInst;
108
- typedef llvm::ShuffleVectorInst ShuffleVectorInst;
109
- typedef llvm::PHINode PHINode;
110
- typedef llvm::IntToPtrInst IntToPtrInst;
111
- typedef llvm::InsertValueInst InsertValueInst;
112
- typedef llvm::FenceInst FenceInst;
113
- typedef llvm::FreezeInst FreezeInst;
114
- typedef llvm::UnreachableInst UnreachableInst;
115
- typedef llvm::InsertElementInst InsertElementInst;
116
- typedef llvm::LandingPadInst LandingPadInst;
117
- typedef llvm::ResumeInst ResumeInst;
118
- typedef llvm::SelectInst SelectInst;
119
- typedef llvm::VAArgInst VAArgInst;
120
- typedef llvm::VACopyInst VACopyInst;
121
- typedef llvm::VAEndInst VAEndInst;
122
- typedef llvm::VAStartInst VAStartInst;
123
- typedef llvm::BinaryOperator BinaryOperator;
124
- typedef llvm::UnaryOperator UnaryOperator;
125
- typedef llvm::UndefValue UndefValue;
126
-
127
- // LLVM Intrinsic Instructions
128
- #if LLVM_VERSION_MAJOR >= 13
129
- typedef llvm::IntrinsicInst IntrinsicInst;
130
- typedef llvm::DbgInfoIntrinsic DbgInfoIntrinsic;
131
- typedef llvm::DbgVariableIntrinsic DbgVariableIntrinsic;
132
- typedef llvm::DbgDeclareInst DbgDeclareInst;
133
- typedef llvm::DbgAddrIntrinsic DbgAddrIntrinsic;
134
- typedef llvm::DbgValueInst DbgValueInst;
135
- typedef llvm::DbgLabelInst DbgLabelInst;
136
- typedef llvm::VPIntrinsic VPIntrinsic;
137
- typedef llvm::ConstrainedFPIntrinsic ConstrainedFPIntrinsic;
138
- typedef llvm::ConstrainedFPCmpIntrinsic ConstrainedFPCmpIntrinsic;
139
- typedef llvm::MinMaxIntrinsic MinMaxIntrinsic;
140
- typedef llvm::BinaryOpIntrinsic BinaryOpIntrinsic;
141
- typedef llvm::WithOverflowInst WithOverflowInst;
142
- typedef llvm::SaturatingInst SaturatingInst;
143
- typedef llvm::AtomicMemIntrinsic AtomicMemIntrinsic;
144
- typedef llvm::AtomicMemSetInst AtomicMemSetInst;
145
- typedef llvm::AtomicMemTransferInst AtomicMemTransferInst;
146
- typedef llvm::AtomicMemCpyInst AtomicMemCpyInst;
147
- typedef llvm::AtomicMemMoveInst AtomicMemMoveInst;
148
- typedef llvm::MemIntrinsic MemIntrinsic;
149
- typedef llvm::MemSetInst MemSetInst;
150
- typedef llvm::MemTransferInst MemTransferInst;
151
- typedef llvm::MemCpyInst MemCpyInst;
152
- typedef llvm::MemMoveInst MemMoveInst;
153
- typedef llvm::MemCpyInlineInst MemCpyInlineInst;
154
- typedef llvm::AnyMemIntrinsic AnyMemIntrinsic;
155
- typedef llvm::AnyMemSetInst AnyMemSetInst;
156
- typedef llvm::AnyMemTransferInst AnyMemTransferInst;
157
- typedef llvm::AnyMemCpyInst AnyMemCpyInst;
158
- typedef llvm::AnyMemMoveInst AnyMemMoveInst;
159
- typedef llvm::VAStartInst VAStartInst;
160
- typedef llvm::VAEndInst VAEndInst;
161
- typedef llvm::VACopyInst VACopyInst;
162
- typedef llvm::InstrProfIncrementInst InstrProfIncrementInst;
163
- typedef llvm::InstrProfIncrementInstStep InstrProfIncrementInstStep;
164
- typedef llvm::InstrProfValueProfileInst InstrProfValueProfileInst;
165
- typedef llvm::PseudoProbeInst PseudoProbeInst;
166
- typedef llvm::NoAliasScopeDeclInst NoAliasScopeDeclInst;
167
- typedef llvm::GCStatepointInst GCStatepointInst;
168
- typedef llvm::GCProjectionInst GCProjectionInst;
169
- typedef llvm::GCRelocateInst GCRelocateInst;
170
- typedef llvm::GCResultInst GCResultInst;
171
- typedef llvm::AssumeInst AssumeInst;
172
- #endif
173
-
174
- // LLVM Debug Information
175
- typedef llvm::DIType DIType;
176
- typedef llvm::DICompositeType DICompositeType;
177
- typedef llvm::DIDerivedType DIDerivedType;
178
- typedef llvm::DebugInfoFinder DebugInfoFinder;
179
- typedef llvm::DISubroutineType DISubroutineType;
180
- typedef llvm::DIBasicType DIBasicType;
181
- typedef llvm::DISubrange DISubrange;
182
- typedef llvm::DINode DINode;
183
- typedef llvm::DINodeArray DINodeArray;
184
- typedef llvm::DITypeRefArray DITypeRefArray;
185
- namespace dwarf = llvm::dwarf;
186
-
187
- // Iterators.
188
- typedef llvm::inst_iterator inst_iterator;
189
- typedef llvm::const_inst_iterator const_inst_iterator;
190
- typedef llvm::gep_type_iterator gep_type_iterator;
191
- typedef llvm::bridge_gep_iterator bridge_gep_iterator;
192
- typedef llvm::const_inst_iterator const_inst_iterator;
193
- typedef llvm::const_pred_iterator const_pred_iterator;
194
-
195
- // LLVM Scalar Evolution.
196
- typedef llvm::ScalarEvolutionWrapperPass ScalarEvolutionWrapperPass;
197
- typedef llvm::SCEVAddRecExpr SCEVAddRecExpr;
198
- typedef llvm::SCEVConstant SCEVConstant;
199
- typedef llvm::ScalarEvolution ScalarEvolution;
200
- typedef llvm::SCEV SCEV;
201
-
202
- /// LLVM outputs
203
- typedef llvm::raw_fd_ostream raw_fd_ostream;
204
-
205
- // LLVM Types.
206
- typedef llvm::VectorType VectorType;
207
- #if (LLVM_VERSION_MAJOR >= 9)
208
- typedef llvm::FunctionCallee FunctionCallee;
209
- #endif
210
-
211
- /// LLVM Iterators
212
- #if LLVM_VERSION_MAJOR >= 11
213
- typedef llvm::const_succ_iterator succ_const_iterator;
214
- #else
215
- typedef llvm::succ_const_iterator succ_const_iterator;
216
- #endif
217
- } // End namespace SVF
218
-
219
- #endif // SVF_FE_BASIC_TYPES_H