+2011-02-17 Joseph Myers <joseph@codesourcery.com>
+
+ * common.opt (optimize_fast): New Variable.
+ * opts.c (default_options_optimization): Use opts->x_optimize_fast
+ instead of local variable ofast.
+
2011-02-17 Nicola Pero <nicola.pero@meta-innovation.com>
* doc/invoke.texi (fobjc-abi-version): Documented.
Variable
int optimize_size
+; Not used directly to control optimizations, only to save -Ofast
+; setting for "optimize" attributes.
+Variable
+int optimize_fast
+
; 0 means straightforward implementation of complex divide acceptable.
; 1 means wide ranges of inputs must work for complex divide.
; 2 means C99-like requirements for complex multiply and divide.
{
unsigned int i;
int opt2;
- int ofast = 0;
/* Scan to see what optimization level has been specified. That will
determine the default value of many flags. */
{
opts->x_optimize = 1;
opts->x_optimize_size = 0;
- ofast = 0;
+ opts->x_optimize_fast = 0;
}
else
{
if ((unsigned int) opts->x_optimize > 255)
opts->x_optimize = 255;
opts->x_optimize_size = 0;
- ofast = 0;
+ opts->x_optimize_fast = 0;
}
}
break;
/* Optimizing for size forces optimize to be 2. */
opts->x_optimize = 2;
- ofast = 0;
+ opts->x_optimize_fast = 0;
break;
case OPT_Ofast:
/* -Ofast only adds flags to -O3. */
opts->x_optimize_size = 0;
opts->x_optimize = 3;
- ofast = 1;
+ opts->x_optimize_fast = 1;
break;
default:
maybe_default_options (opts, opts_set, default_options_table,
opts->x_optimize, opts->x_optimize_size,
- ofast, lang_mask, handlers, loc, dc);
+ opts->x_optimize_fast, lang_mask, handlers, loc, dc);
/* -O2 param settings. */
opt2 = (opts->x_optimize >= 2);
maybe_default_options (opts, opts_set,
targetm.target_option.optimization_table,
opts->x_optimize, opts->x_optimize_size,
- ofast, lang_mask, handlers, loc, dc);
+ opts->x_optimize_fast, lang_mask, handlers, loc, dc);
}
/* After all options at LOC have been read into OPTS and OPTS_SET,