summaryrefslogtreecommitdiff
path: root/tools/gccas
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-22 08:34:33 +0000
committerChris Lattner <sabre@nondot.org>2004-07-22 08:34:33 +0000
commitb11a4637fed6fd9daef460ed85bf457851bcf49f (patch)
treedc6a1ef0909654cdfe85b0b9732c454a9fbf2736 /tools/gccas
parent53eb37340c02a06f5927852db978586ceab0525c (diff)
downloadllvm-b11a4637fed6fd9daef460ed85bf457851bcf49f.tar.gz
llvm-b11a4637fed6fd9daef460ed85bf457851bcf49f.tar.bz2
llvm-b11a4637fed6fd9daef460ed85bf457851bcf49f.tar.xz
Remove redundant SCCP pass
Add new DSE pass. Add a temporary option to disable it in case we need it This is going in after the July 22 nightly tester run, so we'll wait until the 23rd to see it :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccas')
-rw-r--r--tools/gccas/gccas.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index 50ce920d0d..1d5f9d1ff8 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -46,6 +46,9 @@ namespace {
cl::opt<bool>
DisableOptimizations("disable-opt",
cl::desc("Do not run any optimization passes"));
+
+ cl::opt<bool>
+ DisableDSE("disable-dse", cl::desc("Do not run dead store elimination"));
}
@@ -99,11 +102,12 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
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());
+ if (!DisableDSE)
+ addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types