diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-31 06:36:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-31 06:36:48 +0000 |
commit | dbe0514e12a9e313d165acc87b4ae53ca1f6f781 (patch) | |
tree | 5fe8b4cf4db4fe46666a63134cf94cd58e5dde9d /tools/gccas/gccas.cpp | |
parent | 2305b6c3a71ac21aa5ddc598e02b30e3c1799b7c (diff) |
crunch the output of GCC a bit to make it nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1068 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccas/gccas.cpp')
-rw-r--r-- | tools/gccas/gccas.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index db99cbf268..6b1d33a5c9 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -10,7 +10,10 @@ #include "llvm/Module.h" #include "llvm/Assembly/Parser.h" #include "llvm/Transforms/CleanupGCCOutput.h" +#include "llvm/Optimizations/LevelChange.h" +#include "llvm/Optimizations/ConstantProp.h" #include "llvm/Optimizations/DCE.h" +#include "llvm/Transforms/ConstantMerge.h" #include "llvm/Bytecode/Writer.h" #include "llvm/Support/CommandLine.h" #include <memory> @@ -60,8 +63,11 @@ int main(int argc, char **argv) { // a little bit. Do this now. // vector<Pass*> Passes; - Passes.push_back(new CleanupGCCOutput()); - Passes.push_back(new opt::DeadCodeElimination()); + Passes.push_back(new CleanupGCCOutput()); // Fix gccisms + Passes.push_back(new opt::RaiseRepresentation());// Fix general low level code + Passes.push_back(new opt::ConstantPropogation());// Trivial const prop + Passes.push_back(new opt::DeadCodeElimination());// Trivial DCE + 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. |