From: Tobias Burnus <burnus@net-b.de>
To: Ilmir Usmanov <i.usmanov@samsung.com>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
Evgeny Gavrin <e.gavrin@samsung.com>,
GarbuzovViacheslav <v.garbuzov@samsung.com>,
Dmitri Botcharnikov <dmitry.b@samsung.com>,
gcc-patches@gcc.gnu.org, jakub@redhat.com, fortran@gcc.gnu.org
Subject: Re: [PATCH 1/4] [GOMP4] [Fortran] OpenACC 1.0+ support in fortran front-end
Date: Tue, 04 Mar 2014 17:20:00 -0000 [thread overview]
Message-ID: <53160B41.3060501@net-b.de> (raw)
In-Reply-To: <5315873E.4010203@samsung.com>
Hi Ilmir,
thanks for the update.
Ilmir Usmanov wrote:
>> I'd use "integer" instead of "INTEGER" as it is not a 'reserved' word
> OpenMP implementation uses capital letters, so, perhaps, we also
> should do this, for consistency?
Fine with me - I don't feel strong about it.
> OpenACC 1.0 support to fortran FE -- core.
>
> --- a/gcc/fortran/match.c
> +++ b/gcc/fortran/match.c
> @@ -2595,6 +2595,33 @@ match_exit_cycle (gfc_statement st, gfc_exec_op op)
> if (cnt > 0
> && o != NULL
> && o->state == COMP_OMP_STRUCTURED_BLOCK
> + && (o->head->op == EXEC_OACC_LOOP
> + || o->head->op == EXEC_OACC_PARALLEL_LOOP))
> + {
> + int collapse = 1;
> + gcc_assert (o->head->next != NULL
> + && (o->head->next->op == EXEC_DO
> + || o->head->next->op == EXEC_DO_WHILE)
> + && o->previous != NULL
> + && o->previous->tail->op == o->head->op);
> + if (o->previous->tail->ext.omp_clauses != NULL
> + && o->previous->tail->ext.omp_clauses->collapse > 1)
> + collapse = o->previous->tail->ext.omp_clauses->collapse;
> + if (st == ST_EXIT && cnt <= collapse)
> + {
> + gfc_error ("EXIT statement at %C terminating !$ACC LOOP loop");
> + return MATCH_ERROR;
> + }
> + if (st == ST_CYCLE && cnt < collapse)
> + {
> + gfc_error ("CYCLE statement at %C to non-innermost collapsed"
> + " !$ACC LOOP loop");
> + return MATCH_ERROR;
> + }
> + }
Can you - if you want as follow up patch - also handle the following
for both your OpenACC code and for the existing OpenMP code:
!$acc loop
outer_loop: do i = 1, n
inner_loop: do j = 1,m
! ...
cycle outer_loop
exit outer_loop
end do inner_loop
end do outer_loop
That's a new Fortran 2008 feature that CYCLE and EXIT can leave the
inner DO loop.
For DO CONCURRENT, that's already handled via the code in
"match_exit_cycle". If you want to try the do-concurrent code, replace
"inner_loop: do j = 1,m" by "inner_loop: do_concurrent(j=1:m)".
Otherwise, it looks good do me. I don't know whether Thomas has
additional comments.
Tobias
next prev parent reply other threads:[~2014-03-04 17:20 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 18:01 [PATCH] [GOMP4] " Ilmir Usmanov
2014-01-23 18:03 ` [PATCH 1/6] " Ilmir Usmanov
2014-01-23 18:03 ` [PATCH 2/6] " Ilmir Usmanov
2014-01-23 18:04 ` [PATCH 3/6] " Ilmir Usmanov
2014-01-23 18:05 ` [PATCH 4/6] " Ilmir Usmanov
2014-01-23 18:05 ` [PATCH 5/6] " Ilmir Usmanov
2014-01-23 18:06 ` [PATCH 6/6] " Ilmir Usmanov
2014-01-23 18:09 ` [PATCH 7/6] " Ilmir Usmanov
2014-01-24 19:33 ` [PATCH 4/6] " Thomas Schwinge
2014-11-05 16:29 ` [gomp4] OpenACC cache directive for C Thomas Schwinge
2014-11-05 16:36 ` [gomp4] OpenACC cache directive maintenance (was: [PATCH 4/6] [GOMP4] OpenACC 1.0+ support in fortran front-end) Thomas Schwinge
2014-11-05 16:45 ` [gomp4] OpenACC cache directive maintenance Thomas Schwinge
2015-10-27 15:26 ` [PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++ (was: [gomp4] OpenACC cache directive maintenance) Thomas Schwinge
2015-10-27 15:30 ` Jakub Jelinek
2015-10-27 17:03 ` [PR fortran/63865] OpenACC cache directive: match Fortran support with C/C++ Thomas Schwinge
2014-11-05 16:49 ` [gomp4] Testing of C/C++ OpenACC cache directive (was: OpenACC cache directive for C) Thomas Schwinge
2016-06-02 11:47 ` [PR c/71381] C/C++ OpenACC cache directive rejects valid syntax (was: [gomp4] OpenACC cache directive for C.) Thomas Schwinge
2016-06-08 13:29 ` [PING] [PR c/71381] C/C++ OpenACC cache directive rejects valid syntax Thomas Schwinge
2016-06-08 14:07 ` Jakub Jelinek
2016-06-10 10:32 ` Thomas Schwinge
2016-06-10 13:14 ` Thomas Schwinge
2016-06-10 20:40 ` Gerald Pfeifer
2014-01-24 20:47 ` [PATCH 2/6] [GOMP4] OpenACC 1.0+ support in fortran front-end Thomas Schwinge
2014-01-24 20:31 ` [PATCH 1/6] " Thomas Schwinge
2014-01-27 19:37 ` Tobias Burnus
2014-01-24 18:04 ` [PATCH] " Thomas Schwinge
2014-01-27 13:12 ` Ilmir Usmanov
2014-01-27 15:49 ` Thomas Schwinge
2014-01-27 16:35 ` Ilmir Usmanov
2014-01-31 11:14 ` Ilmir Usmanov
2014-01-31 11:16 ` [PATCH 1/6] " Ilmir Usmanov
2014-01-31 11:17 ` [PATCH 2/6] " Ilmir Usmanov
2014-01-31 11:18 ` [PATCH 3/6] " Ilmir Usmanov
2014-01-31 11:22 ` [PATCH 4/6] " Ilmir Usmanov
2014-01-31 11:34 ` [PATCH 5/6] " Ilmir Usmanov
2014-01-31 11:45 ` [PATCH 6/6] " Ilmir Usmanov
2014-02-09 23:43 ` [PATCH 5/6] " Tobias Burnus
2014-02-10 8:52 ` Thomas Schwinge
2014-02-10 9:34 ` Ilmir Usmanov
2014-02-10 23:13 ` Tobias Burnus
2014-02-10 9:45 ` Ilmir Usmanov
2014-02-10 10:52 ` Thomas Schwinge
2014-02-11 16:51 ` [PATCH 4/6] " Thomas Schwinge
2014-02-13 13:15 ` Ilmir Usmanov
2014-02-13 14:57 ` Thomas Schwinge
2014-02-14 5:45 ` Ilmir Usmanov
2014-02-21 19:29 ` [GOMP4] gimple_code_is_oacc -> is_gimple_omp_oacc_specifically (was: [PATCH 4/6] [GOMP4] OpenACC 1.0+ support in fortran front-end) Thomas Schwinge
2014-02-09 23:24 ` [PATCH 3/6] [GOMP4] OpenACC 1.0+ support in fortran front-end Tobias Burnus
2014-02-09 23:10 ` [PATCH 2/6] " Tobias Burnus
2014-02-10 9:10 ` Thomas Schwinge
2014-02-19 16:43 ` Ilmir Usmanov
2014-01-31 12:00 ` [PATCH 1/6] " Jakub Jelinek
2014-01-31 12:33 ` Ilmir Usmanov
2014-02-03 15:21 ` [PING] " Ilmir Usmanov
2014-02-09 22:22 ` Tobias Burnus
2014-02-19 15:34 ` Ilmir Usmanov
2014-02-19 23:52 ` Tobias Burnus
2014-02-20 8:19 ` Ilmir Usmanov
2014-03-04 7:56 ` [PATCH 1/4] [GOMP4] [Fortran] " Ilmir Usmanov
2014-03-04 7:57 ` Ilmir Usmanov
2014-03-04 7:57 ` [PATCH 2/4] " Ilmir Usmanov
2014-03-04 7:58 ` [PATCH 3/4] " Ilmir Usmanov
2014-03-04 7:59 ` [PATCH 4/4] " Ilmir Usmanov
2014-03-04 22:56 ` Tobias Burnus
2014-03-04 22:52 ` [PATCH 3/4] " Tobias Burnus
2014-03-04 17:20 ` Tobias Burnus [this message]
2014-03-07 10:44 ` [PATCH 1/4] " Ilmir Usmanov
2014-03-07 10:45 ` Ilmir Usmanov
2014-03-07 10:46 ` [PATCH 2/4] " Ilmir Usmanov
2014-03-07 10:46 ` [PATCH 3/4] " Ilmir Usmanov
2014-03-07 10:47 ` [PATCH 4/4] " Ilmir Usmanov
2014-03-08 17:55 ` Tobias Burnus
2014-03-20 10:53 ` Thomas Schwinge
2014-03-20 12:48 ` Ilmir Usmanov
2014-03-20 14:43 ` Jakub Jelinek
2014-03-08 17:19 ` [PATCH 3/4] " Tobias Burnus
2014-03-08 19:55 ` [PATCH 2/4] " Tobias Burnus
2014-03-11 12:04 ` Ilmir Usmanov
2014-03-12 18:46 ` Tobias Burnus
2014-03-12 18:27 ` [PATCH 1/4] " Tobias Burnus
2014-03-13 9:41 ` Ilmir Usmanov
2014-03-13 11:43 ` Thomas Schwinge
2014-03-13 13:24 ` Ilmir Usmanov
2014-03-13 14:13 ` Ilmir Usmanov
2014-03-16 19:46 ` Tobias Burnus
2014-03-16 20:44 ` Thomas Schwinge
2014-04-05 10:40 ` Thomas Schwinge
2014-03-10 15:44 ` Thomas Schwinge
2014-03-04 17:42 ` Tobias Burnus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53160B41.3060501@net-b.de \
--to=burnus@net-b.de \
--cc=dmitry.b@samsung.com \
--cc=e.gavrin@samsung.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=i.usmanov@samsung.com \
--cc=jakub@redhat.com \
--cc=thomas@codesourcery.com \
--cc=v.garbuzov@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).