From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115633 invoked by alias); 17 Mar 2016 14:34:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 115612 invoked by uid 89); 17 Mar 2016 14:34:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=spc, 23PM, 23pm, 1259 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 17 Mar 2016 14:34:22 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1agZ0F-0004kW-1v from Thomas_Schwinge@mentor.com ; Thu, 17 Mar 2016 07:34:19 -0700 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Thu, 17 Mar 2016 07:34:18 -0700 Received: by tftp-cs (Postfix, from userid 49978) id 2AB8FC1CD1; Thu, 17 Mar 2016 07:34:18 -0700 (PDT) From: Thomas Schwinge To: Jakub Jelinek , CC: Kirill Yukhin , Ilya Verbin Subject: Re: [gomp4.1] map clause parsing improvements In-Reply-To: <20151019103408.GP478@tucnak.redhat.com> References: <20150429111406.GE1751@tucnak.redhat.com> <874mnzrw1z.fsf@schwinge.name> <20150429120644.GG1751@tucnak.redhat.com> <20150609183608.GA47936@msticlxl57.ims.intel.com> <20150611121420.GY10247@tucnak.redhat.com> <87zizf9n2w.fsf@kepler.schwinge.homeip.net> <20151019103408.GP478@tucnak.redhat.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (i586-pc-linux-gnu) Date: Thu, 17 Mar 2016 14:34:00 -0000 Message-ID: <877fh1tbq6.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2016-03/txt/msg01003.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 7970 Hi! On Mon, 19 Oct 2015 12:34:08 +0200, Jakub Jelinek wrote: > On Mon, Oct 19, 2015 at 12:20:23PM +0200, Thomas Schwinge wrote: > > > @@ -77,7 +79,21 @@ enum gomp_map_kind > > > + /* OpenMP 4.1 alias for forced deallocation. */ > > > + GOMP_MAP_DELETE =3D GOMP_MAP_FORCE_DEALLOC, > >=20 > > To avoid confusion about two different identifiers naming the same > > functionality, I'd prefer to avoid such aliases ("GOMP_MAP_DELETE =3D > > GOMP_MAP_FORCE_DEALLOC"), and instead just rename GOMP_MAP_FORCE_DEALLOC > > to GOMP_MAP_DELETE, if that's the name you prefer. >=20 > If you are ok with removing GOMP_MAP_FORCE_DEALLOC and just use > GOMP_MAP_DELETE, that is ok by me, just post a patch. That's simple enouch; OK to commit? (I'm also including the related change, to rename the Fortran OMP_MAP_FORCE_DEALLOC to OMP_MAP_DELETE, because I think that's what you'd do, once starting the OpenMP 4.5 Fortran front end work.) commit d60e36a2a935a9319602221360b1a6abf282f434 Author: Thomas Schwinge Date: Wed Mar 16 18:10:26 2016 +0100 Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE =20=20=20=20 Also rename the Fortran OMP_MAP_FORCE_DEALLOC to OMP_MAP_DELETE. =20=20=20=20 include/ * gomp-constants.h (enum gomp_map_kind): Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE. Adjust all users. =20=20=20=20 gcc/fortran/ * gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC to OMP_MAP_DELETE. Adjust all users. --- gcc/c/c-parser.c | 2 +- gcc/cp/parser.c | 2 +- gcc/fortran/gfortran.h | 2 +- gcc/fortran/openmp.c | 2 +- gcc/fortran/trans-openmp.c | 6 +++--- gcc/gimplify.c | 2 +- gcc/omp-low.c | 2 +- gcc/tree-pretty-print.c | 2 +- include/gomp-constants.h | 6 ++---- libgomp/oacc-parallel.c | 6 +++--- 10 files changed, 15 insertions(+), 17 deletions(-) diff --git gcc/c/c-parser.c gcc/c/c-parser.c index 60ec996..82d6eca 100644 --- gcc/c/c-parser.c +++ gcc/c/c-parser.c @@ -10715,7 +10715,7 @@ c_parser_oacc_data_clause (c_parser *parser, pragma= _omp_clause c_kind, kind =3D GOMP_MAP_FORCE_ALLOC; break; case PRAGMA_OACC_CLAUSE_DELETE: - kind =3D GOMP_MAP_FORCE_DEALLOC; + kind =3D GOMP_MAP_DELETE; break; case PRAGMA_OACC_CLAUSE_DEVICE: kind =3D GOMP_MAP_FORCE_TO; diff --git gcc/cp/parser.c gcc/cp/parser.c index 62570d4..8ba4ffe 100644 --- gcc/cp/parser.c +++ gcc/cp/parser.c @@ -30086,7 +30086,7 @@ cp_parser_oacc_data_clause (cp_parser *parser, prag= ma_omp_clause c_kind, kind =3D GOMP_MAP_FORCE_ALLOC; break; case PRAGMA_OACC_CLAUSE_DELETE: - kind =3D GOMP_MAP_FORCE_DEALLOC; + kind =3D GOMP_MAP_DELETE; break; case PRAGMA_OACC_CLAUSE_DEVICE: kind =3D GOMP_MAP_FORCE_TO; diff --git gcc/fortran/gfortran.h gcc/fortran/gfortran.h index 33fffd8..a0fb5fd 100644 --- gcc/fortran/gfortran.h +++ gcc/fortran/gfortran.h @@ -1112,8 +1112,8 @@ enum gfc_omp_map_op OMP_MAP_TO, OMP_MAP_FROM, OMP_MAP_TOFROM, + OMP_MAP_DELETE, OMP_MAP_FORCE_ALLOC, - OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM, diff --git gcc/fortran/openmp.c gcc/fortran/openmp.c index 51ab96e..a6c39cd 100644 --- gcc/fortran/openmp.c +++ gcc/fortran/openmp.c @@ -764,7 +764,7 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, uint64_t m= ask, if ((mask & OMP_CLAUSE_DELETE) && gfc_match ("delete ( ") =3D=3D MATCH_YES && gfc_match_omp_map_clause (&c->lists[OMP_LIST_MAP], - OMP_MAP_FORCE_DEALLOC)) + OMP_MAP_DELETE)) continue; if ((mask & OMP_CLAUSE_PRESENT) && gfc_match ("present ( ") =3D=3D MATCH_YES diff --git gcc/fortran/trans-openmp.c gcc/fortran/trans-openmp.c index 5990202..a905ca6 100644 --- gcc/fortran/trans-openmp.c +++ gcc/fortran/trans-openmp.c @@ -2119,12 +2119,12 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_= clauses *clauses, case OMP_MAP_TOFROM: OMP_CLAUSE_SET_MAP_KIND (node, GOMP_MAP_TOFROM); break; + case OMP_MAP_DELETE: + OMP_CLAUSE_SET_MAP_KIND (node, GOMP_MAP_DELETE); + break; case OMP_MAP_FORCE_ALLOC: OMP_CLAUSE_SET_MAP_KIND (node, GOMP_MAP_FORCE_ALLOC); break; - case OMP_MAP_FORCE_DEALLOC: - OMP_CLAUSE_SET_MAP_KIND (node, GOMP_MAP_FORCE_DEALLOC); - break; case OMP_MAP_FORCE_TO: OMP_CLAUSE_SET_MAP_KIND (node, GOMP_MAP_FORCE_TO); break; diff --git gcc/gimplify.c gcc/gimplify.c index f3e5c39..3687e7a 100644 --- gcc/gimplify.c +++ gcc/gimplify.c @@ -8194,7 +8194,7 @@ gimplify_oacc_declare_1 (tree clause) case GOMP_MAP_ALLOC: case GOMP_MAP_FORCE_ALLOC: case GOMP_MAP_FORCE_TO: - new_op =3D GOMP_MAP_FORCE_DEALLOC; + new_op =3D GOMP_MAP_DELETE; ret =3D true; break; =20 diff --git gcc/omp-low.c gcc/omp-low.c index 82dec9d..3fd6eb3 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -15746,7 +15746,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_= context *ctx) case GOMP_MAP_TOFROM: case GOMP_MAP_POINTER: case GOMP_MAP_TO_PSET: - case GOMP_MAP_FORCE_DEALLOC: + case GOMP_MAP_DELETE: case GOMP_MAP_RELEASE: case GOMP_MAP_ALWAYS_TO: case GOMP_MAP_ALWAYS_FROM: diff --git gcc/tree-pretty-print.c gcc/tree-pretty-print.c index 9c13d84..39e3691 100644 --- gcc/tree-pretty-print.c +++ gcc/tree-pretty-print.c @@ -621,7 +621,7 @@ dump_omp_clause (pretty_printer *pp, tree clause, int s= pc, int flags) case GOMP_MAP_FORCE_PRESENT: pp_string (pp, "force_present"); break; - case GOMP_MAP_FORCE_DEALLOC: + case GOMP_MAP_DELETE: pp_string (pp, "delete"); break; case GOMP_MAP_FORCE_DEVICEPTR: diff --git include/gomp-constants.h include/gomp-constants.h index a8e7723..e31c2e0 100644 --- include/gomp-constants.h +++ include/gomp-constants.h @@ -67,7 +67,7 @@ enum gomp_map_kind /* Must already be present. */ GOMP_MAP_FORCE_PRESENT =3D (GOMP_MAP_FLAG_SPECIAL_0 | 2), /* Deallocate a mapping, without copying from device. */ - GOMP_MAP_FORCE_DEALLOC =3D (GOMP_MAP_FLAG_SPECIAL_0 | 3), + GOMP_MAP_DELETE =3D (GOMP_MAP_FLAG_SPECIAL_0 | 3), /* Is a device pointer. OMP_CLAUSE_SIZE for these is unused; is impli= citly POINTER_SIZE_UNITS. */ GOMP_MAP_FORCE_DEVICEPTR =3D (GOMP_MAP_FLAG_SPECIAL_1 | 0), @@ -125,11 +125,9 @@ enum gomp_map_kind GOMP_MAP_DELETE_ZERO_LEN_ARRAY_SECTION =3D (GOMP_MAP_FLAG_SPECIAL_2 | GOMP_MAP_FLAG_SPECIAL | 3), - /* OpenMP 4.5 alias for forced deallocation. */ - GOMP_MAP_DELETE =3D GOMP_MAP_FORCE_DEALLOC, /* Decrement usage count and deallocate if zero. */ GOMP_MAP_RELEASE =3D (GOMP_MAP_FLAG_SPECIAL_2 - | GOMP_MAP_FORCE_DEALLOC), + | GOMP_MAP_DELETE), =20 /* Internal to GCC, not used in libgomp. */ /* Do not map, but pointer assign a pointer instead. */ diff --git libgomp/oacc-parallel.c libgomp/oacc-parallel.c index f795bf7..1fdb01d 100644 --- libgomp/oacc-parallel.c +++ libgomp/oacc-parallel.c @@ -307,7 +307,7 @@ GOACC_enter_exit_data (int device, size_t mapnum, break; } =20 - if (kind =3D=3D GOMP_MAP_FORCE_DEALLOC + if (kind =3D=3D GOMP_MAP_DELETE || kind =3D=3D GOMP_MAP_FORCE_FROM) break; =20 @@ -374,7 +374,7 @@ GOACC_enter_exit_data (int device, size_t mapnum, =3D=3D GOMP_MAP_FORCE_FROM, async, 1); break; - case GOMP_MAP_FORCE_DEALLOC: + case GOMP_MAP_DELETE: acc_delete (hostaddrs[i], sizes[i]); break; case GOMP_MAP_FORCE_FROM: @@ -522,10 +522,10 @@ GOACC_declare (int device, size_t mapnum, switch (kind) { case GOMP_MAP_FORCE_ALLOC: - case GOMP_MAP_FORCE_DEALLOC: case GOMP_MAP_FORCE_FROM: case GOMP_MAP_FORCE_TO: case GOMP_MAP_POINTER: + case GOMP_MAP_DELETE: GOACC_enter_exit_data (device, 1, &hostaddrs[i], &sizes[i], &kinds[i], 0, 0); break; Gr=C3=BC=C3=9Fe Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJW6sBhAAoJEK3/DN1sMFFt2TgH/judKwbN89E3i3g3ZJeZNaMd HCJgjBmKTDFcot1a2YJjK0OcOGrfCkgdBfRB5OlGsSIe56yAu06tvVlJTr8dnO0o 2b1uI96jVzC001icdHfmP0892dBZXGwaRhKrT3yBGR0CKSbVkM+2OvsL/dbfMOiL 4jp4WK2HbqDeZSo/mWy7sylJwrTf02MlKfSu6/hDtMqAZNoZwc1yAZbS15sDTlW/ awSchwZSyZqlejaQlTL2ilNxa0IzVqrEqFtaUfgi13f1+vi+S1qphWZIKAH0epwM SLxeouE9klVNSSicgul7zY2QLc+Q43yrJrZVaWziSpUocidV41RY5tHOhpx0W2Y= =EeLT -----END PGP SIGNATURE----- --=-=-=--