public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chung-Lin Tang <cltang@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	Tobias Burnus <tobias@codesourcery.com>,
	Catherine Moore <clm@codesourcery.com>,
	Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [PATCH, 1/3, OpenMP] Target mapping changes for OpenMP 5.0, front-end parts
Date: Tue, 6 Oct 2020 22:54:35 +0800	[thread overview]
Message-ID: <0eb7f1a1-2dda-c188-aed6-d352e5867b74@codesourcery.com> (raw)
In-Reply-To: <20200929101616.GY2176@tucnak>

On 2020/9/29 6:16 PM, Jakub Jelinek wrote:
> On Tue, Sep 01, 2020 at 09:16:23PM +0800, Chung-Lin Tang wrote:
>> this patch set implements parts of the target mapping changes introduced
>> in OpenMP 5.0, mainly the attachment requirements for pointer-based
>> list items, and the clause ordering.
>>
>> The first patch here are the C/C++ front-end changes.
> 
> Do you think you could mention in detail which exact target mapping changes
> in the spec is the patchset attempting to implement?
> 5.0 unfortunately contains many target mapping changes and this patchset
> can't implement them all and it would be easier to see the list of rules
> (e.g. from openmp-diff-full-4.5-5.0.pdf, if you don't have that one, I can
> send it to you), rather than trying to guess them from the patchset.
> 
> Thanks.

Hi Jakub,
the main implemented features are the clause ordering rules:

  "For a given construct, the effect of a map clause with the to, from, or tofrom map-type is
   ordered before the effect of a map clause with the alloc, release, or delete map-type."

  "If item1 is a list item in a map clause, and item2 is another list item in a map clause on
   the same construct that has a base pointer that is, or is part of, item1, then:
     * If the map clause(s) appear on a target, target data, or target enter data construct,
       then on entry to the corresponding region the effect of the map clause on item1 is ordered
       to occur before the effect of the map clause on item2.
  \x0f   * If the map clause(s) appear on a target, target data, or target exit data construct then
       on exit from the corresponding region the effect of the map clause on item2 is ordered to
       occur before the effect of the map clause on item1."

and the base-pointer attachment behavior:

  "If a list item in a map clause has a base pointer, and a pointer variable is present in the device data
   environment that corresponds to the base pointer when the effect of the map clause occurs, then if
   the corresponding pointer or the corresponding list item is created in the device data environment
   on entry to the construct, then:
     ...
     2. The corresponding pointer variable becomes an attached pointer for the corresponding list item."

(these passages are all in the "2.19.7.1 map Clause" section of the 5.0 spec, all are new as
also verified from the diff PDFs you sent us)

Also, because of the these new features, having multiple maps of the same variables now have meaning
in OpenMP, so changes in the C/C++ frontends to relax the no-duplicate rules are also included.

>>          gcc/c-family/
>>          * c-common.h (c_omp_adjust_clauses): New declaration.
>>          * c-omp.c (c_omp_adjust_clauses): New function.
> 
> This function name is too broad, it should have target in it as it is
> for processing target* construct clauses only.
> 
> 	Jakub

Sure, I'll update this naming in a later version.

Thanks,
Chung-Lin

  reply	other threads:[~2020-10-06 14:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 13:16 Chung-Lin Tang
2020-09-16 14:11 ` Chung-Lin Tang
2020-09-29 10:16 ` Jakub Jelinek
2020-10-06 14:54   ` Chung-Lin Tang [this message]
2020-10-13 13:01 ` Jakub Jelinek
2020-10-28 10:31   ` Chung-Lin Tang
2020-10-29 11:44     ` Jakub Jelinek
2020-11-03 18:02       ` Chung-Lin Tang
2020-11-06  9:52         ` Jakub Jelinek
2021-06-04 12:18         ` [PATCH] openmp: Call c_omp_adjust_map_clauses even for combined target [PR100902] Jakub Jelinek

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=0eb7f1a1-2dda-c188-aed6-d352e5867b74@codesourcery.com \
    --to=cltang@codesourcery.com \
    --cc=clm@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.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).