diff mbox

[gomp4] remove OMP_CLAUSE_DEVICE_RESIDENT

Message ID ff82d492-559a-792e-9183-a0d4163bb089@codesourcery.com
State New
Headers show

Commit Message

Cesar Philippidis Nov. 10, 2016, 8:43 p.m. UTC
I've committed this patch to gomp-4_0-branch which removes
OMP_CLAUSE_DEVICE_RESIDENT. This standalone clause is no longer
necessary, and hasn't been for a while, because device_resident is
treated as a data mapping type for OMP_CLAUSE_MAP, and not a clause itself.

Cesar
diff mbox

Patch

2016-11-10  Cesar Philippidis  <cesar@codesourcery.com>

	gcc/fortran/
	* trans-openmp.c (gfc_trans_omp_clauses_1): Remove
	OMP_CLAUSE_DEVICE_RESIDENT.

	gcc/
	* gimplify.c (gimplify_scan_omp_clauses): Remove
	OMP_CLAUSE_DEVICE_RESIDENT.
	(gimplify_adjust_omp_clauses): Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	* tree-core.h (enum omp_clause_code): Likewise.
	* tree-nested.c (convert_nonlocal_omp_clauses):
	(convert_local_omp_clauses):
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	* tree.c (walk_tree_1): Likewise.


diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index 9924872..3c53414 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -1781,9 +1781,6 @@  gfc_trans_omp_clauses_1 (stmtblock_t *block, gfc_omp_clauses *clauses,
 	case OMP_LIST_USE_DEVICE:
 	  clause_code = OMP_CLAUSE_USE_DEVICE_PTR;
 	  goto add_clause;
-	case OMP_LIST_DEVICE_RESIDENT:
-	  clause_code = OMP_CLAUSE_DEVICE_RESIDENT;
-	  goto add_clause;
 
 	add_clause:
 	  omp_clauses
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 36c128b..9649fae 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -7594,10 +7594,6 @@  gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
 	    remove = true;
 	  break;
 
-	case OMP_CLAUSE_DEVICE_RESIDENT:
-	  remove = true;
-	  break;
-
 	case OMP_CLAUSE_NOWAIT:
 	case OMP_CLAUSE_ORDERED:
 	case OMP_CLAUSE_UNTIED:
@@ -8445,7 +8441,6 @@  gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p,
 	case OMP_CLAUSE__CILK_FOR_COUNT_:
 	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WAIT:
-	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_INDEPENDENT:
 	case OMP_CLAUSE_NUM_GANGS:
 	case OMP_CLAUSE_NUM_WORKERS:
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index e7cb66c..142330c 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2246,7 +2246,6 @@  scan_sharing_clauses (tree clauses, omp_context *ctx,
 	  break;
 
 	case OMP_CLAUSE_BIND:
-	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_NOHOST:
 	case OMP_CLAUSE__CACHE_:
 	default:
@@ -2414,7 +2413,6 @@  scan_sharing_clauses (tree clauses, omp_context *ctx,
 	  break;
 
 	case OMP_CLAUSE_BIND:
-	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_NOHOST:
 	case OMP_CLAUSE__CACHE_:
 	default:
diff --git a/gcc/tree-core.h b/gcc/tree-core.h
index b07ff30..a3c4b18 100644
--- a/gcc/tree-core.h
+++ b/gcc/tree-core.h
@@ -313,9 +313,6 @@  enum omp_clause_code {
      #pragma acc cache (variable-list).  */
   OMP_CLAUSE__CACHE_,
 
-  /* OpenACC clause: device_resident (variable_list).  */
-  OMP_CLAUSE_DEVICE_RESIDENT,
-
   /* OpenACC clause: gang [(gang-argument-list)].
      Where
       gang-argument-list: [gang-argument-list, ] gang-argument
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index ed77798..55f1f20 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1215,7 +1215,6 @@  convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
 	  gcc_unreachable ();
 
 	case OMP_CLAUSE_BIND:
-	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_NOHOST:
 	default:
 	  gcc_unreachable ();
@@ -1914,7 +1913,6 @@  convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
 	  gcc_unreachable ();
 
 	case OMP_CLAUSE_BIND:
-	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_NOHOST:
 	default:
 	  gcc_unreachable ();
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index f5970e1..f1af737 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -407,9 +407,6 @@  dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
     case OMP_CLAUSE__LOOPTEMP_:
       name = "_looptemp_";
       goto print_remap;
-    case OMP_CLAUSE_DEVICE_RESIDENT:
-      name = "device_resident";
-      goto print_remap;
     case OMP_CLAUSE_TO_DECLARE:
       name = "to";
       goto print_remap;
diff --git a/gcc/tree.c b/gcc/tree.c
index f26e282..7c87612 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -281,7 +281,6 @@  unsigned const char omp_clause_num_ops[] =
   1, /* OMP_CLAUSE_USE_DEVICE_PTR  */
   1, /* OMP_CLAUSE_IS_DEVICE_PTR  */
   2, /* OMP_CLAUSE__CACHE_  */
-  1, /* OMP_CLAUSE_DEVICE_RESIDENT  */
   2, /* OMP_CLAUSE_GANG  */
   1, /* OMP_CLAUSE_ASYNC  */
   1, /* OMP_CLAUSE_WAIT  */
@@ -356,7 +355,6 @@  const char * const omp_clause_code_name[] =
   "use_device_ptr",
   "is_device_ptr",
   "_cache_",
-  "device_resident",
   "gang",
   "async",
   "wait",
@@ -11651,7 +11649,6 @@  walk_tree_1 (tree *tp, walk_tree_fn func, void *data,
 	  WALK_SUBTREE (OMP_CLAUSE_OPERAND (*tp, 1));
 	  /* FALLTHRU */
 
-	case OMP_CLAUSE_DEVICE_RESIDENT:
 	case OMP_CLAUSE_ASYNC:
 	case OMP_CLAUSE_WAIT:
 	case OMP_CLAUSE_WORKER: