[llvm-commits] CVS: llvm/tools/gccas/gccas.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Dec 2 21:46:13 PST 2004



Changes in directory llvm/tools/gccas:

gccas.cpp updated: 1.103 -> 1.104
---
Log message:

Add -strip-debug option
remove the temporary -disable-dse option


---
Diffs of the changes:  (+9 -3)

Index: llvm/tools/gccas/gccas.cpp
diff -u llvm/tools/gccas/gccas.cpp:1.103 llvm/tools/gccas/gccas.cpp:1.104
--- llvm/tools/gccas/gccas.cpp:1.103	Sun Nov 14 16:14:45 2004
+++ llvm/tools/gccas/gccas.cpp	Thu Dec  2 23:45:58 2004
@@ -48,7 +48,9 @@
                        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 @@
 
 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 @@
   // 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






More information about the llvm-commits mailing list