Skip to content

Commit 398b497

Browse files
committed
[NFC] LoopRotate: do issue debug message when not rotating due to instr count
It is somewhat problematic to notice this issue otherwise.
1 parent 8620bb9 commit 398b497

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

llvm/lib/Transforms/Utils/LoopRotationUtils.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,14 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
314314
L->dump());
315315
return Rotated;
316316
}
317-
if (Metrics.NumInsts > MaxHeaderSize)
317+
if (Metrics.NumInsts > MaxHeaderSize) {
318+
LLVM_DEBUG(dbgs() << "LoopRotation: NOT rotating - contains "
319+
<< Metrics.NumInsts
320+
<< " instructions, which is more than the threshold ("
321+
<< MaxHeaderSize << " instructions): ";
322+
L->dump());
318323
return Rotated;
324+
}
319325
}
320326

321327
// Now, this loop is suitable for rotation.

0 commit comments

Comments
 (0)