Re: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-11-02 Thread Bernhard Reutner-Fischer
On May 28, 2015 2:03:08 PM GMT+02:00, Mike Stump  wrote:
>On May 28, 2015, at 2:02 AM, Bernhard Reutner-Fischer
> wrote:
>> 
>> Does anybody have a better suggestion?
>> 
>> directive not at the start of a loop at %C
>> directive not followed by a loop at %C
>
>I prefer either of these.  I have a slight preference for the first.

I've changed the Fortran error to the first locally.

>
>> Mike, did you tweak the one or two things you got from the reviews
>> yet?
>
>Nope.
>
>> ISTM your main patch was not OKed yet nor installed.
>
>Been busy with work.  I’ll come back and address the nits that people
>pointed out and see if I can ping it some more and try and get the C++
>bits reviewed.

I take it you're well aware that stage 1 will end in a couple of weeks, and 
maybe you want to have this in GCC-6, so now would be the perfect time.. :)

Cheers,




Re: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-05-28 Thread Bernhard Reutner-Fischer
On 3 February 2015 at 01:07, Mike Stump mikest...@comcast.net wrote:
 On Feb 2, 2015, at 3:22 PM, Bernhard Reutner-Fischer rep.dot@gmail.com 
 wrote:
 Untested draft patch

 I looked it over, seems to slot in nicely.


 +   gfc_error (%GCC unroll% directive does not commence a loop at %C”);

 So, don’t like commence here.

Does anybody have a better suggestion?

directive not at the start of a loop at %C
directive not followed by a loop at %C

dunno..

Mike, did you tweak the one or two things you got from the reviews
yet? ISTM your
main patch was not OKed yet nor installed.

thanks,


Re: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-05-28 Thread Mike Stump
On May 28, 2015, at 2:02 AM, Bernhard Reutner-Fischer rep.dot@gmail.com 
wrote:
 
 Does anybody have a better suggestion?
 
 directive not at the start of a loop at %C
 directive not followed by a loop at %C

I prefer either of these.  I have a slight preference for the first.

 Mike, did you tweak the one or two things you got from the reviews
 yet?

Nope.

 ISTM your main patch was not OKed yet nor installed.

Been busy with work.  I’ll come back and address the nits that people pointed 
out and see if I can ping it some more and try and get the C++ bits reviewed.

Re: [PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-02-02 Thread Mike Stump
On Feb 2, 2015, at 3:22 PM, Bernhard Reutner-Fischer rep.dot@gmail.com 
wrote:
 Untested draft patch

I looked it over, seems to slot in nicely.


+   gfc_error (%GCC unroll% directive does not commence a loop at %C”);

So, don’t like commence here.


[PATCH, RFC] fortran [was Re: #pragma GCC unroll support]

2015-02-02 Thread Bernhard Reutner-Fischer
Hi,

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 (
https://gcc.gnu.org/ml/gcc-patches/2015-01/msg02733.html ).

Just stage-1 tinkering here.

Cheers,

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

-- 
2.1.4