File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 13
13
// ===----------------------------------------------------------------------===//
14
14
15
15
#include " llvm/Analysis/LastRunTrackingAnalysis.h"
16
+ #include " llvm/ADT/Statistic.h"
16
17
#include " llvm/Support/CommandLine.h"
17
18
18
19
using namespace llvm ;
19
20
21
+ #define DEBUG_TYPE " last-run-tracking"
22
+ STATISTIC (NumSkippedPasses, " Number of skipped passes" );
23
+ STATISTIC (NumLRTQueries, " Number of LastRunTracking queries" );
24
+
20
25
static cl::opt<bool >
21
26
DisableLastRunTracking (" disable-last-run-tracking" , cl::Hidden,
22
27
cl::desc (" Disable last run tracking" ),
@@ -25,10 +30,15 @@ static cl::opt<bool>
25
30
bool LastRunTrackingInfo::shouldSkipImpl (PassID ID, OptionPtr Ptr) const {
26
31
if (DisableLastRunTracking)
27
32
return false ;
33
+ ++NumLRTQueries;
28
34
auto Iter = TrackedPasses.find (ID);
29
35
if (Iter == TrackedPasses.end ())
30
36
return false ;
31
- return !Iter->second || Iter->second (Ptr);
37
+ if (!Iter->second || Iter->second (Ptr)) {
38
+ ++NumSkippedPasses;
39
+ return true ;
40
+ }
41
+ return false ;
32
42
}
33
43
34
44
void LastRunTrackingInfo::updateImpl (PassID ID, bool Changed,
You can’t perform that action at this time.
0 commit comments