+2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
+
+ * tree-core.h (enum omp_clause_code): Merge OMP_CLAUSE_USE_DEVICE
+ into OMP_CLAUSE_USE_DEVICE_PTR. Adjust all users.
+
2015-12-23 David Sherwood <david.sherwood@arm.com>
* config/arm/iterators.md (VMAXMINFNM): New int iterator.
+2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-parser.c (c_parser_oacc_clause_use_device): Merge function
+ into...
+ (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
+ all users.
+
2015-12-22 Marek Polacek <polacek@redhat.com>
PR c/69002
return list;
}
-/* OpenMP 4.5:
+/* OpenACC 2.0:
+ use_device ( variable-list )
+
+ OpenMP 4.5:
use_device_ptr ( variable-list ) */
static tree
return c;
}
-/* OpenACC 2.0:
- use_device ( variable-list ) */
-
-static tree
-c_parser_oacc_clause_use_device (c_parser *parser, tree list)
-{
- return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_USE_DEVICE, list);
-}
-
/* OpenACC:
wait ( int-expr-list ) */
c_name = "tile";
break;
case PRAGMA_OACC_CLAUSE_USE_DEVICE:
- clauses = c_parser_oacc_clause_use_device (parser, clauses);
+ clauses = c_parser_omp_clause_use_device_ptr (parser, clauses);
c_name = "use_device";
break;
case PRAGMA_OACC_CLAUSE_VECTOR:
bitmap_set_bit (&map_head, DECL_UID (t));
goto check_dup_generic;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_IS_DEVICE_PTR:
case OMP_CLAUSE_USE_DEVICE_PTR:
t = OMP_CLAUSE_DECL (c);
c_name = "tile";
break;
case PRAGMA_OACC_CLAUSE_USE_DEVICE:
- clauses = cp_parser_omp_var_list (parser, OMP_CLAUSE_USE_DEVICE,
+ clauses = cp_parser_omp_var_list (parser, OMP_CLAUSE_USE_DEVICE_PTR,
clauses);
c_name = "use_device";
break;
case OMP_CLAUSE_FROM:
case OMP_CLAUSE_TO:
case OMP_CLAUSE_MAP:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
OMP_CLAUSE_DECL (nc)
case OMP_CLAUSE_COPYPRIVATE:
case OMP_CLAUSE_LINEAR:
case OMP_CLAUSE_REDUCTION:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
/* tsubst_expr on SCOPE_REF results in returning
}
break;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_IS_DEVICE_PTR:
case OMP_CLAUSE_USE_DEVICE_PTR:
field_ok = allow_fields;
clause_code = OMP_CLAUSE_UNIFORM;
goto add_clause;
case OMP_LIST_USE_DEVICE:
- clause_code = OMP_CLAUSE_USE_DEVICE;
+ clause_code = OMP_CLAUSE_USE_DEVICE_PTR;
goto add_clause;
case OMP_LIST_DEVICE_RESIDENT:
clause_code = OMP_CLAUSE_DEVICE_RESIDENT;
}
goto do_notice;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
flags = GOVD_FIRSTPRIVATE | GOVD_EXPLICIT;
goto do_add;
case OMP_CLAUSE_ASYNC:
case OMP_CLAUSE_WAIT:
case OMP_CLAUSE_DEVICE_RESIDENT:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_INDEPENDENT:
case OMP_CLAUSE_NUM_GANGS:
case OMP_CLAUSE_NUM_WORKERS:
install_var_local (decl, ctx);
break;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
decl = OMP_CLAUSE_DECL (c);
if (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE)
case OMP_CLAUSE_SIMD:
case OMP_CLAUSE_NOGROUP:
case OMP_CLAUSE_DEFAULTMAP:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE__CILK_FOR_COUNT_:
case OMP_CLAUSE_ASYNC:
}
break;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
var = OMP_CLAUSE_DECL (c);
build_int_cstu (tkind_type, tkind));
break;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
ovar = OMP_CLAUSE_DECL (c);
var = lookup_decl_in_outer_ctx (ovar, ctx);
x = build_sender_ref (ovar, ctx);
- if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_USE_DEVICE_PTR
- || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_USE_DEVICE)
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_USE_DEVICE_PTR)
tkind = GOMP_MAP_USE_DEVICE_PTR;
else
tkind = GOMP_MAP_FIRSTPRIVATE_INT;
gimple_build_assign (new_var, x));
}
break;
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
var = OMP_CLAUSE_DECL (c);
- if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_USE_DEVICE_PTR
- || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_USE_DEVICE)
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_USE_DEVICE_PTR)
x = build_sender_ref (var, ctx);
else
x = build_receiver_ref (var, false, ctx);
!$acc host_data use_device(i)
!$acc end host_data
end program test
-! { dg-final { scan-tree-dump-times "pragma acc host_data use_device\\(i\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "pragma acc host_data use_device_ptr\\(i\\)" 1 "original" } }
OpenMP clause: map ({alloc:,to:,from:,tofrom:,}variable-list). */
OMP_CLAUSE_MAP,
- /* OpenMP clause: use_device_ptr (variable-list). */
+ /* OpenACC clause: use_device (variable_list).
+ OpenMP clause: use_device_ptr (variable-list). */
OMP_CLAUSE_USE_DEVICE_PTR,
/* OpenMP clause: is_device_ptr (variable-list). */
/* OpenACC clause: device_resident (variable_list). */
OMP_CLAUSE_DEVICE_RESIDENT,
- /* OpenACC clause: use_device (variable_list). */
- OMP_CLAUSE_USE_DEVICE,
-
/* OpenACC clause: gang [(gang-argument-list)].
Where
gang-argument-list: [gang-argument-list, ] gang-argument
case OMP_CLAUSE_SHARED:
case OMP_CLAUSE_TO_DECLARE:
case OMP_CLAUSE_LINK:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
do_decl_clause:
case OMP_CLAUSE_SHARED:
case OMP_CLAUSE_TO_DECLARE:
case OMP_CLAUSE_LINK:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_USE_DEVICE_PTR:
case OMP_CLAUSE_IS_DEVICE_PTR:
do_decl_clause:
case OMP_CLAUSE_DEVICE_RESIDENT:
name = "device_resident";
goto print_remap;
- case OMP_CLAUSE_USE_DEVICE:
- name = "use_device";
- goto print_remap;
case OMP_CLAUSE_TO_DECLARE:
name = "to";
goto print_remap;
1, /* OMP_CLAUSE_IS_DEVICE_PTR */
2, /* OMP_CLAUSE__CACHE_ */
1, /* OMP_CLAUSE_DEVICE_RESIDENT */
- 1, /* OMP_CLAUSE_USE_DEVICE */
2, /* OMP_CLAUSE_GANG */
1, /* OMP_CLAUSE_ASYNC */
1, /* OMP_CLAUSE_WAIT */
"is_device_ptr",
"_cache_",
"device_resident",
- "use_device",
"gang",
"async",
"wait",
/* FALLTHRU */
case OMP_CLAUSE_DEVICE_RESIDENT:
- case OMP_CLAUSE_USE_DEVICE:
case OMP_CLAUSE_ASYNC:
case OMP_CLAUSE_WAIT:
case OMP_CLAUSE_WORKER: