[Bug fortran/82471] Reorder loop for unfavorable index ordering in DO CONCURRENT and FORALL

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Nov 5 17:25:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82471

--- Comment #11 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Sun Nov  5 17:24:37 2017
New Revision: 254430

URL: https://gcc.gnu.org/viewcvs?rev=254430&root=gcc&view=rev
Log:
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.


Added:
    trunk/gcc/testsuite/gfortran.dg/loop_interchange_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/frontend-passes.c
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/options.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list