[patch, fortran] Index interchange for FORALL and DO CONCURRENT

Thomas Koenig tkoenig@netcologne.de
Tue Oct 31 13:24:00 GMT 2017


Hello world,

here is a version of the patch for index interchange for FORALL
and DO CONCURRENT that I would like to commit.

It introduces a new option for selecting (or deselecting)
the option, -ffrontend-loop-interchange.  The reason for
this is simple: It is always possible that the heurisics in the
patch might make a bad choice, and the user should be able to
deselect this optimization when he has already optimized loop
ordering in his code.  The new option is selected when
optimizing, the same way that -ffrontend-optimize is.

No test case because I could not think of anything
that could test the nesting of loops.

Regression-tested. OK for trunk?

Regards

	Thomas

2017-10-31  Thomas Koenig  <tkoenig@gcc.gnu.org>

         * lang.opt (ffrontend-loop-interchange): New option.
         * options.c (gfc_post_options): Handle it.
         * 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p3.diff
Type: text/x-patch
Size: 9224 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171031/4547cb41/attachment.bin>


More information about the Fortran mailing list