[PATCH] [MemCpyOpt] Turn memcpy from just-memset'd source into memset.

Daniel Berlin dberlin at dberlin.org
Tue May 12 12:54:09 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:931
@@ -901,1 +930,3 @@
+}
+
 /// processMemCpy - perform simplification of memcpy's.  If we have memcpy A
----------------
So, this looks like a valid optimization, and in fact, i expect things like GVN would like this form better than the original.

But I am curious how often it actually happens.

Do you have real programs where this triggers?

http://reviews.llvm.org/D9682

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list