public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Julian Brown <julian@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Andrew Stubbs <andrew_stubbs@mentor.com>
Subject: [PATCH 3/6] [og9] AMD GCN adjustments for middle-end worker partitioning
Date: Thu, 05 Sep 2019 01:46:00 -0000	[thread overview]
Message-ID: <f079b7a61a6bc88109ad68fffca607b47ec109c5.1567644180.git.julian@codesourcery.com> (raw)
In-Reply-To: <cover.1567644180.git.julian@codesourcery.com>

This patch renames the TARGET_GOACC_ADJUST_PROPAGATION_RECORD
hook introduced in the GCN backend by a previous merge to
TARGET_GOACC_CREATE_PROPAGATION_RECORD, and removes a FIXME relating to
missing worker-partitioning support.

Julian

ChangeLog

	gcc/
	* config/gcn/gcn-protos.h (gcn_goacc_adjust_propagation_record): Rename
	prototype to...
	(gcn_goacc_create_propagation_record): This.
	* config/gcn/gcn-tree.c (gcn_goacc_adjust_propagation_record): Rename
	function to...
	(gcn_goacc_create_propagation_record): This.  Adjust comment.
	* config/gcn/gcn.c (gcn_init_builtins): Override decls for
        BUILT_IN_GOACC_SINGLE_START, BUILT_IN_GOACC_SINGLE_COPY_START,
        BUILT_IN_GOACC_SINGLE_COPY_END and BUILT_IN_GOACC_BARRIER.
	(gcn_fork_join): Remove inaccurate comment.
	(TARGET_GOACC_ADJUST_PROPAGATION_RECORD): Rename to...
	(TARGET_GOACC_CREATE_PROPAGATION_RECORD): This.
---
 gcc/ChangeLog.openacc       | 15 +++++++++++++++
 gcc/config/gcn/gcn-protos.h |  2 +-
 gcc/config/gcn/gcn-tree.c   |  6 +++---
 gcc/config/gcn/gcn.c        | 11 +++--------
 4 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/gcc/ChangeLog.openacc b/gcc/ChangeLog.openacc
index a2b2dcfcf26..0d068ac8ae2 100644
--- a/gcc/ChangeLog.openacc
+++ b/gcc/ChangeLog.openacc
@@ -1,3 +1,18 @@
+2019-09-05  Julian Brown  <julian@codesourcery.com>
+
+	* config/gcn/gcn-protos.h (gcn_goacc_adjust_propagation_record): Rename
+	prototype to...
+	(gcn_goacc_create_propagation_record): This.
+	* config/gcn/gcn-tree.c (gcn_goacc_adjust_propagation_record): Rename
+	function to...
+	(gcn_goacc_create_propagation_record): This.  Adjust comment.
+	* config/gcn/gcn.c (gcn_init_builtins): Override decls for
+        BUILT_IN_GOACC_SINGLE_START, BUILT_IN_GOACC_SINGLE_COPY_START,
+        BUILT_IN_GOACC_SINGLE_COPY_END and BUILT_IN_GOACC_BARRIER.
+	(gcn_fork_join): Remove inaccurate comment.
+	(TARGET_GOACC_ADJUST_PROPAGATION_RECORD): Rename to...
+	(TARGET_GOACC_CREATE_PROPAGATION_RECORD): This.
+
 2019-09-05  Julian Brown  <julian@codesourcery.com>
 
 	* Makefile.in (OBJS): Add omp-sese.o.
diff --git a/gcc/config/gcn/gcn-protos.h b/gcc/config/gcn/gcn-protos.h
index da7faf29c70..1711862c6a2 100644
--- a/gcc/config/gcn/gcn-protos.h
+++ b/gcc/config/gcn/gcn-protos.h
@@ -37,7 +37,7 @@ extern rtx gcn_full_exec ();
 extern rtx gcn_full_exec_reg ();
 extern rtx gcn_gen_undef (machine_mode);
 extern bool gcn_global_address_p (rtx);
-extern tree gcn_goacc_adjust_propagation_record (tree record_type, bool sender,
+extern tree gcn_goacc_create_propagation_record (tree record_type, bool sender,
 						 const char *name);
 extern void gcn_goacc_adjust_gangprivate_decl (tree var);
 extern void gcn_goacc_reduction (gcall *call);
diff --git a/gcc/config/gcn/gcn-tree.c b/gcc/config/gcn/gcn-tree.c
index c6b6302e9ed..04902a39b29 100644
--- a/gcc/config/gcn/gcn-tree.c
+++ b/gcc/config/gcn/gcn-tree.c
@@ -667,12 +667,12 @@ gcn_goacc_reduction (gcall *call)
     }
 }
 
