This is the mail archive of the
mailing list for the GCC project.
[PATCH, RFC] fortran [was Re: #pragma GCC unroll support]
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Tue, 3 Feb 2015 00:22:03 +0100
- Subject: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]
- Authentication-results: sourceware.org; auth=none
- References: <23C2D250-F856-48E2-A460-1FC4674A60FB at comcast dot net>
Some compilers IIRC use !DIR$ unroll, if memory serves me right then
the DEC compiler had !DEC$ unroll.
We could support one or the other three-letter keyword or maybe not.
I think a combination of unroll and ivdep directives is allowed (at
least in some compilers); TODO.
Not sure what other statements should be annotated with that directive?
I do not like the global variable directive_unroll but is was the easy
way out for cheap warnings.
Untested draft patch, regstrap running over night, depends on Mike's
unroll-5.diffs.txt patch in this thread (
Just stage-1 tinkering here.
Bernhard Reutner-Fischer (1):
fortran: !GCC$ unroll for DO
gcc/fortran/decl.c | 38 ++++++++++++++++++++
gcc/fortran/gfortran.h | 2 ++
gcc/fortran/match.h | 1 +
gcc/fortran/parse.c | 13 ++++++-
gcc/fortran/trans-decl.c | 7 ++++
gcc/fortran/trans-stmt.c | 14 ++++++++
gcc/fortran/trans.h | 3 ++
gcc/testsuite/gfortran.dg/directive_unroll_1.f90 | 46 ++++++++++++++++++++++++
gcc/testsuite/gfortran.dg/directive_unroll_2.f90 | 39 ++++++++++++++++++++
9 files changed, 162 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gfortran.dg/directive_unroll_1.f90
create mode 100644 gcc/testsuite/gfortran.dg/directive_unroll_2.f90