aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-07-15 23:38:43 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-07-16 00:21:55 +0300
commitce4459a0db91456ff98b9b43018833655367a59e (patch)
treee8b77fbc3e268fef554e9e685817a4d9f029016f /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parentef454c5444edf564557cbe226dd12bc9e2aae892 (diff)
downloadllvm-ce4459a0db91456ff98b9b43018833655367a59e.zip
llvm-ce4459a0db91456ff98b9b43018833655367a59e.tar.gz
llvm-ce4459a0db91456ff98b9b43018833655367a59e.tar.bz2
[NFC][LoopRotate] Add a statistic for how many times rotation failed due to the header size
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index da1c09e..d3151bb 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -44,6 +44,8 @@ using namespace llvm;
#define DEBUG_TYPE "loop-rotate"
+STATISTIC(NumNotRotatedDueToHeaderSize,
+ "Number of loops not rotated due to the header size");
STATISTIC(NumRotated, "Number of loops rotated");
static cl::opt<bool>
@@ -320,6 +322,7 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
<< " instructions, which is more than the threshold ("
<< MaxHeaderSize << " instructions): ";
L->dump());
+ ++NumNotRotatedDueToHeaderSize;
return Rotated;
}
}