summaryrefslogtreecommitdiff
path: root/tools/gccas
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-21 07:31:50 +0000
committerChris Lattner <sabre@nondot.org>2002-01-21 07:31:50 +0000
commitf4de63f65fa995e68e3cd268117ab065068be413 (patch)
tree2fd8cd44af0f23dafd94102c1c0152b1cd82fe4d /tools/gccas
parentaff5bcebb7fb9880e0a3518a8e7c999e738d531c (diff)
downloadllvm-f4de63f65fa995e68e3cd268117ab065068be413.tar.gz
llvm-f4de63f65fa995e68e3cd268117ab065068be413.tar.bz2
llvm-f4de63f65fa995e68e3cd268117ab065068be413.tar.xz
Implement a more powerful, simpler, pass system. This pass system can figure
out how to run a collection of passes optimially given their behaviors and charactaristics. Convert code to use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccas')
-rw-r--r--tools/gccas/gccas.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index 073b248349..7e2b6f3e46 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -63,19 +63,19 @@ int main(int argc, char **argv) {
// In addition to just parsing the input from GCC, we also want to spiff it up
// a little bit. Do this now.
//
- std::vector<Pass*> Passes;
- 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()); // Eliminate casts
- Passes.push_back(new ConstantMerge()); // Merge dup global consts
- Passes.push_back(new InstructionCombining()); // Combine silly seq's
- Passes.push_back(new opt::DeadCodeElimination()); // Remove Dead code/vars
+ PassManager Passes;
+ Passes.add(new opt::DeadCodeElimination()); // Remove Dead code/vars
+ Passes.add(new CleanupGCCOutput()); // Fix gccisms
+ Passes.add(new InductionVariableSimplify()); // Simplify indvars
+ Passes.add(new RaisePointerReferences()); // Eliminate casts
+ Passes.add(new ConstantMerge()); // Merge dup global consts
+ Passes.add(new InstructionCombining()); // Combine silly seq's
+ Passes.add(new opt::DeadCodeElimination()); // Remove Dead code/vars
// Run our queue of passes all at once now, efficiently. This form of
// runAllPasses frees the Pass objects after runAllPasses completes.
//
- Pass::runAllPassesAndFree(M.get(), Passes);
+ Passes.run(M.get());
WriteBytecodeToFile(M.get(), *Out);
return 0;