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 B9EAF385841C for ; Fri, 18 Nov 2022 17:56:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9EAF385841C 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.96,175,1665475200"; d="scan'208";a="87554685" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 18 Nov 2022 09:56:08 -0800 IronPort-SDR: vGi0LlwZeKapFwmlLkJ6Q9fBETc/pNKxSWIyPE+JyXDtsdFtkP8YXXylQDSaSquFNe+9CUnv3C KGBWncmKMlH1CjgdINlsBdcdng2ZDcf4lCShcECzyDOmgj8txEr1Y+J61S/ly2XUx1IY+o1pmm sJ3REp3rkDrlqX30H4PmguBO/pTABKdSA61kmPGCU6UCFf1ECIML+8a6uXJd+ECDojwUXkfXJl FZ2PV0gV4Q66xEOIyGjyPxjp1874mLyTczKYFa19eDt4WkENaxfTp9N0c1MULIvcRN+3UBwWls GXo= Message-ID: Date: Fri, 18 Nov 2022 17:56:04 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling Content-Language: en-GB To: Tobias Burnus , gcc-patches CC: Jakub Jelinek References: <55dacdd3-4a82-8087-fdba-824d9910e186@codesourcery.com> <02ec5f29-953b-63dd-7d44-04f9af36a114@codesourcery.com> <1c5166f4-91d2-b320-7fd9-6831c7e26342@codesourcery.com> From: Andrew Stubbs In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 18/11/2022 17:41, Tobias Burnus wrote: > Attached is the updated/rediffed version, which now uses the builtin > instead of the 'asm("s8"). > > The code in principle works; that is: If no private stack variables are > copied, it works. > > Or in other words: reverse-offload target regions that don't use > firstprivate or mapping work, the rest would crash. That's avoided by > not accepting reverse offload inside GOMP_OFFLOAD_get_num_devices for now. > > To get it working, the manual stack allocation patch + the trivial > update to that get_num_devices func is needed, but no change to the > attached patch. > > In order to reduce local patches, I would love to have it on mainline – > otherwise, I have at least the current version in gcc-patches@. OK with me. Andrew