aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-07 04:25:36 +0000
committerChris Lattner <sabre@nondot.org>2001-12-07 04:25:36 +0000
commit0d7a474463fdf5c2068a727a1ba4df977fc92d15 (patch)
tree167d5c67408a56f89b02aaf55cba8f00cc4b941d /tools
parent7026107b70829c7f9ebe6ff88dc31feec02e9015 (diff)
downloadexternal_llvm-0d7a474463fdf5c2068a727a1ba4df977fc92d15.zip
external_llvm-0d7a474463fdf5c2068a727a1ba4df977fc92d15.tar.gz
external_llvm-0d7a474463fdf5c2068a727a1ba4df977fc92d15.tar.bz2
Run DCE before cleanupGCCoutput which will cause some dead types (like FILE) to be removed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1429 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccas/gccas.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index 376aff0..a1eeedb 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -11,7 +11,6 @@
#include "llvm/Assembly/Parser.h"
#include "llvm/Transforms/CleanupGCCOutput.h"
#include "llvm/Transforms/LevelChange.h"
-#include "llvm/Optimizations/ConstantProp.h"
#include "llvm/Optimizations/DCE.h"
#include "llvm/Transforms/ConstantMerge.h"
#include "llvm/Transforms/Scalar/IndVarSimplify.h"
@@ -64,10 +63,11 @@ int main(int argc, char **argv) {
// a little bit. Do this now.
//
vector<Pass*> Passes;
- Passes.push_back(new CleanupGCCOutput()); // Fix gccisms
+ Passes.push_back(new opt::DeadCodeElimination()); // Remove Dead code/vars
+ Passes.push_back(new CleanupGCCOutput()); // Fix gccisms
Passes.push_back(new InductionVariableSimplify()); // Simplify indvars
- Passes.push_back(new RaisePointerReferences()); // Fix general low level code
- Passes.push_back(new ConstantMerge()); // Merge dup global constants
+ Passes.push_back(new RaisePointerReferences()); // Fix general low level code
+ Passes.push_back(new ConstantMerge()); // Merge dup global constants
// Run our queue of passes all at once now, efficiently. This form of
// runAllPasses frees the Pass objects after runAllPasses completes.