This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC] Add -Otest for unit-testing optimization passes


On Thu, 26 Aug 2010, Richard Guenther wrote:

> + 	case OPT_Otest:
> + 	  /* -Otest adds flags to -O0 but keeps optimze == 1.  */
> + 	  optimize_size = 0;
> + 	  optimize = 1;
> + 	  ofast = 1;
> + 	  otest = 1;
> + 	  break;

I think you should have the other OPT_O* cases set otest = 0, to preserve 
the principle that only the last -O* option matters (note that 
gcc.c:check_live_switch contains such an assumption), and add OPT_Otest to 
the OPT_O* cases in java/jvspec.c.  That is, keep it as if there is a 
single -O option that takes enumerated arguments { 0, 1, 2, 3, s, fast, 
test } (plus -O meaning -O1 and -On for n > 3 meaning -O3).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]