[PATCH] D15894: Implement load to store => memcpy in MemCpyOpt for aggregates

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 12:05:36 PST 2016


spatel added inline comments.

================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:484
@@ -483,1 +483,3 @@
 
+static unsigned findCommonAlignement(const DataLayout &DL, const StoreInst *SI,
+                                     const LoadInst *LI) {
----------------
"findCommonAlignment" (remove extra 'e')

================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:486
@@ +485,3 @@
+                                     const LoadInst *LI) {
+  unsigned storeAlign = SI->getAlignment();
+  if (!storeAlign)
----------------
Variable names should be capitalized.

================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:510
@@ -498,5 +509,3 @@
 
-  // Detect cases where we're performing call slot forwarding, but
-  // happen to be using a load-store pair to implement it, rather than
-  // a memcpy.
+  // Load to tore forwarding can be interpreted as memcpy.
   if (LoadInst *LI = dyn_cast<LoadInst>(SI->getOperand(0))) {
----------------
tore -> store


http://reviews.llvm.org/D15894





More information about the llvm-commits mailing list