Turn on the IPCP pass by default. It has passed all of the tests
authorChris Lattner <sabre@nondot.org>
Thu, 23 Oct 2003 18:25:57 +0000 (18:25 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 23 Oct 2003 18:25:57 +0000 (18:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9435 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gccas/gccas.cpp
tools/gccld/GenerateCode.cpp

index 6799ed6d6b85f44bcd8f2c6280a3e236a6cd6264..d97c716da1e901406e79a61d98e10f7f43d76a46 100644 (file)
@@ -56,8 +56,12 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
   PM.add(createVerifierPass());                  // Verify that input is correct
   addPass(PM, createLowerSetJmpPass());          // Lower llvm.setjmp/.longjmp
   addPass(PM, createFunctionResolvingPass());    // Resolve (...) functions
+  addPass(PM, createCFGSimplificationPass());    // Clean up disgusting code
   addPass(PM, createRaiseAllocationsPass());     // call %malloc -> malloc inst
   addPass(PM, createGlobalDCEPass());            // Remove unused globals
+  addPass(PM, createIPConstantPropagationPass());// IP Constant Propagation
+  addPass(PM, createDeadArgEliminationPass());   // Dead argument elimination
+
   addPass(PM, createPruneEHPass());              // Remove dead EH info
 
   if (!DisableInline)
index d1a009b4118ad7790a428c1afeadb439551a67b7..ef072877314a6c78754cb6c783e049bd88ca893c 100644 (file)
@@ -68,6 +68,9 @@ GenerateBytecode (Module *M, bool Strip, bool Internalize, std::ostream *Out) {
     Passes.add(createInternalizePass());
   }
 
+  // Propagate constants at call sites into the functions they call.
+  Passes.add(createIPConstantPropagationPass());
+
   // Remove unused arguments from functions...
   Passes.add(createDeadArgEliminationPass());