Move loop optimization passes up, add loop unroller
authorChris Lattner <sabre@nondot.org>
Sun, 18 Apr 2004 05:21:01 +0000 (05:21 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 18 Apr 2004 05:21:01 +0000 (05:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13030 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccas/gccas.cpp

index dd2b307d3b8ffc40490e98f15afe89d9fcbf521d..40e85ce4a8a7049a92164bc664d947588620ea66 100644 (file)
@@ -92,14 +92,18 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
   addPass(PM, createTailCallEliminationPass());  // Eliminate tail calls
   addPass(PM, createCFGSimplificationPass());    // Merge & remove BBs
   addPass(PM, createLICMPass());                 // Hoist loop invariants
+  addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller
+  addPass(PM, createIndVarSimplifyPass());       // Canonicalize indvars
+  addPass(PM, createLoopUnrollPass());           // Unroll small loops
+  addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller
   addPass(PM, createLoadValueNumberingPass());   // GVN for load instructions
   addPass(PM, createGCSEPass());                 // Remove common subexprs
   addPass(PM, createSCCPPass());                 // Constant prop with SCCP
+  addPass(PM, createSCCPPass());                 // Constant prop with SCCP
 
   // Run instcombine after redundancy elimination to exploit opportunities
   // opened up by them.
   addPass(PM, createInstructionCombiningPass());
-  addPass(PM, createIndVarSimplifyPass());       // Canonicalize indvars
   addPass(PM, createAggressiveDCEPass());        // SSA based 'Aggressive DCE'
   addPass(PM, createCFGSimplificationPass());    // Merge & remove BBs
   addPass(PM, createDeadTypeEliminationPass());  // Eliminate dead types