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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49419 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index cc09642..6155386 100644
--- a/tools/opt/opt.cpp
+++ b/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