diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-18 20:06:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-18 20:06:45 +0000 |
commit | 9effd69ca2fe4d20b8a0dcbf4f9d5d4a402c536d (patch) | |
tree | 121f555a29c0d928c64fee055d4bafc49606e9b3 /tools/opt/opt.cpp | |
parent | c2c9dd1718c2677450da5a0d012ff1dcfb1525a0 (diff) |
Expose more xforms to the opt utility
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@900 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r-- | tools/opt/opt.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 7563c39777..757194d89b 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -13,13 +13,14 @@ #include "llvm/Optimizations/AllOpts.h" #include "llvm/Transforms/Instrumentation/TraceValues.h" #include "llvm/Transforms/PrintModulePass.h" +#include "llvm/Transforms/ConstantMerge.h" #include <fstream> using namespace opt; enum Opts { // Basic optimizations - dce, constprop, inlining, strip, mstrip, + dce, constprop, inlining, mergecons, strip, mstrip, // Miscellaneous Transformations trace, tracem, print, @@ -35,6 +36,7 @@ struct { { dce , new opt::DeadCodeElimination() }, { constprop, new opt::ConstantPropogation() }, { inlining , new opt::MethodInlining() }, + { mergecons, new ConstantMerge() }, { strip , new opt::SymbolStripping() }, { mstrip , new opt::FullSymbolStripping() }, { indvars , new opt::InductionVariableCannonicalize() }, @@ -55,6 +57,7 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags, clEnumVal(dce , "Dead Code Elimination"), clEnumVal(constprop, "Simple Constant Propogation"), clEnumValN(inlining , "inline", "Method Integration"), + clEnumVal(mergecons, "Merge identical global constants"), clEnumVal(strip , "Strip Symbols"), clEnumVal(mstrip , "Strip Module Symbols"), clEnumVal(indvars , "Simplify Induction Variables"), |