diff options
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 362580f8f31..20e87c42014 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -251,6 +251,7 @@ StringRef polly::PollySkipFnAttr = "polly.skip.fn"; STATISTIC(NumScopRegions, "Number of scops"); STATISTIC(NumLoopsInScop, "Number of loops in scops"); +STATISTIC(NumScopsDepthZero, "Number of scops with maximal loop depth 0"); STATISTIC(NumScopsDepthOne, "Number of scops with maximal loop depth 1"); STATISTIC(NumScopsDepthTwo, "Number of scops with maximal loop depth 2"); STATISTIC(NumScopsDepthThree, "Number of scops with maximal loop depth 3"); @@ -262,6 +263,8 @@ STATISTIC(NumProfScopRegions, "Number of scops (profitable scops only)"); STATISTIC(NumLoopsInProfScop, "Number of loops in scops (profitable scops only)"); STATISTIC(NumLoopsOverall, "Number of total loops"); +STATISTIC(NumProfScopsDepthZero, + "Number of scops with maximal loop depth 0 (profitable scops only)"); STATISTIC(NumProfScopsDepthOne, "Number of scops with maximal loop depth 1 (profitable scops only)"); STATISTIC(NumProfScopsDepthTwo, @@ -1757,7 +1760,9 @@ static void updateLoopCountStatistic(ScopDetection::LoopStats Stats, NumLoopsInScop += Stats.NumLoops; MaxNumLoopsInScop = std::max(MaxNumLoopsInScop.getValue(), (unsigned)Stats.NumLoops); - if (Stats.MaxDepth == 1) + if (Stats.MaxDepth == 0) + NumScopsDepthZero++; + else if (Stats.MaxDepth == 1) NumScopsDepthOne++; else if (Stats.MaxDepth == 2) NumScopsDepthTwo++; @@ -1773,7 +1778,9 @@ static void updateLoopCountStatistic(ScopDetection::LoopStats Stats, NumLoopsInProfScop += Stats.NumLoops; MaxNumLoopsInProfScop = std::max(MaxNumLoopsInProfScop.getValue(), (unsigned)Stats.NumLoops); - if (Stats.MaxDepth == 1) + if (Stats.MaxDepth == 0) + NumProfScopsDepthZero++; + else if (Stats.MaxDepth == 1) NumProfScopsDepthOne++; else if (Stats.MaxDepth == 2) NumProfScopsDepthTwo++; |

