diff options
author | Revital Eres <eres@il.ibm.com> | 2007-09-04 12:11:11 +0000 |
---|---|---|
committer | Revital Eres <revitale@gcc.gnu.org> | 2007-09-04 12:11:11 +0000 |
commit | a1a826110720eda37c73f829daa4ee243ee953f5 (patch) | |
tree | 67cecf461cc930540853bd8eb0d4f19b3b21b0ce /gcc/opts.c | |
parent | cea79118fa00faf811626e67209ca666468bc76f (diff) | |
download | gcc-a1a826110720eda37c73f829daa4ee243ee953f5.zip gcc-a1a826110720eda37c73f829daa4ee243ee953f5.tar.gz gcc-a1a826110720eda37c73f829daa4ee243ee953f5.tar.bz2 |
Add new fp flags: -fassociative-math and -freciprocal-math
Co-Authored-By: R. Clint Whaley <whaley@cs.utsa.edu>
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r128075
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1559,6 +1559,10 @@ common_handle_option (size_t scode, const char *arg, int value, set_fast_math_flags (value); break; + case OPT_funsafe_math_optimizations: + set_unsafe_math_optimizations_flags (value); + break; + case OPT_ffixed_: fix_register (arg, 1, 1); break; @@ -1857,6 +1861,8 @@ set_fast_math_flags (int set) { flag_trapping_math = !set; flag_unsafe_math_optimizations = set; + flag_associative_math = set; + flag_reciprocal_math = set; flag_finite_math_only = set; flag_signed_zeros = !set; flag_errno_math = !set; @@ -1868,6 +1874,15 @@ set_fast_math_flags (int set) } } +/* When -funsafe-math-optimizations is set the following + flags are set as well. */ +void +set_unsafe_math_optimizations_flags (int set) +{ + flag_reciprocal_math = set; + flag_associative_math = set; +} + /* Return true iff flags are set as if -ffast-math. */ bool fast_math_flags_set_p (void) |