From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 465633858439 for ; Wed, 6 Jul 2022 10:31:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 465633858439 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.92,249,1650960000"; d="scan'208,223";a="78258975" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 06 Jul 2022 02:30:59 -0800 IronPort-SDR: zmZpP0NTZszcZlmajaSMPg6fIedRx6mcZlePem2VaIdC9IPOd2TdTOXwK6cynCSiIEzeNe4Nd7 B+74Hswm0xSyX9LyzRJEoBBe45CK8jI7G/SPB2WwTw08pj9ba18lBYqDNXWHWKMLxqRT5Z//dD iLqrzg1QCteNJ31Nth2+MvRzdmEU3/86WIG1oCJ+mkGa6MkwjtWCfrYBoJkmIiOKaOPXvPX8aS nGzCqXWyOrcM5UJQyMEseZgBDLgE3zjjmYaEJ+oluCxSiE+NwbFE9HfJx6lt0Pg5f7qIpy8Qbi 0u8= From: Thomas Schwinge To: Tobias Burnus , CC: Jakub Jelinek Subject: Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place (was: [Patch] OpenMP: Move omp requires checks to libgomp) In-Reply-To: <07fec82a-41cf-fdc5-6307-c068dd95ef1a@mentor.com> References: <4273bf27-3f0e-0066-393b-2a561a7b9e12@codesourcery.com> <07fec82a-41cf-fdc5-6307-c068dd95ef1a@mentor.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Wed, 6 Jul 2022 12:30:47 +0200 Message-ID: <87wncq4joo.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2022 10:31:07 -0000 --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2022-06-08T05:56:02+0200, Tobias Burnus wrote= : > This is based on Chung-Lin's patch at https://gcc.gnu.org/pipermail/gcc-p= atches/2021-January/563393.html > --- a/include/gomp-constants.h > +++ b/include/gomp-constants.h > +/* Flag values for requires-directive features, must match corresponding > + OMP_REQUIRES_* values in gcc/omp-general.h. */ > +#define GOMP_REQUIRES_UNIFIED_ADDRESS 0x10 > +#define GOMP_REQUIRES_UNIFIED_SHARED_MEMORY 0x20 > +#define GOMP_REQUIRES_REVERSE_OFFLOAD 0x80 To make things more failure proof, OK to push the attached "Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place"? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Define-OMP_REQUIRES_-.-GOMP_REQUIRES_-.-in-a-single-.patch" >From bd1aa5bc96e141a85bb53d61a5c7531e09ea3cf6 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 5 Jul 2022 11:04:46 +0200 Subject: [PATCH] Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place Clean up for recent commit 683f11843974f0bdf42f79cdcbb0c2b43c7b81b0 "OpenMP: Move omp requires checks to libgomp". gcc/ * omp-general.h (enum omp_requires): Use 'GOMP_REQUIRES_[...]'. include/ * gomp-constants.h (OMP_REQUIRES_[...]): Update comment. --- gcc/omp-general.h | 8 ++++---- include/gomp-constants.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/omp-general.h b/gcc/omp-general.h index 7a94831e8f5..74e90e1a71a 100644 --- a/gcc/omp-general.h +++ b/gcc/omp-general.h @@ -126,12 +126,12 @@ extern int oacc_get_ifn_dim_arg (const gimple *stmt); enum omp_requires { OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER = 0xf, - OMP_REQUIRES_UNIFIED_ADDRESS = 0x10, - OMP_REQUIRES_UNIFIED_SHARED_MEMORY = 0x20, + OMP_REQUIRES_UNIFIED_ADDRESS = GOMP_REQUIRES_UNIFIED_ADDRESS, + OMP_REQUIRES_UNIFIED_SHARED_MEMORY = GOMP_REQUIRES_UNIFIED_SHARED_MEMORY, OMP_REQUIRES_DYNAMIC_ALLOCATORS = 0x40, - OMP_REQUIRES_REVERSE_OFFLOAD = 0x80, + OMP_REQUIRES_REVERSE_OFFLOAD = GOMP_REQUIRES_REVERSE_OFFLOAD, OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER_USED = 0x100, - OMP_REQUIRES_TARGET_USED = 0x200 + OMP_REQUIRES_TARGET_USED = GOMP_REQUIRES_TARGET_USED, }; extern GTY(()) enum omp_requires omp_requires_mask; diff --git a/include/gomp-constants.h b/include/gomp-constants.h index 3e3078f082e..84316f953d0 100644 --- a/include/gomp-constants.h +++ b/include/gomp-constants.h @@ -341,8 +341,7 @@ enum gomp_map_kind #define GOMP_DEPEND_MUTEXINOUTSET 4 #define GOMP_DEPEND_INOUTSET 5 -/* Flag values for requires-directive features, must match corresponding - OMP_REQUIRES_* values in gcc/omp-general.h. */ +/* Flag values for OpenMP 'requires' directive features. */ #define GOMP_REQUIRES_UNIFIED_ADDRESS 0x10 #define GOMP_REQUIRES_UNIFIED_SHARED_MEMORY 0x20 #define GOMP_REQUIRES_REVERSE_OFFLOAD 0x80 -- 2.35.1 --=-=-=--