From c0aac87374e72ba9254eeb44a424ec9bb3f847aa Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 10 Apr 2008 01:33:05 +0000 Subject: [PATCH] Move memcpy / memset optimization pass after GVN. llvm-svn: 49457 --- tools/opt/opt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 6155386e6ad..80deb75b745 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -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