[llvm-commits] [llvm] r66443 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Dan Gohman gohman at apple.com
Mon Mar 9 13:35:00 PDT 2009


Author: djg
Date: Mon Mar  9 15:34:59 2009
New Revision: 66443

URL: http://llvm.org/viewvc/llvm-project?rev=66443&view=rev
Log:
Tidy some LSR debug output: announce the loop it's about to process
before it does any processing.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=66443&r1=66442&r2=66443&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Mar  9 15:34:59 2009
@@ -2606,6 +2606,12 @@
     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 @@
     // 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?");
 





More information about the llvm-commits mailing list