From 44319903056adfd1ce6264d05a9487de5daea058 Mon Sep 17 00:00:00 2001 From: tkoenig Date: Sun, 5 Nov 2017 17:24:37 +0000 Subject: 2017-11-05 Thomas Koenig 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 PR fortran/82471 * gfortran.dg/loop_interchange_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254430 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/lang.opt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/fortran/lang.opt') diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index 88f6af57ee8..780335f3de7 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- 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. -- cgit v1.2.1