[llvm] 398b497 - [NFC] LoopRotate: do issue debug message when not rotating due to instr count
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 23:26:59 PDT 2020
Author: Roman Lebedev
Date: 2020-03-17T09:26:09+03:00
New Revision: 398b497cd0e20ca7245bf30c12c761b444581da5
URL: https://github.com/llvm/llvm-project/commit/398b497cd0e20ca7245bf30c12c761b444581da5
DIFF: https://github.com/llvm/llvm-project/commit/398b497cd0e20ca7245bf30c12c761b444581da5.diff
LOG: [NFC] LoopRotate: do issue debug message when not rotating due to instr count
It is somewhat problematic to notice this issue otherwise.
Added:
Modified:
llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 39be3d3831f0..8804bba975b6 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.
More information about the llvm-commits
mailing list