re PR fortran/82471 (Reorder loop for unfavorable index ordering in DO CONCURRENT...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 5 Nov 2017 17:24:37 +0000 (17:24 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 5 Nov 2017 17:24:37 +0000 (17:24 +0000)
commitd88412fc5139a0dbecbc8e61a817a088037501f6
treea619106d5d0f15135e88affa6a1b775ec677d5c2
parent5233d45559d5869fe7dc9705d6c79e6538d8a2ab
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
gcc/fortran/ChangeLog
gcc/fortran/frontend-passes.c
gcc/fortran/invoke.texi
gcc/fortran/lang.opt
gcc/fortran/options.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/loop_interchange_1.f90 [new file with mode: 0644]