7 #ifndef IR_SEG_SYMBOLICEXPRGRAPHBUILDER_H
8 #define IR_SEG_SYMBOLICEXPRGRAPHBUILDER_H
10 #include <llvm/IR/Function.h>
11 #include <llvm/IR/Operator.h>
12 #include <llvm/Pass.h>
15 #include <unordered_map>
17 #include "Analysis/Bitcode/TSDataLayout.h"
18 #include "IR/SEG/SEGMapBase.h"
19 #include "IR/SEG/SymbolicExprGraph.h"
20 #include "Language/Spec/Memory.h"
27 class CFGReachabilityAnalysis;
28 class ControlDependenceAnalysis;
29 class DebugInfoAnalysis;
31 class FunctionPropertyPass;
41 void getAnalysisUsage(AnalysisUsage &)
const;
43 bool runOnModule(Module &);
53 std::vector<std::pair<Value *, SEGRegionNode *>>
54 loadPtrAt(Value *Ptr, pp_offset_t Off, Instruction *Loc);
56 std::unordered_set<pp_offset_t> getAllocStoredZeroOff(Value *Alloc,
57 Instruction *Loc)
const;
59 std::set<Value *> getEscapeAllocSites(Function *Func)
const;
61 Value *getEscapeToAlloc(Function *Func, Function *Callee, Value *CalleeObj,
62 Instruction *CS)
const;
67 CFGReachabilityAnalysis *CRA =
nullptr;
68 ControlDependenceAnalysis *CDGs =
nullptr;
70 TSDataLayout *TSDL =
nullptr;
71 DebugInfoAnalysis *DIA =
nullptr;
72 FalconAA *Falcon =
nullptr;
73 AADriver *AA =
nullptr;
74 FunctionPropertyPass *FPP =
nullptr;
75 TypeInference *INFER =
nullptr;
79 typedef std::unordered_map<Value *, kvec<SEGLoadMemNode *>>
80 ValueLoadMemNodesMapTy;
81 typedef std::unordered_map<Value *, kvec<SEGStoreMemNode *>>
82 ValueStoreMemNodesMapTy;
88 ValueStoreMemNodesMapTy *);
90 void labelBackEdge(Module &M);
105 SEGOpcodeNode *modelGEPOperator(GEPOperator *GEP, BasicBlock *B,