[llvm] r253603 - [LIR] Update some comments. NFC.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 13:33:07 PST 2015


Author: mcrosier
Date: Thu Nov 19 15:33:07 2015
New Revision: 253603

URL: http://llvm.org/viewvc/llvm-project?rev=253603&view=rev
Log:
[LIR] Update some comments. NFC.

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

Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=253603&r1=253602&r2=253603&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Thu Nov 19 15:33:07 2015
@@ -361,9 +361,7 @@ bool LoopIdiomRecognize::processLoopStor
                               StoredVal, SI, StoreEv, BECount, NegStride))
     return true;
 
-  // If the stored value is a strided load in the same loop with the same stride
-  // this may be transformable into a memcpy.  This kicks in for stuff like
-  //   for (i) A[i] = B[i];
+  // Optimize the store into a memcpy, if it feeds an similarly strided load.
   return processLoopStoreOfLoopLoad(SI, StoreSize, StoreEv, BECount, NegStride);
 }
 
@@ -607,8 +605,9 @@ bool LoopIdiomRecognize::processLoopStri
   return true;
 }
 
-/// processLoopStoreOfLoopLoad - We see a strided store whose value is a
-/// same-strided load.
+/// If the stored value is a strided load in the same loop with the same stride
+/// this may be transformable into a memcpy.  This kicks in for stuff like
+///   for (i) A[i] = B[i];
 bool LoopIdiomRecognize::processLoopStoreOfLoopLoad(
     StoreInst *SI, unsigned StoreSize, const SCEVAddRecExpr *StoreEv,
     const SCEV *BECount, bool NegStride) {




More information about the llvm-commits mailing list