klee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 __UTIL_CALLPATHMANAGER_H__
11 #define __UTIL_CALLPATHMANAGER_H__
12 
13 #include "klee/Statistics.h"
14 
15 #include <map>
16 #include <vector>
17 
18 namespace llvm {
19  class Instruction;
20  class Function;
21 }
22 
23 namespace klee {
24  class StatisticRecord;
25 
26  struct CallSiteInfo {
27  unsigned count;
29 
30  public:
31  CallSiteInfo() : count(0) {}
32  };
33 
34  typedef std::map<llvm::Instruction*,
35  std::map<llvm::Function*, CallSiteInfo> > CallSiteSummaryTable;
36 
37  class CallPathNode {
38  friend class CallPathManager;
39 
40  public:
41  typedef std::map<std::pair<llvm::Instruction*,
42  llvm::Function*>, CallPathNode*> children_ty;
43 
44  // form list of (callSite,function) path
46  llvm::Instruction *callSite;
47  llvm::Function *function;
49 
52  unsigned count;
53 
54  public:
56  llvm::Instruction *callSite,
57  llvm::Function *function);
58 
59  void print();
60  };
61 
64  std::vector<CallPathNode*> paths;
65 
66  private:
68  llvm::Instruction *callSite,
69  llvm::Function *f);
70 
71  public:
74 
76 
78  llvm::Instruction *callSite,
79  llvm::Function *f);
80  };
81 }
82 
83 #endif
StatisticRecord statistics
std::map< std::pair< llvm::Instruction *, llvm::Function * >, CallPathNode * > children_ty
children_ty children
CallPathNode * parent
StatisticRecord statistics
CallPathNode(CallPathNode *parent, llvm::Instruction *callSite, llvm::Function *function)
llvm::Instruction * callSite
CallPathNode * computeCallPath(CallPathNode *parent, llvm::Instruction *callSite, llvm::Function *f)
StatisticRecord summaryStatistics
CallPathNode * getCallPath(CallPathNode *parent, llvm::Instruction *callSite, llvm::Function *f)
std::vector< CallPathNode * > paths
std::map< llvm::Instruction *, std::map< llvm::Function *, CallSiteInfo > > CallSiteSummaryTable
void getSummaryStatistics(CallSiteSummaryTable &result)