summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccas/gccas.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-01 07:24:53 +0000
committerChris Lattner <sabre@nondot.org>2004-02-01 07:24:53 +0000
commiteddfe437c7655ab483092483c4573df5a12fce53 (patch)
treec0d0335b2cfa6c37f28873c8b52cc13319bd42ce /llvm/tools/gccas/gccas.cpp
parented9b12c31a7570d19b3257b3a968f71b24b54429 (diff)
downloadbcm5719-llvm-eddfe437c7655ab483092483c4573df5a12fce53.tar.gz
bcm5719-llvm-eddfe437c7655ab483092483c4573df5a12fce53.zip
Now that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
This tremendously improves the code generated by the LLVM optimizer, primarily by making the inliner more aggressive. For example, it improves the stepanov benchmark from 55.56 mega-additions/sec to 98.04 Ma/s. It also improves the oopack/iterator benchmark from 338.3MFLOPS/s to 1103.4MFLOPS/s. Less noteworthy, it improves oopack/matrix from 573 -> 641 MFLOPS/s. llvm-svn: 11053
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 40053303db6..1abf251fce3 100644
--- a/llvm/tools/gccas/gccas.cpp
+++ b/llvm/tools/gccas/gccas.cpp
@@ -65,18 +65,20 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
if (DisableOptimizations) return;
- addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
+ addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code
+ addPass(PM, createPromoteMemoryToRegister()); // Kill useless allocas
addPass(PM, createGlobalDCEPass()); // Remove unused globals
addPass(PM, createIPConstantPropagationPass());// IP Constant Propagation
addPass(PM, createDeadArgEliminationPass()); // Dead argument elimination
+ addPass(PM, createInstructionCombiningPass()); // Clean up after IPCP & DAE
+ addPass(PM, createCFGSimplificationPass()); // Clean up after IPCP & DAE
addPass(PM, createPruneEHPass()); // Remove dead EH info
if (!DisableInline)
addPass(PM, createFunctionInliningPass()); // Inline small functions
- addPass(PM, createInstructionCombiningPass()); // Cleanup code for raise
addPass(PM, createRaisePointerReferencesPass());// Recover type information
addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
OpenPOWER on IntegriCloud