From: Cesar Philippidis <cesar@codesourcery.com>
To: Fortran List <fortran@gcc.gnu.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: [patch,openacc] handle missing OMP_LIST_ clauses in fortran's parse tree debugger
Date: Thu, 20 Sep 2018 17:36:00 -0000 [thread overview]
Message-ID: <5701ec61-8c06-e590-9119-7d4199336e6b@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 346 bytes --]
This patch updates Fortran's parse tree printer to print the names of
new OpenACC data clauses. I'm not if this functionality is widely used
or not, but from a standpoint of correctness, this patch would probably
be nice to have.
It this patch OK for trunk? I bootstrapped and regtested it for x86_64
Linux with nvptx offloading.
Thanks,
Cesar
[-- Attachment #2: 0001-handle-missing-OMP_LIST_-clauses-in-fortran-s-parse-.patch --]
[-- Type: text/x-patch, Size: 2096 bytes --]
[OpenACC] handle missing OMP_LIST_ clauses in fortran's parse tree debugger
2018-XX-YY Cesar Philippidis <cesar@codesourcery.com>
gcc/fortran/
* dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
and reorder the switch cases to match the enum in gfortran.h.
(cherry picked from gomp-4_0-branch r228355, 159518d)
---
gcc/fortran/dump-parse-tree.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 2a28fa30986..f1be5a67a26 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1384,21 +1384,26 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
const char *type = NULL;
switch (list_type)
{
- case OMP_LIST_USE_DEVICE: type = "USE_DEVICE"; break;
- case OMP_LIST_DEVICE_RESIDENT: type = "USE_DEVICE"; break;
- case OMP_LIST_CACHE: type = ""; break;
case OMP_LIST_PRIVATE: type = "PRIVATE"; break;
case OMP_LIST_FIRSTPRIVATE: type = "FIRSTPRIVATE"; break;
case OMP_LIST_LASTPRIVATE: type = "LASTPRIVATE"; break;
+ case OMP_LIST_COPYPRIVATE: type = "COPYPRIVATE"; break;
case OMP_LIST_SHARED: type = "SHARED"; break;
case OMP_LIST_COPYIN: type = "COPYIN"; break;
case OMP_LIST_UNIFORM: type = "UNIFORM"; break;
case OMP_LIST_ALIGNED: type = "ALIGNED"; break;
case OMP_LIST_LINEAR: type = "LINEAR"; break;
+ case OMP_LIST_DEPEND: type = "DEPEND"; break;
+ case OMP_LIST_MAP: type = "MAP"; break;
+ case OMP_LIST_TO: type = "TO"; break;
+ case OMP_LIST_FROM: type = "FROM"; break;
case OMP_LIST_REDUCTION: type = "REDUCTION"; break;
+ case OMP_LIST_DEVICE_RESIDENT: type = "DEVICE_RESIDENT"; break;
+ case OMP_LIST_LINK: type = "LINK"; break;
+ case OMP_LIST_USE_DEVICE: type = "USE_DEVICE"; break;
+ case OMP_LIST_CACHE: type = "CACHE"; break;
case OMP_LIST_IS_DEVICE_PTR: type = "IS_DEVICE_PTR"; break;
case OMP_LIST_USE_DEVICE_PTR: type = "USE_DEVICE_PTR"; break;
- case OMP_LIST_DEPEND: type = "DEPEND"; break;
default:
gcc_unreachable ();
}
--
2.17.1
next reply other threads:[~2018-09-20 17:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 17:36 Cesar Philippidis [this message]
[not found] ` <CAGkQGiLr23XzayZ77i+sNnfgtTpj74Jvhq_2WyzriFo7JFkYfw@mail.gmail.com>
2018-09-20 18:53 ` Cesar Philippidis
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=5701ec61-8c06-e590-9119-7d4199336e6b@codesourcery.com \
--to=cesar@codesourcery.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/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).