From: Jakub Jelinek <jakub@redhat.com>
To: Chung-Lin Tang <cltang@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
Catherine Moore <clm@codesourcery.com>,
Andrew Stubbs <ams@codesourcery.com>
Subject: Re: [PATCH, v2, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0
Date: Sat, 16 Jan 2021 10:45:18 +0100 [thread overview]
Message-ID: <20210116094518.GA1034503@tucnak> (raw)
In-Reply-To: <12b667d2-09fe-0640-2622-c78ab0b52f87@codesourcery.com>
On Fri, Dec 04, 2020 at 10:15:46PM +0800, Chung-Lin Tang wrote:
> this is a new version of the structure element mapping patch for OpenMP 5.0 requirement
> changes.
Sorry for the delay.
> + /* Unified reference count for structure element siblings, this is used
> + when REFCOUNT_STRUCTELEM_FIRST_P(k->refcount) == true, the first sibling
> + in a structure element sibling list item sequence. */
> + uintptr_t structelem_refcount;
> +
> + /* When REFCOUNT_STRUCTELEM_P (k->refcount) == true, this field points
REFCOUNT_STRUCTELEM_P (k->refcount) is true even for
REFCOUNT_STRUCTELEM_FIRST_P(k->refcount), so shouldn't the description say
that structelem_refcount_ptr is only used if
REFCOUNT_STRUCTELEM_P (k->refcount) && !REFCOUNT_STRUCTELEM_FIRST_P (k->refcount)
?
> + into the (above) structelem_refcount field of the _FIRST splay_tree_key,
> + the first key in the created sequence. All structure element siblings
> + share a single refcount in this manner. Since these two fields won't be
> + used at the same time, they are stashed in a union. */
> + uintptr_t *structelem_refcount_ptr;
> + };
> struct splay_tree_aux *aux;
> };
>
> /* The comparison function. */
Anyway, most of the patch looks good, but I'd like to understand the
rationale for choosing a htab over what I've been trying to suggest, which
was essentially instead of incrementing or decrementing refcounts push them
into a vector for later incrementing/decrementing, then qsort the vector
(by the pointers to refcounts) and increment what the elements point to unless
the same address has been incremented/decremented already.
Jakub
next prev parent reply other threads:[~2021-01-16 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 14:15 Chung-Lin Tang
2020-12-14 10:32 ` Chung-Lin Tang
2021-01-13 15:25 ` Chung-Lin Tang
2021-01-16 9:45 ` Jakub Jelinek [this message]
2021-01-19 8:46 ` Chung-Lin Tang
2021-01-19 9:22 ` Jakub Jelinek
2023-03-24 15:36 ` [og12] In 'libgomp/target.c:gomp_unmap_vars_internal', defer 'gomp_remove_var' (was: [PATCH, v2, OpenMP 5.0, libgomp] Structure element mapping for OpenMP 5.0) Thomas Schwinge
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=20210116094518.GA1034503@tucnak \
--to=jakub@redhat.com \
--cc=ams@codesourcery.com \
--cc=clm@codesourcery.com \
--cc=cltang@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/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).