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

Dan Gohman gohman at apple.com
Mon Mar 9 13:41:15 PDT 2009


Author: djg
Date: Mon Mar  9 15:41:15 2009
New Revision: 66446

URL: http://llvm.org/viewvc/llvm-project?rev=66446&view=rev
Log:
Delete the isOnlyStride argument, which is unused.

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=66446&r1=66445&r2=66446&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Mar  9 15:41:15 2009
@@ -239,7 +239,7 @@
                                   SCEVExpander &PreheaderRewriter);
     void StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
                                       IVUsersOfOneStride &Uses,
-                                      Loop *L, bool isOnlyStride);
+                                      Loop *L);
     void DeleteTriviallyDeadInstructions();
   };
 }
@@ -1786,11 +1786,10 @@
 
 /// StrengthReduceStridedIVUsers - Strength reduce all of the users of a single
 /// stride of IV.  All of the users may have different starting values, and this
-/// may not be the only stride (we know it is if isOnlyStride is true).
+/// may not be the only stride.
 void LoopStrengthReduce::StrengthReduceStridedIVUsers(const SCEVHandle &Stride,
                                                       IVUsersOfOneStride &Uses,
-                                                      Loop *L,
-                                                      bool isOnlyStride) {
+                                                      Loop *L) {
   // If all the users are moved to another stride, then there is nothing to do.
   if (Uses.Users.empty())
     return;
@@ -2627,10 +2626,6 @@
     // Need to be careful that IV's are all the same type.  Only works for
     // intptr_t indvars.
 
-    // If we only have one stride, we can more aggressively eliminate some
-    // things.
-    bool HasOneStride = IVUsesByStride.size() == 1;
-
     // IVsByStride keeps IVs for one particular loop.
     assert(IVsByStride.empty() && "Stale entries in IVsByStride?");
 
@@ -2646,7 +2641,7 @@
       std::map<SCEVHandle, IVUsersOfOneStride>::iterator SI = 
         IVUsesByStride.find(StrideOrder[Stride]);
       assert(SI != IVUsesByStride.end() && "Stride doesn't exist!");
-      StrengthReduceStridedIVUsers(SI->first, SI->second, L, HasOneStride);
+      StrengthReduceStridedIVUsers(SI->first, SI->second, L);
     }
   }
 





More information about the llvm-commits mailing list