This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4] fix breakage


Alas, I broke gomp4 nvptx build.  Fixed thusly.

nathan
2015-08-21  Nathan Sidwell  <nathan@codesourcery.com>

	* config/nvptx/nvptx.md (oacc_fork, oacc_join): Adjust expand calls.
	* config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining): New.
	Broken out of ...
	(nvptx_expand_oacc_fork, nvptx_expand_oacc_join): ... here.
	Restore to take mode.

Index: config/nvptx/nvptx.c
===================================================================
--- config/nvptx/nvptx.c	(revision 227080)
+++ config/nvptx/nvptx.c	(working copy)
@@ -1165,11 +1165,10 @@ nvptx_expand_compare (rtx compare)
   return gen_rtx_NE (BImode, pred, const0_rtx);
 }
 
+/* Emit forking instructions for MASK.  */
 
-/* Expand the oacc fork & join primitive into ptx-required unspecs.  */
-
-void
-nvptx_expand_oacc_fork (unsigned mask)
+static void
+nvptx_emit_forking (unsigned mask)
 {
   mask &= (GOMP_DIM_MASK (GOMP_DIM_WORKER)
 	   | GOMP_DIM_MASK (GOMP_DIM_VECTOR));
@@ -1184,8 +1183,10 @@ nvptx_expand_oacc_fork (unsigned mask)
     }
 }
 
-void
-nvptx_expand_oacc_join (unsigned mask)
+/* Emit joining instructions for MASK.  */
+
+static void
+nvptx_emit_joining (unsigned mask)
 {
   mask &= (GOMP_DIM_MASK (GOMP_DIM_WORKER)
 	   | GOMP_DIM_MASK (GOMP_DIM_VECTOR));
@@ -1199,6 +1200,20 @@ nvptx_expand_oacc_join (unsigned mask)
     }
 }
 
+/* Expand the oacc fork & join primitive into ptx-required unspecs.  */
+
+void
+nvptx_expand_oacc_fork (unsigned mode)
+{
+  nvptx_emit_forking (GOMP_DIM_MASK (mode));
+}
+
+void
+nvptx_expand_oacc_join (unsigned mode)
+{
+  nvptx_emit_joining (GOMP_DIM_MASK (mode));
+}
+
 /* Expander for reduction locking and unlocking.  We expect SRC to be
    gang or worker level.  */
 
Index: config/nvptx/nvptx.md
===================================================================
--- config/nvptx/nvptx.md	(revision 227080)
+++ config/nvptx/nvptx.md	(working copy)
@@ -1418,7 +1418,7 @@
 		       UNSPECV_FORKED)]
   ""
 {
-  nvptx_expand_oacc_fork (GOMP_DIM_MASK (INTVAL (operands[0])));
+  nvptx_expand_oacc_fork (INTVAL (operands[0]));
   DONE;
 })
 
@@ -1427,7 +1427,7 @@
 		       UNSPECV_JOIN)]
   ""
 {
-  nvptx_expand_oacc_join (GOMP_DIM_MASK (INTVAL (operands[0])));
+  nvptx_expand_oacc_join (INTVAL (operands[0]));
   DONE;
 })
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]