diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-21 07:31:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-21 07:31:50 +0000 |
commit | f4de63f65fa995e68e3cd268117ab065068be413 (patch) | |
tree | 2fd8cd44af0f23dafd94102c1c0152b1cd82fe4d /tools/gccas/gccas.cpp | |
parent | aff5bcebb7fb9880e0a3518a8e7c999e738d531c (diff) |
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/gccas.cpp')
-rw-r--r-- | tools/gccas/gccas.cpp | 18 |
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; |