Move memcpy / memset optimization pass after GVN.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 10 Apr 2008 01:33:05 +0000 (01:33 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 10 Apr 2008 01:33:05 +0000 (01:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49457 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 6155386e6ade6b5706f863046ada9bd401d581db..80deb75b745204a7b63a8138f884a6f10ff9fef7 100644 (file)
@@ -282,8 +282,8 @@ void AddStandardCompilePasses(PassManager &PM) {
   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, createMemCpyOptPass());            // Remove memcpy / form memset
   addPass(PM, createSCCPPass());                 // Constant prop with SCCP
 
   // Run instcombine after redundancy elimination to exploit opportunities