diff options
author | Joseph Myers <joseph@codesourcery.com> | 2011-02-17 22:51:57 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2011-02-17 22:51:57 +0000 |
commit | 0a8134cacea8b18b0e241cc492546cbb69ae598a (patch) | |
tree | 3594103b5994b233e0746fd86578ad34870164db /gcc | |
parent | 0a2562409bc550c88c60cf3622802bb05483edb9 (diff) | |
download | gcc-0a8134cacea8b18b0e241cc492546cbb69ae598a.zip gcc-0a8134cacea8b18b0e241cc492546cbb69ae598a.tar.gz gcc-0a8134cacea8b18b0e241cc492546cbb69ae598a.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/common.opt | 5 | ||||
-rw-r--r-- | gcc/opts.c | 13 |
3 files changed, 17 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 26a0c96..8382f50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/gcc/common.opt b/gcc/common.opt index 1f24a3a..f95805c 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -32,6 +32,11 @@ int optimize 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. @@ -524,7 +524,6 @@ default_options_optimization (struct gcc_options *opts, { 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. */ @@ -538,7 +537,7 @@ default_options_optimization (struct gcc_options *opts, { opts->x_optimize = 1; opts->x_optimize_size = 0; - ofast = 0; + opts->x_optimize_fast = 0; } else { @@ -553,7 +552,7 @@ default_options_optimization (struct gcc_options *opts, if ((unsigned int) opts->x_optimize > 255) opts->x_optimize = 255; opts->x_optimize_size = 0; - ofast = 0; + opts->x_optimize_fast = 0; } } break; @@ -563,14 +562,14 @@ default_options_optimization (struct gcc_options *opts, /* 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: @@ -581,7 +580,7 @@ default_options_optimization (struct gcc_options *opts, 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); @@ -611,7 +610,7 @@ default_options_optimization (struct gcc_options *opts, 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, |