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] internal fn cleanup


I've committed this to gomp4

1) move IFN_UNIQUE constants to the IFN_UNIQUE function definition

2) Update IFN_GOACC_REDUCTION_* comments to match the renamed oacc_device_lower pass.

nathan
2015-10-11  Nathan Sidwell  <nathan@codesourcery.com>

	* internal-fn.def (IFN_UNIQUE_UNSPEC, IFN_UNIQUE_OACC_FORK,
	IFN_UNIQUE_OACC_JOIN): Move to IFN_UNIQUE definition.
	* internal-fn.c (expand_GOACC_REDUCTION_*): Correct comments.

Index: internal-fn.c
===================================================================
--- internal-fn.c	(revision 228677)
+++ internal-fn.c	(working copy)
@@ -2026,7 +2026,7 @@ expand_GOACC_DIM_POS (gcall *ARG_UNUSED
 #endif
 }
 
-/* This should get expanded in oacc_transform.  */
+/* All the GOACC_REDUCTION variants  get expanded in oacc_device_lower.  */
 
 static void
 expand_GOACC_REDUCTION_SETUP (gcall *stmt ATTRIBUTE_UNUSED)
@@ -2034,24 +2034,18 @@ expand_GOACC_REDUCTION_SETUP (gcall *stm
   gcc_unreachable ();
 }
 
-/* This should get expanded in oacc_transform.  */
-
 static void
 expand_GOACC_REDUCTION_INIT (gcall *stmt ATTRIBUTE_UNUSED)
 {
   gcc_unreachable ();
 }
 
-/* This should get expanded in oacc_transform.  */
-
 static void
 expand_GOACC_REDUCTION_FINI (gcall *stmt ATTRIBUTE_UNUSED)
 {
   gcc_unreachable ();
 }
 
-/* This should get expanded in oacc_transform.  */
-
 static void
 expand_GOACC_REDUCTION_TEARDOWN (gcall *stmt ATTRIBUTE_UNUSED)
 {
Index: internal-fn.def
===================================================================
--- internal-fn.def	(revision 228677)
+++ internal-fn.def	(working copy)
@@ -67,10 +67,17 @@ DEF_INTERNAL_FN (GOACC_DATA_END_WITH_ARG
 
 /* An unduplicable, uncombinable function.  Generally used to preserve
    a CFG property in the face of jump threading, tail merging or
-   other such optimizations. The optional first argument distinguishes
+   other such optimizations.  The first argument distinguishes
    between uses.  Other arguments are as needed for use.  The return
-   type depends on use too. */
+   type depends on use too.  */
 DEF_INTERNAL_FN (UNIQUE, ECF_NOTHROW | ECF_LEAF, NULL)
+#define IFN_UNIQUE_UNSPEC 0  /* Undifferentiated UNIQUE.  */
+
+/* FORK and JOIN mark the points at which OpenACC partitioned
+   execution is entered or exited.  They take an INTEGER_CST argument,
+   indicating the axis of forking or joining and return nothing.  */
+#define IFN_UNIQUE_OACC_FORK 1
+#define IFN_UNIQUE_OACC_JOIN 2
 
 /* DIM_SIZE and DIM_POS return the size of a particular compute
    dimension and the executing thread's position within that
@@ -99,11 +106,3 @@ DEF_INTERNAL_FN (GOACC_REDUCTION_INIT, E
 DEF_INTERNAL_FN (GOACC_REDUCTION_FINI, ECF_NOTHROW, NULL)
 DEF_INTERNAL_FN (GOACC_REDUCTION_TEARDOWN, ECF_NOTHROW, NULL)
 
-/* IFN_UNIQUE uses an INTEGER_CST first argument to discriminate use.  */
-#define IFN_UNIQUE_UNSPEC 0
-
-/* FORK and JOIN mark the points at which partitioned execution is
-   entered or exited.  They take an INTEGER_CST argument, indicating
-   the axis of forking or joining and return nothing.  */
-#define IFN_UNIQUE_OACC_FORK 1
-#define IFN_UNIQUE_OACC_JOIN 2

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