diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-13 18:32:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-13 18:32:47 +0000 |
commit | 30af36808263fc256ead4fc50b639420b016a58d (patch) | |
tree | 7094271e2e4e885e113cd4a9a5638a8924fcb8be /tools/opt | |
parent | 5146a7ddd4ffe9cda6d68f24d91dd14deab3714a (diff) | |
download | external_llvm-30af36808263fc256ead4fc50b639420b016a58d.zip external_llvm-30af36808263fc256ead4fc50b639420b016a58d.tar.gz external_llvm-30af36808263fc256ead4fc50b639420b016a58d.tar.bz2 |
* Add the printm pass to allow dumping the entire module after a transformation.
* s/Method/Function/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r-- | tools/opt/opt.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index c2c2620..f922dd8 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -43,7 +43,7 @@ enum Opts { raiseallocs, funcresolve, cleangcc, lowerrefs, // Printing and verifying... - print, verify, + print, printm, verify, // More powerful optimizations indvars, instcombine, sccp, adce, raise, mem2reg, @@ -55,8 +55,12 @@ enum Opts { globaldce, swapstructs, sortstructs, poolalloc, }; -static Pass *createPrintMethodPass() { - return new PrintFunctionPass("Current Method: \n", &cerr); +static Pass *createPrintFunctionPass() { + return new PrintFunctionPass("Current Function: \n", &cerr); +} + +static Pass *createPrintModulePass() { + return new PrintModulePass(&cerr); } // OptTable - Correlate enum Opts to Pass constructors... @@ -86,7 +90,8 @@ struct { { tracem , createTraceValuesPassForMethod }, { paths , createProfilePathsPass }, - { print , createPrintMethodPass }, + { print , createPrintFunctionPass }, + { printm , createPrintModulePass }, { verify , createVerifierPass }, { raiseallocs, createRaiseAllocationsPass }, @@ -111,11 +116,11 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags, clEnumVal(dce , "Dead Code Elimination"), clEnumVal(die , "Dead Instruction Elimination"), clEnumVal(constprop , "Simple constant propogation"), - clEnumValN(inlining , "inline", "Method integration"), + clEnumValN(inlining , "inline", "Function integration"), clEnumVal(constmerge , "Merge identical global constants"), clEnumVal(strip , "Strip symbols"), clEnumVal(mstrip , "Strip module symbols"), - clEnumVal(mergereturn, "Unify method exit nodes"), + clEnumVal(mergereturn, "Unify function exit nodes"), clEnumVal(indvars , "Simplify Induction Variables"), clEnumVal(instcombine, "Combine redundant instructions"), @@ -132,10 +137,11 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags, clEnumVal(cleangcc , "Cleanup GCC Output"), clEnumVal(funcresolve, "Resolve calls to foo(...) to foo(<concrete types>)"), clEnumVal(raise , "Raise to Higher Level"), - clEnumVal(trace , "Insert BB & Method trace code"), - clEnumVal(tracem , "Insert Method trace code only"), + clEnumVal(trace , "Insert BB and Function trace code"), + clEnumVal(tracem , "Insert Function trace code only"), clEnumVal(paths , "Insert path profiling instrumentation"), - clEnumVal(print , "Print working method to stderr"), + clEnumVal(print , "Print working function to stderr"), + clEnumVal(printm , "Print working module to stderr"), clEnumVal(verify , "Verify module is well formed"), clEnumVal(lowerrefs , "Decompose multi-dimensional structure/array refs to use one index per instruction"), 0); |