svf-lib 1.0.706 → 1.0.707

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.
@@ -108,52 +108,52 @@ public:
108
108
 
109
109
  void dirVFEdgeStart()
110
110
  {
111
- connectDirSVFGEdgeTimeStart = CLOCK_IN_MS();
111
+ connectDirSVFGEdgeTimeStart = PTAStat::getClk(true);
112
112
  }
113
113
 
114
114
  void dirVFEdgeEnd()
115
115
  {
116
- connectDirSVFGEdgeTimeEnd = CLOCK_IN_MS();
116
+ connectDirSVFGEdgeTimeEnd = PTAStat::getClk(true);
117
117
  }
118
118
 
119
119
  void indVFEdgeStart()
120
120
  {
121
- connectIndSVFGEdgeTimeStart = CLOCK_IN_MS();
121
+ connectIndSVFGEdgeTimeStart = PTAStat::getClk(true);
122
122
  }
123
123
 
124
124
  void indVFEdgeEnd()
125
125
  {
126
- connectIndSVFGEdgeTimeEnd = CLOCK_IN_MS();
126
+ connectIndSVFGEdgeTimeEnd = PTAStat::getClk(true);
127
127
  }
128
128
 
129
129
  void TLVFNodeStart()
130
130
  {
131
- addTopLevelNodeTimeStart = CLOCK_IN_MS();
131
+ addTopLevelNodeTimeStart = PTAStat::getClk(true);
132
132
  }
133
133
 
134
134
  void TLVFNodeEnd()
135
135
  {
136
- addTopLevelNodeTimeEnd = CLOCK_IN_MS();
136
+ addTopLevelNodeTimeEnd = PTAStat::getClk(true);
137
137
  }
138
138
 
139
139
  void ATVFNodeStart()
140
140
  {
141
- addAddrTakenNodeTimeStart = CLOCK_IN_MS();
141
+ addAddrTakenNodeTimeStart = PTAStat::getClk(true);
142
142
  }
143
143
 
144
144
  void ATVFNodeEnd()
145
145
  {
146
- addAddrTakenNodeTimeEnd = CLOCK_IN_MS();
146
+ addAddrTakenNodeTimeEnd = PTAStat::getClk(true);
147
147
  }
148
148
 
149
149
  void sfvgOptStart()
150
150
  {
151
- svfgOptTimeStart = CLOCK_IN_MS();
151
+ svfgOptTimeStart = PTAStat::getClk(true);
152
152
  }
153
153
 
154
154
  void sfvgOptEnd()
155
155
  {
156
- svfgOptTimeEnd = CLOCK_IN_MS();
156
+ svfgOptTimeEnd = PTAStat::getClk(true);
157
157
  }
158
158
 
159
159
  private:
@@ -122,16 +122,22 @@ public:
122
122
 
123
123
  typedef Map<const char*,double> TIMEStatMap;
124
124
 
125
+ enum ClockType
126
+ {
127
+ Wall,
128
+ CPU,
129
+ };
130
+
125
131
  PTAStat(PointerAnalysis* p);
126
132
  virtual ~PTAStat() {}
127
133
 
128
134
  virtual inline void startClk()
129
135
  {
130
- startTime = CLOCK_IN_MS();
136
+ startTime = getClk(true);
131
137
  }
132
138
  virtual inline void endClk()
133
139
  {
134
- endTime = CLOCK_IN_MS();
140
+ endTime = getClk(true);
135
141
  }
136
142
  /// When mark is true, real clock is always returned. When mark is false, it is
137
143
  /// only returned when Options::MarkedClocksOnly is not set.
@@ -5,6 +5,7 @@
5
5
 
6
6
  #include <sstream>
7
7
  #include "FastCluster/fastcluster.h"
8
+ #include "MemoryModel/PTAStat.h"
8
9
  #include "MemoryModel/PointerAnalysisImpl.h"
9
10
  #include "Util/NodeIDAllocator.h"
10
11
  #include "MSSA/MemSSA.h"
@@ -19,6 +20,8 @@ class Options
19
20
  public:
20
21
  Options(void) = delete;
21
22
 
23
+ static const llvm::cl::opt<enum PTAStat::ClockType> ClockType;
24
+
22
25
  /// If set, only return the clock when getClk is called as getClk(true).
23
26
  /// Retrieving the clock is slow but it should be fine for a few calls.
24
27
  /// This is good for benchmarking when we don't need to know how long processLoad
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.706",
3
+ "version": "1.0.707",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {