From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 973573858D3C for ; Mon, 20 Nov 2023 10:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 973573858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 973573858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=116.202.254.214 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700476408; cv=none; b=T/mj2Bk4I4Ntob7gX1URB9/xi5K+sRVBxbS2vytCzHVoluIWrG9qXANyq8wXBy9DIdmfsjJYqEPeXOfIlKTWuGhjABph27wSzTrMHWTq831+SrPwVupEhvBKkPTZj0D7xsuV/8Kn8xDed9CDcHPNh0EDQKMyguknNFM8VE42Yds= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700476408; c=relaxed/simple; bh=czQExCSgfjqmLfhhwF4yp1nrr1DxFySly7HmAknSpT8=; h=To:From:Subject:Date:Message-ID:Mime-Version; b=PoGyYjvBDOxCVS3AEScuSslTpTacsVVPHDGavINHpn0XNIb8cpuoxWxN5XiqvGaPYnp1R3bk52l05ag3AD3VXAXda2wLeQ2tEHwix67OBr46IB4IJ8LqM5Hhcj0yXOqL2oPi88KrVGPrk/Re+p8kRsiFQk8HryibpdphP2y3vbs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1r51an-0008bw-2O for gcc-patches@gcc.gnu.org; Mon, 20 Nov 2023 11:33:25 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Julian Brown Subject: Re: [PATCH 0/3] OpenMP: Improve data abstractions for context selectors Date: Mon, 20 Nov 2023 10:32:46 +0000 Organization: Siemens Message-ID: <20231120103246.7498367f@squid.athome> References: <20231119092151.1690294-1-sandra@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , In-Reply-To: <20231119092151.1690294-1-sandra@codesourcery.com> X-Newsreader: Claws Mail 4.1.1git78 (GTK 3.24.38; x86_64-pc-linux-gnu) X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Sun, 19 Nov 2023 02:21:48 -0700 Sandra Loosemore wrote: > This series of patches adds a layer of data abstraction, using at > least slightly more descriptive names, and then tries to address some > of the representation and coding issues. > > Part 1 introduces some macros (e.g., OMP_TSS_ID instead of > TREE_PURPOSE to get the name of a selector) and renames a bunch of > variables (e.g., tss for a trait-set selector, ts for a trait > selector, tp for a trait property). Those changes were relatively > mechanical. I also added some abstraction for the trait-score so that > it need not be handled explicitly when processing property lists. > > Part 2 changes the representation of name-list properties so that both > the string and identifier forms store the name in the same place. > > Part 3 is a more radical change: it replaces the string names of > trait-set and trait selectors with enumerators, which allows clean-up > of those funky switch statements. I also made things more > table-driven. Alas, this part is still WIP; there's an ICE in one of > the test cases I haven't been able to track down yet. > > I can continue to work on this patch set in the next couple of weeks > if the general direction is seen as a good thing. I believe there is > a little more latitude re the end of stage 1 with OpenMP (as there is > with target-specific patches) since it is not enabled by default; in > any case I'd like to get feedback on the general direction before > continuing too much farther with this, and adapting the metadirective > patches to match it. FWIW, these changes look good to me (I've been working with these data structures in the context of adding another OpenMP feature). I wonder if this bit might be relevant to the ICE you see in the 3rd patch (from my WIP patches): @@ -1247,12 +1247,17 @@ omp_mark_declare_variant (location_t loc, tree variant, tree construct) DECL_ATTRIBUTES (variant) = attr; return; } +#if 0 + /* I think this might be bogus. It compares an extracted "construct" + selector set (containing e.g. just "target") with a complete context + selector ("construct target", ...). */ if ((TREE_VALUE (attr) != NULL_TREE) != (construct != NULL_TREE) || (construct != NULL_TREE && omp_context_selector_set_compare ("construct", TREE_VALUE (attr), construct))) error_at (loc, "%qD used as a variant with incompatible % " "selector sets", variant); +#endif } Perhaps not (it could be a bug in my own code or understanding), but maybe! HTH, Julian