-/* Implement TARGET_GOACC_ADJUST_PROPAGATION_RECORD.
+/* Implement TARGET_GOACC_CREATE_PROPAGATION_RECORD.
  
-   Tweak (worker) propagation record, e.g. to put it in shared memory.  */
+   Create (worker) propagation record in shared memory.  */
 
 tree
-gcn_goacc_adjust_propagation_record (tree record_type, bool sender,
+gcn_goacc_create_propagation_record (tree record_type, bool sender,
 				     const char *name)
 {
   tree type = record_type;
diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index f3f112d95a9..ca9321b5f25 100644
--- a/gcc/config/gcn/gcn.c
+++ b/gcc/config/gcn/gcn.c
@@ -3468,8 +3468,6 @@ gcn_init_builtins (void)
       TREE_NOTHROW (gcn_builtin_decls[i]) = 1;
     }
 
-/* FIXME: remove the ifdef once OpenACC support is merged upstream.  */
-#ifdef BUILT_IN_GOACC_SINGLE_START
   /* These builtins need to take/return an LDS pointer: override the generic
      versions here.  */
 
@@ -3486,7 +3484,6 @@ gcn_init_builtins (void)
 
   set_builtin_decl (BUILT_IN_GOACC_BARRIER,
 		    gcn_builtin_decls[GCN_BUILTIN_ACC_BARRIER], false);
-#endif
 }
 
 /* Expand the CMP_SWAP GCN builtins.  We have our own versions that do
@@ -4765,8 +4762,6 @@ static bool
 gcn_fork_join (gcall *ARG_UNUSED (call), const int *ARG_UNUSED (dims),
 	       bool ARG_UNUSED (is_fork))
 {
-  /* GCN does not use the fork/join concept invented for NVPTX.
-     Instead we use standard autovectorization.  */
   return false;
 }
 
@@ -6029,9 +6024,9 @@ print_operand (FILE *file, rtx x, int code)
 #define TARGET_FUNCTION_VALUE_REGNO_P gcn_function_value_regno_p
 #undef  TARGET_GIMPLIFY_VA_ARG_EXPR
 #define TARGET_GIMPLIFY_VA_ARG_EXPR gcn_gimplify_va_arg_expr
-#undef  TARGET_GOACC_ADJUST_PROPAGATION_RECORD
-#define TARGET_GOACC_ADJUST_PROPAGATION_RECORD \
-  gcn_goacc_adjust_propagation_record
+#undef  TARGET_GOACC_CREATE_PROPAGATION_RECORD
+#define TARGET_GOACC_CREATE_PROPAGATION_RECORD \
+  gcn_goacc_create_propagation_record
 #undef  TARGET_GOACC_ADJUST_GANGPRIVATE_DECL
 #define TARGET_GOACC_ADJUST_GANGPRIVATE_DECL gcn_goacc_adjust_gangprivate_decl
 #undef  TARGET_GOACC_FORK_JOIN
-- 
2.22.0

  parent reply	other threads:[~2019-09-05  1:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05  1:46 [PATCH 0/6] [og9] OpenACC worker partitioning in middle end (AMD GCN) Julian Brown
2019-09-05  1:46 ` [PATCH 1/6] [og9] Target-dependent gang-private variable decl rewriting Julian Brown
2019-09-05  1:46 ` [PATCH 4/6] [og9] Fix up tests for oaccdevlow pass splitting Julian Brown
2019-09-05  1:46 ` Julian Brown [this message]
2019-09-05  1:46 ` [PATCH 2/6] [og9] OpenACC middle-end worker-partitioning support Julian Brown
2019-09-05 13:52   ` Chung-Lin Tang
2019-09-05 15:01     ` Julian Brown
2019-09-06 12:32       ` Julian Brown
2019-09-05  1:47 ` [PATCH 5/6] [og9] Reference reduction localization Julian Brown
2019-09-05  1:47 ` [PATCH 6/6] [og9] Enable worker partitioning for AMD GCN Julian Brown

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=f079b7a61a6bc88109ad68fffca607b47ec109c5.1567644180.git.julian@codesourcery.com \
    --to=julian@codesourcery.com \
    --cc=andrew_stubbs@mentor.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).