aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-03-12 22:45:11 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-03-17 09:26:09 +0300
commit398b497cd0e20ca7245bf30c12c761b444581da5 (patch)
treebd971a76533c1b564d1883441133731dec54d6d8 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parent8620bb9534342176ac739e2a587e4cecf437310c (diff)
downloadllvm-398b497cd0e20ca7245bf30c12c761b444581da5.zip
llvm-398b497cd0e20ca7245bf30c12c761b444581da5.tar.gz
llvm-398b497cd0e20ca7245bf30c12c761b444581da5.tar.bz2
[NFC] LoopRotate: do issue debug message when not rotating due to instr count
It is somewhat problematic to notice this issue otherwise.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 39be3d3..8804bba 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -314,8 +314,14 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
L->dump());
return Rotated;
}
- if (Metrics.NumInsts > MaxHeaderSize)
+ if (Metrics.NumInsts > MaxHeaderSize) {
+ LLVM_DEBUG(dbgs() << "LoopRotation: NOT rotating - contains "
+ << Metrics.NumInsts
+ << " instructions, which is more than the threshold ("
+ << MaxHeaderSize << " instructions): ";
+ L->dump());
return Rotated;
+ }
}
// Now, this loop is suitable for rotation.