summaryrefslogtreecommitdiff
path: root/gcc/fortran/invoke.texi
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2017-11-05 17:24:37 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2017-11-05 17:24:37 +0000
commitd88412fc5139a0dbecbc8e61a817a088037501f6 (patch)
treea619106d5d0f15135e88affa6a1b775ec677d5c2 /gcc/fortran/invoke.texi
parent5233d45559d5869fe7dc9705d6c79e6538d8a2ab (diff)
downloadgcc-d88412fc5139a0dbecbc8e61a817a088037501f6.tar.gz
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/invoke.texi')
-rw-r--r--gcc/fortran/invoke.texi21
1 files changed, 19 insertions, 2 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 261f2535bb5..bcb62434931 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -149,8 +149,9 @@ and warnings}.
-Wdo-subscript -Wfunction-elimination -Wimplicit-interface @gol
-Wimplicit-procedure -Wintrinsic-shadow -Wuse-without-only -Wintrinsics-std @gol
-Wline-truncation -Wno-align-commons -Wno-tabs -Wreal-q-constant @gol
--Wsurprising -Wunderflow -Wunused-parameter -Wrealloc-lhs -Wrealloc-lhs-all @gol
--Wtarget-lifetime -fmax-errors=@var{n} -fsyntax-only -pedantic -pedantic-errors
+-Wsurprising -Wunderflow -Wunused-parameter -Wrealloc-lhs @gol
+-Wrealloc-lhs-all -Wfrontend-loop-interchange -Wtarget-lifetime @gol
+-fmax-errors=@var{n} -fsyntax-only -pedantic -pedantic-errors @gol
}
@item Debugging Options
@@ -183,6 +184,7 @@ and warnings}.
-fbounds-check -fcheck-array-temporaries @gol
-fcheck=@var{<all|array-temps|bounds|do|mem|pointer|recursion>} @gol
-fcoarray=@var{<none|single|lib>} -fexternal-blas -ff2c
+-ffrontend-loop-interchange @gol
-ffrontend-optimize @gol
-finit-character=@var{n} -finit-integer=@var{n} -finit-local-zero @gol
-finit-derived @gol
@@ -910,6 +912,13 @@ Enables some warning options for usages of language features which
may be problematic. This currently includes @option{-Wcompare-reals},
@option{-Wunused-parameter} and @option{-Wdo-subscript}.
+@item -Wfrontend-loop-interchange
+@opindex @code{Wfrontend-loop-interchange}
+@cindex warnings, loop interchange
+@cindex loop interchange, warning
+Enable warning for loop interchanges performed by the
+@option{-ffrontend-loop-interchange} option.
+
@item -Wimplicit-interface
@opindex @code{Wimplicit-interface}
@cindex warnings, implicit interface
@@ -1782,6 +1791,14 @@ expressions, removing unnecessary calls to @code{TRIM} in comparisons
and assignments and replacing @code{TRIM(a)} with
@code{a(1:LEN_TRIM(a))}. It can be deselected by specifying
@option{-fno-frontend-optimize}.
+
+@item -ffrontend-loop-interchange
+@opindex @code{frontend-loop-interchange}
+@cindex loop interchange, Fortran
+Attempt to interchange loops in the Fortran front end where
+profitable. Enabled by default by any @option{-O} option.
+At the moment, this option only affects @code{FORALL} and
+@code{DO CONCURRENT} statements with several forall triplets.
@end table
@xref{Code Gen Options,,Options for Code Generation Conventions,