public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-984] [OpenACC privatization] Explain two different configurations [PR90115]
Date: Fri, 21 May 2021 18:54:44 +0000 (GMT)	[thread overview]
Message-ID: <20210521185444.DC06F384783B@sourceware.org> (raw)

https://gcc.gnu.org/g:21803fcaebeab36de0d7b6b8cf6abb9389f5e51f

commit r12-984-g21803fcaebeab36de0d7b6b8cf6abb9389f5e51f
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Thu May 20 15:44:09 2021 +0200

    [OpenACC privatization] Explain two different configurations [PR90115]
    
            gcc/
            PR middle-end/90115
            * omp-offload.c (execute_oacc_device_lower): Explain.

Diff:
---
 gcc/omp-offload.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index 36bd2e44d81..336b48d5a3b 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -2206,6 +2206,26 @@ execute_oacc_device_lower ()
 	  gsi_next (&gsi);
       }
 
+  /* Regarding the OpenACC privatization level, we're currently only looking at
+     making the gang-private level work.  Regarding that, we have the following
+     configurations:
+
+       - GCN offloading: 'targetm.goacc.adjust_private_decl' does the work (in
+	 particular, change 'TREE_TYPE', etc.) and there is no
+	 'targetm.goacc.expand_var_decl'.
+
+       - nvptx offloading: 'targetm.goacc.adjust_private_decl' only sets a
+	 marker and then 'targetm.goacc.expand_var_decl' does the work.
+
+     Eventually (in particular, for worker-private level?), both
+     'targetm.goacc.adjust_private_decl' and 'targetm.goacc.expand_var_decl'
+     may need to do things, but that's currently not meant to be addressed, and
+     thus not fully worked out and implemented, and thus untested.  Hence,
+     'assert' what currently is implemented/tested, only.  */
+
+  if (targetm.goacc.expand_var_decl)
+    gcc_assert (adjusted_vars.is_empty ());
+
   /* Make adjustments to gang-private local variables if required by the
      target, e.g. forcing them into a particular address space.  Afterwards,
      ADDR_EXPR nodes which have adjusted variables as their argument need to


                 reply	other threads:[~2021-05-21 18:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20210521185444.DC06F384783B@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@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).