summaryrefslogtreecommitdiffstats
path: root/llvm/tools/gccas/gccas.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-03 05:45:58 +0000
committerChris Lattner <sabre@nondot.org>2004-12-03 05:45:58 +0000
commit0558e23872a7a9b1262cfd421576e9d1ef1f66fe (patch)
treead9728c93f6e9b1ba8fa2e78d64d5bfec1962cfc /llvm/tools/gccas/gccas.cpp
parentc0d9dcdfacc8b844b452a2748637189079ded89a (diff)
downloadbcm5719-llvm-0558e23872a7a9b1262cfd421576e9d1ef1f66fe.tar.gz
bcm5719-llvm-0558e23872a7a9b1262cfd421576e9d1ef1f66fe.zip
Add -strip-debug option
remove the temporary -disable-dse option llvm-svn: 18451
Diffstat (limited to 'llvm/tools/gccas/gccas.cpp')
-rw-r--r--llvm/tools/gccas/gccas.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/tools/gccas/gccas.cpp b/llvm/tools/gccas/gccas.cpp
index dd8b8e06984..ef1d8d6376d 100644
--- a/llvm/tools/gccas/gccas.cpp
+++ b/llvm/tools/gccas/gccas.cpp
@@ -48,7 +48,9 @@ namespace {
cl::desc("Do not run any optimization passes"));
cl::opt<bool>
- DisableDSE("disable-dse", cl::desc("Do not run dead store elimination"));
+ StripDebug("strip-debug",
+ cl::desc("Strip debugger symbol info from translation unit"));
+
cl::opt<bool>
NoCompress("disable-compression", cl::init(false),
cl::desc("Don't ompress the generated bytecode"));
@@ -66,9 +68,14 @@ static inline void addPass(PassManager &PM, Pass *P) {
void AddConfiguredTransformationPasses(PassManager &PM) {
PM.add(createVerifierPass()); // Verify that input is correct
+
addPass(PM, createLowerSetJmpPass()); // Lower llvm.setjmp/.longjmp
addPass(PM, createFunctionResolvingPass()); // Resolve (...) functions
+ // If the -strip-debug command line option was specified, do it.
+ if (StripDebug)
+ addPass(PM, createStripSymbolsPass(true));
+
if (DisableOptimizations) return;
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
@@ -109,8 +116,7 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
// 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, createDeadStoreEliminationPass()); // Delete dead stores
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types
OpenPOWER on IntegriCloud