From: Kwok Cheung Yeung <kcy@codesourcery.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>, <tobias@codesourcery.com>
Subject: Re: [OG12][committed] openmp: Add support for the 'present' modifier
Date: Wed, 15 Feb 2023 00:00:01 +0000 [thread overview]
Message-ID: <7b174fdf-8440-e50d-e867-cbdbf0816ae0@codesourcery.com> (raw)
In-Reply-To: <049a4654-2596-1913-20fc-1aeea48eb3ec@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
Hi
I have also committed the following patch to devel/omp/gcc-12 to show
the 'present' modifier in the Fortran parse tree dump.
e7279cc2eda openmp: Add support for 'present' modifier in the Fortran
parse tree dump
Kwok
[-- Attachment #2: 0001-openmp-Add-support-for-present-modifier-in-the-Fortr.patch --]
[-- Type: text/plain, Size: 3001 bytes --]
From e7279cc2eda2a0c50cff19ee4e02eea3d7808f68 Mon Sep 17 00:00:00 2001
From: Kwok Cheung Yeung <kcy@codesourcery.com>
Date: Tue, 14 Feb 2023 21:24:19 +0000
Subject: [PATCH] openmp: Add support for 'present' modifier in the Fortran
parse tree dump
2023-02-14 Kwok Cheung Yeung <kcy@codesourcery.com>
gcc/fortran/
* dump-parse-tree.cc (show_omp_namelist): Display 'present' map
modifier.
(show_omp_clauses): Display 'present' motion modifier for 'to'
and 'from' clauses.
---
gcc/fortran/ChangeLog.omp | 7 +++++++
gcc/fortran/dump-parse-tree.cc | 15 +++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/gcc/fortran/ChangeLog.omp b/gcc/fortran/ChangeLog.omp
index 44bc0ea1e2a..579d8ee7c97 100644
--- a/gcc/fortran/ChangeLog.omp
+++ b/gcc/fortran/ChangeLog.omp
@@ -1,3 +1,10 @@
+2023-02-14 Kwok Cheung Yeung <kcy@codesourcery.com>
+
+ * dump-parse-tree.cc (show_omp_namelist): Display 'present' map
+ modifier.
+ (show_omp_clauses): Display 'present' motion modifier for 'to'
+ and 'from' clauses.
+
2023-02-09 Kwok Cheung Yeung <kcy@codesourcery.com>
* gfortran.h (enum gfc_omp_map_op): Add entries with 'present'
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc
index 4da4d813d1d..7dad3ac0307 100644
--- a/gcc/fortran/dump-parse-tree.cc
+++ b/gcc/fortran/dump-parse-tree.cc
@@ -1453,9 +1453,20 @@ show_omp_namelist (int list_type, gfc_omp_namelist *n)
case OMP_MAP_TO: fputs ("to:", dumpfile); break;
case OMP_MAP_FROM: fputs ("from:", dumpfile); break;
case OMP_MAP_TOFROM: fputs ("tofrom:", dumpfile); break;
+ case OMP_MAP_PRESENT_ALLOC: fputs ("present,alloc:", dumpfile); break;
+ case OMP_MAP_PRESENT_TO: fputs ("present,to:", dumpfile); break;
+ case OMP_MAP_PRESENT_FROM: fputs ("present,from:", dumpfile); break;
+ case OMP_MAP_PRESENT_TOFROM:
+ fputs ("present,tofrom:", dumpfile); break;
case OMP_MAP_ALWAYS_TO: fputs ("always,to:", dumpfile); break;
case OMP_MAP_ALWAYS_FROM: fputs ("always,from:", dumpfile); break;
case OMP_MAP_ALWAYS_TOFROM: fputs ("always,tofrom:", dumpfile); break;
+ case OMP_MAP_ALWAYS_PRESENT_TO:
+ fputs ("always,present,to:", dumpfile); break;
+ case OMP_MAP_ALWAYS_PRESENT_FROM:
+ fputs ("always,present,from:", dumpfile); break;
+ case OMP_MAP_ALWAYS_PRESENT_TOFROM:
+ fputs ("always,present,tofrom:", dumpfile); break;
case OMP_MAP_DELETE: fputs ("delete:", dumpfile); break;
case OMP_MAP_RELEASE: fputs ("release:", dumpfile); break;
default: break;
@@ -1793,6 +1804,10 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
fputs ("inscan, ", dumpfile);
if (list_type == OMP_LIST_REDUCTION_TASK)
fputs ("task, ", dumpfile);
+ if ((list_type == OMP_LIST_TO || list_type == OMP_LIST_FROM)
+ && omp_clauses->lists[list_type]->u.motion_modifier
+ == OMP_MOTION_PRESENT)
+ fputs ("present:", dumpfile);
show_omp_namelist (list_type, omp_clauses->lists[list_type]);
fputc (')', dumpfile);
}
--
2.34.1
next prev parent reply other threads:[~2023-02-15 0:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 13:44 [PATCH] openmp: Add support for " Kwok Cheung Yeung
2023-02-09 21:17 ` [OG12][committed] openmp: Add support for the " Kwok Cheung Yeung
2023-02-14 22:44 ` [og12] Address cast to pointer from integer of different size in 'libgomp/target.c:gomp_target_rev' (was: [OG12][committed] openmp: Add support for the 'present' modifier) Thomas Schwinge
2023-02-15 0:00 ` Kwok Cheung Yeung [this message]
2023-02-15 19:02 ` [og12] Fix 'libgomp.{c-c++-common,fortran}/target-present-*' test cases " Thomas Schwinge
2023-06-07 11:25 ` [committed] testsuite/libgomp.*/target-present-*.{c,f90}: Improve and fix (was: Re: [og12] Fix 'libgomp.{c-c++-common,fortran}/target-present-*' test cases) Tobias Burnus
2023-06-07 11:26 ` Tobias Burnus
2023-06-12 16:44 ` [committed] OpenMP: Cleanups related to the 'present' modifier Tobias Burnus
2023-06-14 8:42 ` Thomas Schwinge
2023-06-14 10:00 ` Tobias Burnus
2023-02-17 11:45 ` [PATCHv2] openmp: Add support for " Kwok Cheung Yeung
2023-04-28 17:26 ` Tobias Burnus
2023-06-06 14:55 ` [committed] " 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=7b174fdf-8440-e50d-e867-cbdbf0816ae0@codesourcery.com \
--to=kcy@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=tobias@codesourcery.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).