diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2017-11-05 17:24:37 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2017-11-05 17:24:37 +0000 |
commit | d88412fc5139a0dbecbc8e61a817a088037501f6 (patch) | |
tree | a619106d5d0f15135e88affa6a1b775ec677d5c2 /gcc/fortran/lang.opt | |
parent | 5233d45559d5869fe7dc9705d6c79e6538d8a2ab (diff) | |
download | gcc-d88412fc5139a0dbecbc8e61a817a088037501f6.zip gcc-d88412fc5139a0dbecbc8e61a817a088037501f6.tar.gz gcc-d88412fc5139a0dbecbc8e61a817a088037501f6.tar.bz2 |
re PR fortran/82471 (Reorder loop for unfavorable index ordering in DO CONCURRENT and FORALL)
2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/82471
* lang.opt (ffrontend-loop-interchange): New option.
(Wfrontend-loop-interchange): New option.
* options.c (gfc_post_options): Handle ffrontend-loop-interchange.
* frontend-passes.c (gfc_run_passes): Run
optimize_namespace if flag_frontend_optimize or
flag_frontend_loop_interchange are set.
(optimize_namespace): Run functions according to flags set;
also call index_interchange.
(ind_type): New function.
(has_var): New function.
(index_cost): New function.
(loop_comp): New function.
2017-11-05 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/82471
* gfortran.dg/loop_interchange_1.f90: New test.
From-SVN: r254430
Diffstat (limited to 'gcc/fortran/lang.opt')
-rw-r--r-- | gcc/fortran/lang.opt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 88f6af5..780335f 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -245,6 +245,10 @@ Wextra Fortran Warning ; Documented in common +Wfrontend-loop-interchange +Fortran Var(flag_warn_frontend_loop_interchange) +Warn if loops have been interchanged. + Wfunction-elimination Fortran Warning Var(warn_function_elimination) Warn about function call elimination. @@ -548,6 +552,10 @@ ffree-line-length- Fortran RejectNegative Joined UInteger Var(flag_free_line_length) Init(132) -ffree-line-length-<n> Use n as character line width in free mode. +ffrontend-loop-interchange +Fortran Var(flag_frontend_loop_interchange) Init(-1) +Try to interchange loops if profitable. + ffrontend-optimize Fortran Var(flag_frontend_optimize) Init(-1) Enable front end optimization. |