summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-21 21:44:35 +0000
committerChris Lattner <sabre@nondot.org>2003-11-21 21:44:35 +0000
commit14b170f5ffaf64090b788b004b09740905aa2711 (patch)
treef44468327a476921a2c89557e8e543a7dc064202 /tools
parentafd0b4b24af31734d951d1723f60f0f4c841f6ea (diff)
downloadexternal_llvm-14b170f5ffaf64090b788b004b09740905aa2711.zip
external_llvm-14b170f5ffaf64090b788b004b09740905aa2711.tar.gz
external_llvm-14b170f5ffaf64090b788b004b09740905aa2711.tar.bz2
Reorder passes a bit. In particular, it makes sense to run globaldce IMMEDIATELY after funcresolve. Also, run the mem2reg pass _early_ so that IPCP and DAE actually do stuff.
Run instcombine and simplify cfg after this to cleanup the intraprocedural messes we create. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccas/gccas.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index 0ed58b9..7d44d00 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -58,11 +58,13 @@ 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, createRaiseAllocationsPass()); // call %malloc -> malloc inst
+ addPass(PM, createPromoteMemoryToRegister()); // "Construct SSA form"
addPass(PM, createIPConstantPropagationPass());// IP Constant Propagation
addPass(PM, createDeadArgEliminationPass()); // Dead argument elimination
+ addPass(PM, createInstructionCombiningPass()); // Cleanup after IPCP & DAE
+ addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
addPass(PM, createPruneEHPass()); // Remove dead EH info