klee
CallPathManager.h
Go to the documentation of this file.
1//===-- CallPathManager.h ---------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_CALLPATHMANAGER_H
11#define KLEE_CALLPATHMANAGER_H
12
14
15#include <map>
16#include <memory>
17#include <vector>
18
19namespace llvm {
20 class Instruction;
21 class Function;
22}
23
24namespace klee {
25 class StatisticRecord;
26
27 struct CallSiteInfo {
28 unsigned count;
30
31 public:
33 };
34
35 typedef std::map<const llvm::Instruction *,
36 std::map<const llvm::Function *, CallSiteInfo>>
38
40 friend class CallPathManager;
41
42 public:
43 typedef std::map<
44 std::pair<const llvm::Instruction *, const llvm::Function *>,
47
48 // form list of (callSite,function) path
50 const llvm::Instruction *callSite;
51 const llvm::Function *function;
53
56 unsigned count;
57
58 public:
59 CallPathNode(CallPathNode *parent, const llvm::Instruction *callSite,
60 const llvm::Function *function);
61
62 void print();
63 };
64
67 std::vector<std::unique_ptr<CallPathNode>> paths;
68
69 private:
71 const llvm::Instruction *callSite,
72 const llvm::Function *f);
73
74 public:
76 ~CallPathManager() = default;
77
79
81 const llvm::Instruction *callSite,
82 const llvm::Function *f);
83 };
84}
85
86#endif /* KLEE_CALLPATHMANAGER_H */
std::vector< std::unique_ptr< CallPathNode > > paths
~CallPathManager()=default
CallPathNode * getCallPath(CallPathNode *parent, const llvm::Instruction *callSite, const llvm::Function *f)
CallPathNode * computeCallPath(CallPathNode *parent, const llvm::Instruction *callSite, const llvm::Function *f)
void getSummaryStatistics(CallSiteSummaryTable &result)
const llvm::Function * function
CallPathNode(CallPathNode *parent, const llvm::Instruction *callSite, const llvm::Function *function)
StatisticRecord summaryStatistics
const llvm::Instruction * callSite
StatisticRecord statistics
std::map< std::pair< const llvm::Instruction *, const llvm::Function * >, CallPathNode * > children_ty
children_ty children
CallPathNode * parent
Definition: main.cpp:291
std::map< const llvm::Instruction *, std::map< const llvm::Function *, CallSiteInfo > > CallSiteSummaryTable
StatisticRecord statistics