From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id D99A33853781 for ; Sat, 10 Dec 2022 08:28:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D99A33853781 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670660900; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fxkClOws1UfX4PNfmUaTKHN86N6GApS0dfoltoImfNk=; b=O9c2CgTC2tEzHiCd/BYEq+jbI+WpPjJeecL7j4hQb1xqUtH+AwAkFuADcf+wpFGsTzPOPB OWiixAe9efYokWzXLpIgWPwusbwSGPs6+SuP5hAGo82pQU+kdLj+XC9VSyBHxpMzfPxV9Q LNysM06xfY0Fa98U2uRhbwvoQkogL7Y= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-302-YmjHqFYVMwC7-W3lZq6yxA-1; Sat, 10 Dec 2022 03:28:16 -0500 X-MC-Unique: YmjHqFYVMwC7-W3lZq6yxA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8D8938039A1; Sat, 10 Dec 2022 08:28:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 48FB140C6EC2; Sat, 10 Dec 2022 08:28:15 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2BA8SBZV3887838 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Sat, 10 Dec 2022 09:28:11 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2BA8SARQ3887837; Sat, 10 Dec 2022 09:28:10 +0100 Date: Sat, 10 Dec 2022 09:28:10 +0100 From: Jakub Jelinek To: Tobias Burnus Cc: gcc-patches Subject: Re: [Patch] libgomp: Handle OpenMP's reverse offloads Message-ID: Reply-To: Jakub Jelinek References: <0567b7c6-fede-72b8-63d1-1fc10dca36a0@codesourcery.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 Sat, Dec 10, 2022 at 09:11:24AM +0100, Tobias Burnus wrote: > 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 – or turn the latter also > into a pointer and malloc it. Currently, it is accessed as > mem_map.k.root = NULL for init and later through the splay-tree > functions indirectly. > > Thoughts? > > Unless there are further comments, I will later commit it as is. Ok; just wanted to save compile time by not including too much for all the other files... Jakub