From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187]) by sourceware.org (Postfix) with ESMTPS id 915A73858CD1 for ; Sun, 7 Jan 2024 12:18:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 915A73858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=net-b.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=net-b.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 915A73858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.126.187 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704629932; cv=none; b=Oh7bI6uAlJQSBBu2M3Ak+ESV3LUAhdNx5wBKKyZ76eVtnmsaBMmq4BFjxRMM5DqNNlSrR4a69Hv3F243wKlH6mUCDtc6pg9w8nk9vG8Sj0biuEfcLpkz3as/38Kpp7JnkpdYWBQB+Lae+gBeiHHTn5hHecpGPJooCcA3z/k7JDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704629932; c=relaxed/simple; bh=431laSXQfb/rEJmw5sThy9rqNVp/jnfNCdcUwsQJHeQ=; h=Message-ID:Date:MIME-Version:Subject:From:To; b=ml+aOWoMSP1juyn085utWhaKVspzg7PFnyXc7xY9EBb7DtS+TaImJNqLGAtrFy21JyrpAo7ly3b0GYlKxVbwTQaoCcedehO24yXvakevNpDME1HsxHwKvqQgpPcD6h5s8wyJ84Q82VZDIt9yCpVBB7mnozm9JP4cCuSHdRppIJ4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [192.168.0.26] ([89.246.122.167]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MsI0I-1r22cD1zac-00tgSA; Sun, 07 Jan 2024 13:18:43 +0100 Message-ID: Date: Sun, 7 Jan 2024 13:18:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/8] OpenMP: metadirective tree data structures and front-end interfaces Content-Language: en-US From: Tobias Burnus To: Sandra Loosemore , gcc-patches@gcc.gnu.org Cc: kcy@codesourcery.com, tobias@codesourcery.com, jakub@redhat.com References: <20240106185257.126445-1-sandra@codesourcery.com> <20240106185257.126445-2-sandra@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:Biaorpato/vuzXEfxslTZZP+GaB9I+iUfDzM2LsczyeM7F7RYsw tXFEbO/9rBT1eesY0oPjg+1QrIL4FGuQQNQ4U5Rue7Iy5q3ZX/6ZZQgcaezxH8xkefUvlnx LOcwJrwY5uXl9Z9e9V7XOtxW66OSQdbTJjxtz4UJG0m1Ig7lTaUiUYUvazf/RMVzkp/Ul+d chyr+BvDSSQCcduWsZ5Lw== UI-OutboundReport: notjunk:1;M01:P0:m5Odtw2RRmw=;hYovPT6Du/1PelA1xQHKICd3LhT /27nIt6tl05+ytaxN9RZi3ULZFhZtWCQWJa6VsmLwWy8BR+HDPODBBxgGVdlKGlygW6qyYt5T N6cdIYiW6co2qwWj9Z2L48L8LB6JJQK9ZtqGwAXO4BcdnSkLsFJlwEJCa+fdLFPS44Ir1kWNy c/dIp8Hhnb9wca78Qu+nyV81JIMpWVZ58ZUYpqb1W/PaXOXCF8dMxhfhcjFKuP3yuVapMLMma aR/BTrGHio1krWQh7sENg8FVsY7capt9XWDhyOdnhENk5Jdp7zxkk8VzTGJAWgn/gpfv4oH77 P3CtjzhgAxChYZa9BDbJ6Ia4LqG0S+LrtWfT008FadNob81lMojXoSbtxTVKkdZRbJtudm6+K U8vZQTK3a7sgJSdFCQDP7ypCe/0z8evWec0ki5Ji0tWwKf54S0BcE5aHO3fQBoH5MTzDbRR5R PmNiapZqkkmp8dvw5f9A397kYjdhGkqmvSRYj8O9cxCZxo2RyNAYSkZ8AY/C0YdXEFY3YoT4x Vs+H4hRufPDaN+bgeIz08J+9eNZYBtT0AIBGRmEHV/3DJXHUtOjdCaB+DBS+vTBDHvBPb08Gm Wk19iP7A8yuACSYIsMNSIjhr+wZ72NiW/z9Tp+EJMJkh6g28uEPsfNCIzLT8yuhtaZYTDiBR+ JtMTzvn2/qDs33cKpj/cn/rN5Nl20ke8jSAERdBO8skYB+VG4djotNN2oR2JweuO+J+uVOLxp cs7VJtv1gTL2SlQ9sel5LmtNbK8TFAkN8RH7dYcLsYikEuw2mL8+F3BreDN1NpCMt1JoVr6D2 yjnM6oW/UodDC8CVXSSqNo6zT6h8WSUCkAv8vRflqWkU7b+PWKYplDsmHfks0kmIe5A6jQwNz lAlBPVATVitzeoVnQ+mgznrwWVI5cEJEIOEM= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,BODY_8BITS,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 List-Id: Hi Sandra, Tobias Burnus wrote: > (I have now an errant to do - and will continue later with the review.) First, something a bit unrelated to this patch but affecting related code (quoting old, existing code): > int > omp_context_selector_matches (tree ctx) ... > case OMP_TRAIT_DEVICE_KIND: > if (set == OMP_TRAIT_SET_DEVICE) > for (tree p = OMP_TS_PROPERTIES (ts); p; p = TREE_CHAIN (p)) > { > const char *prop = omp_context_name_list_prop (p); > if (prop == NULL) > return 0; > if (!strcmp (prop, "any")) > continue; [Cf. also comment to 3/8] As OpenMP states: "If trait-property 'any' is specified in the 'kind' trait-selector of the device selector set or the target_device selector sets, no other trait-property may be specified in the same selector set." [From "Restrictions to context selectors are as follows:", here quoting TR12] It seems as if we can avoid run-time evaluation for 'device' if there is a kind(any) - and likewise for 'target_device' if there is 'kind(any)', but we want to have an error in that case if any other trait has been specified, I guess. * * * > Sandra Loosemore wrote: >> @@ -2194,12 +2308,21 @@ omp_context_compute_score (tree ctx, score_wide_int *score, bool declare_simd) ... >>       int *scores >>         = (int *) alloca ((2 * nconstructs + 2) * sizeof (int)); > > That's not new but I have the feeling it should be '+ 3' and not '+ 2' > for device or target_device + and having both device and target device, > it might even need to be + 6. > I also wonder whether 'alloca' will really work - or only when inlined > at all call sites. Ignore the last sentence. ['scores' is used locally, while 'score' is passed by the caller.] Still, I wonder about the + 2 vs. +3 or +6. Otherwise, I have not spotted anything. Tobias