From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id D604A3852229 for ; Sat, 10 Dec 2022 08:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D604A3852229 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,232,1665475200"; d="scan'208";a="92374356" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 10 Dec 2022 00:11:31 -0800 IronPort-SDR: /7z6BvpKSvxT03N9sbow90kNmj+8fLMrbTuyBIQRBNahreHQUJXXvL+asjph9YtAy2Wbiysja6 w0vv2fi4wpCAze5HvWm0zD/TUtbzfJeGRhs/3qDewOI2jb0NJRlVvdoCVBhYiMVU7mdHsMcKiw uxk9fcF6AfVZE2CN1vw07R9ua6s5+tPRg9SDXRdED1/AHTVat94+amddTCYTf9WZIEa02Ij551 909f8brK4LM44GtoAwgBIxGydc0PnSys+z3Ox9HVe1DEYkjooHCAmKHVioF0x2/nBOLox3dg9D Jx8= Message-ID: Date: Sat, 10 Dec 2022 09:11:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [Patch] libgomp: Handle OpenMP's reverse offloads Content-Language: en-US To: Jakub Jelinek CC: gcc-patches References: <0567b7c6-fede-72b8-63d1-1fc10dca36a0@codesourcery.com> From: Tobias Burnus In-Reply-To: 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-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.5 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 09.12.22 15:44, Jakub Jelinek wrote: > On Tue, Dec 06, 2022 at 08:45:07AM +0100, Tobias Burnus wrote: >> [...] > I think we just shouldn't support libgomp plugins for 32-bit libgomp, onl= y > host fallback. If you want offloading, use 64-bit host... (I concur.) > >> libgomp: Handle OpenMP's reverse offloads >> >> + /* Likeverse for the reverse lookup device->host for reverse offload.= */ > Likewise > >> + reverse_splay_tree_node rev_array; > Do we need reverse_splay_tree* stuff in libgomp.h? > As splay_tree_node is just a pointer, perhaps just > struct reverse_splay_tree_node_s; > early and > struct reverse_splay_tree_node_s *rev_array; > in libgomp.h and include the extra splay-tree.h only in target.c? > Unless one needs it anywhere else... It is used as 'typedef struct reverse_splay_tree_node_s *reverse_splay_tree= _node;' in struct target_mem_desc { .... reverse_splay_tree_node rev_array; } but also as struct gomp_device_descr { ... struct reverse_splay_tree_s mem_map_rev; } The latter is struct reverse_splay_tree_key_s { /* Address of the device object. */ uint64_t dev; splay_tree_key k; }; which in turn needs 'splay_tree_key'. Thus, I could either commit it as is =E2=80=93 or turn the latter also into a pointer and malloc it. Currently, it is accessed as mem_map.k.root =3D NULL for init and later through the splay-tree functions indirectly. Thoughts? Unless there are further comments, I will later commit it as is. 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