]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AMD GCN adjustments for middle-end worker partitioning
authorJulian Brown <julian@codesourcery.com>
Wed, 4 Sep 2019 23:33:02 +0000 (16:33 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Wed, 21 Apr 2021 16:33:51 +0000 (09:33 -0700)
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.omp
gcc/config/gcn/gcn-protos.h
gcc/config/gcn/gcn-tree.c
gcc/config/gcn/gcn.c

index ffdd97dc24cfa9c34533939da00af1b24e63157e..304f1abaeed82a5d7fb11767fa250b1e979b5be8 100644 (file)
@@ -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.
index dc9331c445d72c2a56f0afba133e7e0d81b70daa..2e510569c4f2702da0884befa463a94c06e250a0 100644 (file)
@@ -38,7 +38,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);
index 8f270991c862398b5fd05fa581b6926c9b426dbc..b8128f876416cbc9baa890a6018aa23ca3f9a5b5 100644 (file)
@@ -548,12 +548,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;
index 9660ca6eaa4104faecc420ac9f236609c45b82f4..e6800c21b20b203a3a7442ec0b9ec20552efc948 100644 (file)
@@ -570,7 +570,7 @@ gcn_modes_tieable_p (machine_mode mode1, machine_mode mode2)
 
 /* Implement TARGET_TRULY_NOOP_TRUNCATION.
  
-   Returns true if it is safe to “convert” a value of INPREC bits to one of
+   Returns true if it is safe to â€œconvertâ€� a value of INPREC bits to one of
    OUTPREC bits (where OUTPREC is smaller than INPREC) by merely operating on
    it as if it had only OUTPREC bits.  */
 
@@ -3589,8 +3589,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.  */
 
@@ -3607,7 +3605,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
@@ -4975,8 +4972,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;
 }
 
@@ -6317,9 +6312,9 @@ gcn_dwarf_register_span (rtx rtl)
 #define TARGET_GIMPLIFY_VA_ARG_EXPR gcn_gimplify_va_arg_expr
 #undef TARGET_OMP_DEVICE_KIND_ARCH_ISA
 #define TARGET_OMP_DEVICE_KIND_ARCH_ISA gcn_omp_device_kind_arch_isa
-#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