mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-30 16:17:05 +00:00 
			
		
		
		
	* 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
This commit is contained in:
		| @@ -43,7 +43,7 @@ enum Opts { | |||||||
|   raiseallocs, funcresolve, cleangcc, lowerrefs, |   raiseallocs, funcresolve, cleangcc, lowerrefs, | ||||||
|  |  | ||||||
|   // Printing and verifying... |   // Printing and verifying... | ||||||
|   print, verify, |   print, printm, verify, | ||||||
|  |  | ||||||
|   // More powerful optimizations |   // More powerful optimizations | ||||||
|   indvars, instcombine, sccp, adce, raise, mem2reg, |   indvars, instcombine, sccp, adce, raise, mem2reg, | ||||||
| @@ -55,8 +55,12 @@ enum Opts { | |||||||
|   globaldce, swapstructs, sortstructs, poolalloc, |   globaldce, swapstructs, sortstructs, poolalloc, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| static Pass *createPrintMethodPass() { | static Pass *createPrintFunctionPass() { | ||||||
|   return new PrintFunctionPass("Current Method: \n", &cerr); |   return new PrintFunctionPass("Current Function: \n", &cerr); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | static Pass *createPrintModulePass() { | ||||||
|  |   return new PrintModulePass(&cerr); | ||||||
| } | } | ||||||
|  |  | ||||||
| // OptTable - Correlate enum Opts to Pass constructors... | // OptTable - Correlate enum Opts to Pass constructors... | ||||||
| @@ -86,7 +90,8 @@ struct { | |||||||
|   { tracem     , createTraceValuesPassForMethod }, |   { tracem     , createTraceValuesPassForMethod }, | ||||||
|   { paths      , createProfilePathsPass }, |   { paths      , createProfilePathsPass }, | ||||||
|  |  | ||||||
|   { print      , createPrintMethodPass }, |   { print      , createPrintFunctionPass }, | ||||||
|  |   { printm     , createPrintModulePass }, | ||||||
|   { verify     , createVerifierPass }, |   { verify     , createVerifierPass }, | ||||||
|  |  | ||||||
|   { raiseallocs, createRaiseAllocationsPass }, |   { raiseallocs, createRaiseAllocationsPass }, | ||||||
| @@ -111,11 +116,11 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags, | |||||||
|   clEnumVal(dce        , "Dead Code Elimination"), |   clEnumVal(dce        , "Dead Code Elimination"), | ||||||
|   clEnumVal(die        , "Dead Instruction Elimination"), |   clEnumVal(die        , "Dead Instruction Elimination"), | ||||||
|   clEnumVal(constprop  , "Simple constant propogation"), |   clEnumVal(constprop  , "Simple constant propogation"), | ||||||
|  clEnumValN(inlining   , "inline", "Method integration"), |  clEnumValN(inlining   , "inline", "Function integration"), | ||||||
|   clEnumVal(constmerge , "Merge identical global constants"), |   clEnumVal(constmerge , "Merge identical global constants"), | ||||||
|   clEnumVal(strip      , "Strip symbols"), |   clEnumVal(strip      , "Strip symbols"), | ||||||
|   clEnumVal(mstrip     , "Strip module symbols"), |   clEnumVal(mstrip     , "Strip module symbols"), | ||||||
|   clEnumVal(mergereturn, "Unify method exit nodes"), |   clEnumVal(mergereturn, "Unify function exit nodes"), | ||||||
|  |  | ||||||
|   clEnumVal(indvars    , "Simplify Induction Variables"), |   clEnumVal(indvars    , "Simplify Induction Variables"), | ||||||
|   clEnumVal(instcombine, "Combine redundant instructions"), |   clEnumVal(instcombine, "Combine redundant instructions"), | ||||||
| @@ -132,10 +137,11 @@ cl::EnumList<enum Opts> OptimizationList(cl::NoFlags, | |||||||
|   clEnumVal(cleangcc   , "Cleanup GCC Output"), |   clEnumVal(cleangcc   , "Cleanup GCC Output"), | ||||||
|   clEnumVal(funcresolve, "Resolve calls to foo(...) to foo(<concrete types>)"), |   clEnumVal(funcresolve, "Resolve calls to foo(...) to foo(<concrete types>)"), | ||||||
|   clEnumVal(raise      , "Raise to Higher Level"), |   clEnumVal(raise      , "Raise to Higher Level"), | ||||||
|   clEnumVal(trace      , "Insert BB & Method trace code"), |   clEnumVal(trace      , "Insert BB and Function trace code"), | ||||||
|   clEnumVal(tracem     , "Insert Method trace code only"), |   clEnumVal(tracem     , "Insert Function trace code only"), | ||||||
|   clEnumVal(paths      , "Insert path profiling instrumentation"), |   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(verify     , "Verify module is well formed"), | ||||||
|   clEnumVal(lowerrefs  , "Decompose multi-dimensional structure/array refs to use one index per instruction"), |   clEnumVal(lowerrefs  , "Decompose multi-dimensional structure/array refs to use one index per instruction"), | ||||||
| 0); | 0); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user