diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2008-02-25 21:20:48 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2008-02-25 21:20:48 +0200 |
commit | 35085f76883a74807150a6f9dc6c105dafa7765c (patch) | |
tree | 27845d82850bec18497dbe7de8726e2937e7a171 /gcc | |
parent | 8cc6d3e0304968c3bc7f08efbf3dc03d582baa64 (diff) | |
download | gcc-35085f76883a74807150a6f9dc6c105dafa7765c.zip gcc-35085f76883a74807150a6f9dc6c105dafa7765c.tar.gz gcc-35085f76883a74807150a6f9dc6c105dafa7765c.tar.bz2 |
re PR fortran/29549 (matmul slow for complex matrices)
2008-02-25 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/29549
* doc/invoke.texi (-fcx-limited-range): Document new option.
* toplev.c (process_options): Handle -fcx-fortran-rules.
* common.opt: Add documentation for -fcx-fortran-rules.
From-SVN: r132636
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/common.opt | 4 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 11 | ||||
-rw-r--r-- | gcc/toplev.c | 4 |
3 files changed, 18 insertions, 1 deletions
diff --git a/gcc/common.opt b/gcc/common.opt index 3a64d2a..670466b 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -405,6 +405,10 @@ fcx-limited-range Common Report Var(flag_cx_limited_range) Optimization Omit range reduction step when performing complex division +fcx-fortran-rules +Common Report Var(flag_cx_fortran_rules) Optimization +Complex multiplication and division follow Fortran rules + fdata-sections Common Report Var(flag_data_sections) Optimization Place data items into their own section diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index ab0bc2b..693f30d 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -321,7 +321,7 @@ Objective-C and Objective-C++ Dialects}. -fauto-inc-dec -fbranch-probabilities -fbranch-target-load-optimize @gol -fbranch-target-load-optimize2 -fbtr-bb-exclusive -fcaller-saves @gol -fcheck-data-deps -fcprop-registers -fcrossjumping -fcse-follow-jumps @gol --fcse-skip-blocks -fcx-limited-range @gol +-fcse-skip-blocks -fcx-fortran-rules -fcx-limited-range @gol -fdata-sections -fdce -fdce @gol -fdelayed-branch -fdelete-null-pointer-checks -fdse -fdse @gol -fearly-inlining -fexpensive-optimizations -ffast-math @gol @@ -6557,6 +6557,15 @@ This option controls the default setting of the ISO C99 @code{CX_LIMITED_RANGE} pragma. Nevertheless, the option applies to all languages. +@item -fcx-fortran-rules +@opindex fcx-fortran-rules +Complex multiplication and division follow Fortran rules. Range +reduction is done as part of complex division, but there is no checking +whether the result of a complex multiplication or division is @code{NaN ++ I*NaN}, with an attempt to rescue the situation in that case. + +The default is @option{-fno-cx-fortran-rules}. + @end table The following options control optimizations that may improve diff --git a/gcc/toplev.c b/gcc/toplev.c index 512e0fb..7a6be49 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -2001,6 +2001,10 @@ process_options (void) if (flag_cx_limited_range) flag_complex_method = 0; + /* With -fcx-fortran-rules, we do something in-between cheap and C99. */ + if (flag_cx_fortran_rules) + flag_complex_method = 1; + /* Targets must be able to place spill slots at lower addresses. If the target already uses a soft frame pointer, the transition is trivial. */ if (!FRAME_GROWS_DOWNWARD && flag_stack_protect) |