Commit 0a8134ca by Joseph Myers Committed by Joseph Myers

common.opt (optimize_fast): New Variable.

	* common.opt (optimize_fast): New Variable.
	* opts.c (default_options_optimization): Use opts->x_optimize_fast
	instead of local variable ofast.

From-SVN: r170259
parent 0a256240
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> 2011-02-17 Nicola Pero <nicola.pero@meta-innovation.com>
* doc/invoke.texi (fobjc-abi-version): Documented. * doc/invoke.texi (fobjc-abi-version): Documented.
......
...@@ -32,6 +32,11 @@ int optimize ...@@ -32,6 +32,11 @@ int optimize
Variable Variable
int optimize_size 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. ; 0 means straightforward implementation of complex divide acceptable.
; 1 means wide ranges of inputs must work for complex divide. ; 1 means wide ranges of inputs must work for complex divide.
; 2 means C99-like requirements for complex multiply and divide. ; 2 means C99-like requirements for complex multiply and divide.
......
...@@ -524,7 +524,6 @@ default_options_optimization (struct gcc_options *opts, ...@@ -524,7 +524,6 @@ default_options_optimization (struct gcc_options *opts,
{ {
unsigned int i; unsigned int i;
int opt2; int opt2;
int ofast = 0;
/* Scan to see what optimization level has been specified. That will /* Scan to see what optimization level has been specified. That will
determine the default value of many flags. */ determine the default value of many flags. */
...@@ -538,7 +537,7 @@ default_options_optimization (struct gcc_options *opts, ...@@ -538,7 +537,7 @@ default_options_optimization (struct gcc_options *opts,
{ {
opts->x_optimize = 1; opts->x_optimize = 1;
opts->x_optimize_size = 0; opts->x_optimize_size = 0;
ofast = 0; opts->x_optimize_fast = 0;
} }
else else
{ {
...@@ -553,7 +552,7 @@ default_options_optimization (struct gcc_options *opts, ...@@ -553,7 +552,7 @@ default_options_optimization (struct gcc_options *opts,
if ((unsigned int) opts->x_optimize > 255) if ((unsigned int) opts->x_optimize > 255)
opts->x_optimize = 255; opts->x_optimize = 255;
opts->x_optimize_size = 0; opts->x_optimize_size = 0;
ofast = 0; opts->x_optimize_fast = 0;
} }
} }
break; break;
...@@ -563,14 +562,14 @@ default_options_optimization (struct gcc_options *opts, ...@@ -563,14 +562,14 @@ default_options_optimization (struct gcc_options *opts,
/* Optimizing for size forces optimize to be 2. */ /* Optimizing for size forces optimize to be 2. */
opts->x_optimize = 2; opts->x_optimize = 2;
ofast = 0; opts->x_optimize_fast = 0;
break; break;
case OPT_Ofast: case OPT_Ofast:
/* -Ofast only adds flags to -O3. */ /* -Ofast only adds flags to -O3. */
opts->x_optimize_size = 0; opts->x_optimize_size = 0;
opts->x_optimize = 3; opts->x_optimize = 3;
ofast = 1; opts->x_optimize_fast = 1;
break; break;
default: default:
...@@ -581,7 +580,7 @@ default_options_optimization (struct gcc_options *opts, ...@@ -581,7 +580,7 @@ default_options_optimization (struct gcc_options *opts,
maybe_default_options (opts, opts_set, default_options_table, maybe_default_options (opts, opts_set, default_options_table,
opts->x_optimize, opts->x_optimize_size, 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. */ /* -O2 param settings. */
opt2 = (opts->x_optimize >= 2); opt2 = (opts->x_optimize >= 2);
...@@ -611,7 +610,7 @@ default_options_optimization (struct gcc_options *opts, ...@@ -611,7 +610,7 @@ default_options_optimization (struct gcc_options *opts,
maybe_default_options (opts, opts_set, maybe_default_options (opts, opts_set,
targetm.target_option.optimization_table, targetm.target_option.optimization_table,
opts->x_optimize, opts->x_optimize_size, 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, /* After all options at LOC have been read into OPTS and OPTS_SET,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment