summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccas/gccas.cpp
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
commit52b4fb3fdea0e36aa230998def6d2c8a8ede801c (patch)
tree2004e6805f8f8543dc68ca39aa24f676fad403f6 /llvm/tools/gccas/gccas.cpp
parentdcdc3715229c5c72e14075927241fb48ff5e2e45 (diff)
downloadbcm5719-llvm-52b4fb3fdea0e36aa230998def6d2c8a8ede801c.tar.gz
bcm5719-llvm-52b4fb3fdea0e36aa230998def6d2c8a8ede801c.zip
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. llvm-svn: 10134
Diffstat (limited to 'llvm/tools/gccas/gccas.cpp')
-rw-r--r--llvm/tools/gccas/gccas.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/gccas/gccas.cpp b/llvm/tools/gccas/gccas.cpp
index 0ed58b97db5..7d44d00a55b 100644
--- a/llvm/tools/gccas/gccas.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud