Factor a bunch of functionality related to memcpy and memset transforms out of 
GVN and into its own pass.

llvm-svn: 49419
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index cc09642..6155386 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -282,6 +282,7 @@
   addPass(PM, createIndVarSimplifyPass());       // Canonicalize indvars
   addPass(PM, createLoopUnrollPass());           // Unroll small loops
   addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller
+  addPass(PM, createMemCpyOptPass());            // Remove unneeded memcpy's
   addPass(PM, createGVNPass());                  // Remove redundancies
   addPass(PM, createSCCPPass());                 // Constant prop with SCCP