aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-03-09 20:34:59 +0000
committerDan Gohman <gohman@apple.com>2009-03-09 20:34:59 +0000
commit80b0f8c0628d848d36f04440687b61e3b2d3dff1 (patch)
tree6984bb6e2edf97e27be9f9bc5575daa8459713bc
parent8c6b991635ff589fbe4b8db013bcc1d2ef57a0e0 (diff)
Tidy some LSR debug output: announce the loop it's about to process
before it does any processing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66443 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LoopStrengthReduce.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index c88bf230ad..a059580172 100644
--- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -2606,6 +2606,12 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
AddUsersIfInteresting(I, L, Processed);
if (!IVUsesByStride.empty()) {
+#ifndef NDEBUG
+ DOUT << "\nLSR on \"" << L->getHeader()->getParent()->getNameStart()
+ << "\" ";
+ DEBUG(L->dump());
+#endif
+
// Optimize induction variables. Some indvar uses can be transformed to use
// strides that will be needed for other purposes. A common example of this
// is the exit test for the loop, which can often be rewritten to use the
@@ -2625,12 +2631,6 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
// things.
bool HasOneStride = IVUsesByStride.size() == 1;
-#ifndef NDEBUG
- DOUT << "\nLSR on \"" << L->getHeader()->getParent()->getNameStart()
- << "\" ";
- DEBUG(L->dump());
-#endif
-
// IVsByStride keeps IVs for one particular loop.
assert(IVsByStride.empty() && "Stale entries in IVsByStride?");