crunch the output of GCC a bit to make it nicer

llvm-svn: 1068
This commit is contained in:
Chris Lattner 2001-10-31 06:36:48 +00:00
parent 55c72cb47a
commit 9fb50fe167
1 changed files with 8 additions and 2 deletions

View File

@ -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.