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 D11FB385801A for ; Wed, 6 Jul 2022 13:41:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D11FB385801A 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,250,1650960000"; d="scan'208";a="78267846" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 06 Jul 2022 05:41:03 -0800 IronPort-SDR: jwA79C6VXEoqqSNo0TPNZ8WAXkeEY4AVXOJAlCgoSIE7lu/SnGf233T1iolwx5s2HzkkPyGjCj VACuz8RH/csvZ2PmrgXf1oJltinh40s54r0hyk3FmCmUq/r2Hpksa+yem+itn39Y0n++Iagwwe t/uYpxWmH1Gxq3tWGTQFbhoGH5rIWJ2Od8GqxLqpiegKcu1QOINor6s9BfR+xknlHrraWMyv/g uP0GrmoKETPNVnq7Oo5gtTorl9FBoOfE+fNTW+55Gu4tBXmpw9xBFR5hkZVk+/myV8NfzeDJ6C i7w= Message-ID: <9761d1f9-c16e-2d53-8e20-ff6c00baee98@codesourcery.com> Date: Wed, 6 Jul 2022 15:40:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place (was: [Patch] OpenMP: Move omp requires checks to libgomp) Content-Language: en-US To: Thomas Schwinge , Tobias Burnus , CC: Jakub Jelinek References: <4273bf27-3f0e-0066-393b-2a561a7b9e12@codesourcery.com> <07fec82a-41cf-fdc5-6307-c068dd95ef1a@mentor.com> <87wncq4joo.fsf@euler.schwinge.homeip.net> From: Tobias Burnus In-Reply-To: <87wncq4joo.fsf@euler.schwinge.homeip.net> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, 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 13:41:07 -0000 Hi Thomas, On 06.07.22 12:30, Thomas Schwinge wrote: > On 2022-06-08T05:56:02+0200, Tobias Burnus > wrote: >> [..] > To make things more failure proof, OK to push the attached > "Define 'OMP_REQUIRES_[...]', 'GOMP_REQUIRES_[...]' in a single place"? I concur that it makes sense to avoid having multiple definitions, especially as I can imagine that we might want to use this flag to pass other options to the library - e.g. some of the command-line pinning flags, proposed (and used in the OG11/OG12 branch). Thus, the following is ok/makes sense from my point of view. > 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 =3D 0xf, > - OMP_REQUIRES_UNIFIED_ADDRESS =3D 0x10, > - OMP_REQUIRES_UNIFIED_SHARED_MEMORY =3D 0x20, > + OMP_REQUIRES_UNIFIED_ADDRESS =3D GOMP_REQUIRES_UNIFIED_ADDRESS, > + OMP_REQUIRES_UNIFIED_SHARED_MEMORY =3D GOMP_REQUIRES_UNIFIED_SHARED_ME= MORY, > OMP_REQUIRES_DYNAMIC_ALLOCATORS =3D 0x40, > - OMP_REQUIRES_REVERSE_OFFLOAD =3D 0x80, > + OMP_REQUIRES_REVERSE_OFFLOAD =3D GOMP_REQUIRES_REVERSE_OFFLOAD, > OMP_REQUIRES_ATOMIC_DEFAULT_MEM_ORDER_USED =3D 0x100, > - OMP_REQUIRES_TARGET_USED =3D 0x200 > + OMP_REQUIRES_TARGET_USED =3D 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 Tobias ----------------- 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