From: Julian Brown <julian@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Cc: <jakub@redhat.com>, <tobias@codesourcery.com>
Subject: Re: [PATCH 0/3] OpenMP: Improve data abstractions for context selectors
Date: Mon, 20 Nov 2023 10:32:46 +0000 [thread overview]
Message-ID: <20231120103246.7498367f@squid.athome> (raw)
In-Reply-To: <20231119092151.1690294-1-sandra@codesourcery.com>
On Sun, 19 Nov 2023 02:21:48 -0700
Sandra Loosemore <sandra@codesourcery.com> 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 %<construct%> "
"selector sets", variant);
+#endif
}
Perhaps not (it could be a bug in my own code or understanding), but
maybe!
HTH,
Julian
next prev parent reply other threads:[~2023-11-20 10:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-19 9:21 Sandra Loosemore
2023-11-19 9:21 ` [PATCH 1/3] OpenMP: Introduce accessor macros and constructors " Sandra Loosemore
2023-11-19 9:21 ` [PATCH 2/3] OpenMP: Unify representation of name-list properties Sandra Loosemore
2023-11-19 9:21 ` [PATCH 3/3] OpenMP: Use enumerators for names of trait-sets and traits Sandra Loosemore
2023-11-21 20:48 ` Sandra Loosemore
2023-11-20 10:32 ` Julian Brown [this message]
2023-11-22 16:22 ` [PATCH V2 " Sandra Loosemore
2023-11-27 17:19 ` Tobias Burnus
2023-11-27 18:18 ` Tobias Burnus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231120103246.7498367f@squid.athome \
--to=julian@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).