From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 8FB523857C71 for ; Mon, 26 Jul 2021 21:19:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8FB523857C71 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: nag4jkbLCJfUuSp/HNtELHM7SxbRLR7vx9NCiD0Qd/UBEWxd1bl3yl08Uh5/5HVodsqY73DXHO o+btn4ikBU3U2x1vBXQMyDv0wbcbPVCQ0PSXpaJiw5KgOwRHVLWRzsFdr0uJroOQVsJByt6sB3 p373u35IENZ6EjR6bbKqrlYP0xmi3s5h8HvYgbsxJdSGkmSZlO5ygIuEq5KFchAGCqcEbDJ0RC IJ1FOPWHT2bxmQSGUAjnqAB7ov6GGD5A3uKCOv5fc4qRQeXWzl86aHWAfp6GxfJX0Fr9Lnmc1q p2lLuG3Nvk7uU9ZmxAt50zDh X-IronPort-AV: E=Sophos;i="5.84,272,1620720000"; d="scan'208";a="63933395" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Jul 2021 13:19:43 -0800 IronPort-SDR: vMZuo3tQ7F/KIOpieptRQ0SRw+gpENlR6z5PYrdc3wrfeiMZkmf43sCgicRSx8aX6QJz0RoS6B eUODfyvEXxkaY5dQuZl/LQR4iOTtefQcHmoEfwXVL4UQ/+0XR8mlWm/sPw2eXSZ7tqko8MAWxE 9PuJj5zeU1sz0NAptUkg8mqjalKm1sCVds1dca/T6Q0CpVufiZLmmSYxg0fIJ044o7OWEyVYSL CzCS1/3enjqw54L/t4pCYe2zJWpVtwQs1YMAE58juQV21Klom7gF8xdO9FcjRw2CiOCXPidI3w ZsM= Subject: Re: [WIP, OpenMP] OpenMP metadirectives support To: Jakub Jelinek CC: GCC Patches References: <8d413974-0068-3a31-6ae5-d36c1be06d06@codesourcery.com> <20210726142902.GW2380545@tucnak> <0000a35d-75a5-3067-b59c-b4f5bde0ea58@codesourcery.com> <20210726195654.GZ2380545@tucnak> From: Kwok Cheung Yeung Message-ID: Date: Mon, 26 Jul 2021 22:19:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210726195654.GZ2380545@tucnak> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Mon, 26 Jul 2021 21:19:46 -0000 Hello On 26/07/2021 8:56 pm, Jakub Jelinek wrote: > On Mon, Jul 26, 2021 at 08:28:16PM +0100, Kwok Cheung Yeung wrote: >> In Section 1.2.2 of the OpenMP TR10 spec, 'target variant' is defined as: >> >> A version of a device routine that can only be executed as part of a target region. > > Yes, that is a target variant, but I'm pretty sure we've decided that > the target construct added for declare target is actually not a dynamic > property. So basically mostly return to the 5.0 wording with clarifications > for Fortran. See > https://github.com/OpenMP/spec/issues/2612#issuecomment-849742988 > for details. > Making the target in construct dynamic would pretty much force all the > scoring to be dynamic as well. In that comment, Deepak says: So, we decided to keep the target trait static, requiring that the declare target directive must be explicit and that the function version must be different from the version of the function that may be called outside of a target region (with the additional clarification that whether it differs or not will be implementation defined). "the function version must be different from the version of the function that may be called outside of a target region": This is what we do not have in GCC at the moment - the function versions called within and outside target regions are the same on the host. "whether it differs or not will be implementation defined": So whether a function with 'declare target' and a metadirective involving a 'target' construct behaves the same or not when called from both inside and outside of a target region is implementation defined? I will leave the treatment of target constructs in the selector as it is then, with both calls going to the same function with the metadirective resolving to the 'target' variant. I will try to address your other concerns later. Thanks Kwok