gcc/libgomp
James Norris 6e232ba424 c-pragma.c (oacc_pragmas): Add entry for declare directive.
2015-11-12  James Norris  <jnorris@codesourcery.com>
	    Joseph Myers  <joseph@codesourcery.com>

	gcc/c-family/
	* c-pragma.c (oacc_pragmas): Add entry for declare directive. 
	* c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
	(enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
	PRAGMA_OACC_CLAUSE_LINK.

	gcc/c/
	* c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
	(c_parser_omp_clause_name): Handle 'device_resident' clause.
	(c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
	and PRAGMA_OMP_CLAUSE_LINK.
	(c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
	and PRAGMA_OACC_CLAUSE_LINK.
	(OACC_DECLARE_CLAUSE_MASK): New definition.
	(c_parser_oacc_declare): New function.

	gcc/cp/
	* parser.c (cp_parser_omp_clause_name): Handle 'device_resident'
	clause.
	(cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
	and PRAGMA_OMP_CLAUSE_LINK.
	(cp_paser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
	and PRAGMA_OMP_CLAUSE_LINK.
	(OACC_DECLARE_CLAUSE_MASK): New definition.
	(cp_parser_oacc_declare): New function.
	(cp_parser_pragma): Handle PRAGMA_OACC_DECLARE.
	* pt.c (tsubst_expr): Handle OACC_DECLARE.

	gcc/
	* gimple-pretty-print.c (dump_gimple_omp_target): Handle
	GF_OMP_TARGET_KIND_OACC_DECLARE. 
	* gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_DECLARE.
	(is_gomple_omp_oacc): Handle GF_OMP_TARGET_KIND_OACC_DECLARE.
	* gimplify.c (oacc_declare_returns): New.
	(gimplify_bind_expr): Prepend 'exit' stmt to cleanup.
	(device_resident_p): New function.
	(oacc_default_clause): Handle device_resident clause.
	(gimplify_oacc_declare_1, gimplify_oacc_declare): New functions.
	(gimplify_expr): Handle OACC_DECLARE.
	* omp-builtins.def (BUILT_IN_GOACC_DECLARE): New builtin.
	* omp-low.c (expand_omp_target): Handle
	GF_OMP_TARGET_KIND_OACC_DECLARE and BUILTIN_GOACC_DECLARE.
	(build_omp_regions_1): Handlde GF_OMP_TARGET_KIND_OACC_DECLARE.
	(lower_omp_target): Handle GF_OMP_TARGET_KIND_OACC_DECLARE,
	GOMP_MAP_DEVICE_RESIDENT and GOMP_MAP_LINK.
	(make_gimple_omp_edges): Handle GF_OMP_TARGET_KIND_OACC_DECLARE.
	* tree-pretty-print.c (dump_omp_clause): Handle GOMP_MAP_LINK and
	GOMP_MAP_DEVICE_RESIDENT.

	gcc/testsuite
	* c-c++-common/goacc/declare-1.c: New test.
	* c-c++-common/goacc/declare-2.c: Likewise.

	include/
	* gomp-constants.h (enum gomp_map_kind): Add GOMP_MAP_DEVICE_RESIDENT
	and GOMP_MAP_LINK.

	libgomp/
	* libgomp.map (GOACC_2.0.1): Export GOACC_declare.
	* oacc-parallel.c (GOACC_declare): New function.
	* testsuite/libgomp.oacc-c-c++-common/declare-1.c: New test.
	* testsuite/libgomp.oacc-c-c++-common/declare-2.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/declare-4.c: Likewise.
	* testsuite/libgomp.oacc-c-c++-common/declare-5.c: Likewise.
	* testsuite/libgomp.oacc-c++/declare-1.C: Likewise.

Co-Authored-By: Joseph Myers <joseph@codesourcery.com>

From-SVN: r230275
2015-11-12 22:20:41 +00:00
..
config builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
plugin libgomp.h (struct acc_dispatch_t): Remove args from exec_func. 2015-11-03 20:18:33 +00:00
testsuite c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 22:20:41 +00:00
ChangeLog c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 22:20:41 +00:00
ChangeLog.graphite
Makefile.am Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
Makefile.in [PR libgomp/65742, PR middle-end/66332] libgomp: Remove plugin for non-shared memory host execution 2015-08-10 18:48:26 +02:00
acinclude.m4
aclocal.m4 libgomp: Bump to automake 1.11.6 2015-05-13 11:24:38 +00:00
alloc.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
barrier.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
config.h.in Fix --enable-offload-targets/-foffload handling, pt. 1 2015-09-23 16:52:50 +02:00
configure [gomp] Add RTEMS configuration 2015-09-03 11:26:36 +00:00
configure.ac [gomp] Add RTEMS configuration 2015-09-03 11:26:36 +00:00
configure.tgt configure.tgt: Add missing ;; in between nvptx and rtems snippets. 2015-09-03 18:20:35 +02:00
critical.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
env.c builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
error.c Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
fortran.c [gomp] Fix build for 32-bit targets with int != int32_t 2015-10-14 08:30:52 +00:00
hashtab.h Update copyright years. 2015-01-05 13:33:28 +01:00
iter.c re PR libgomp/66761 (libgomp: ThreadSanitizer: data race in libgomp) 2015-08-24 11:01:25 +00:00
iter_ull.c re PR libgomp/66761 (libgomp: ThreadSanitizer: data race in libgomp) 2015-08-24 11:01:25 +00:00
libgomp-plugin.c libgomp: Make GOMP_PLUGIN_debug actually work... 2015-02-17 19:24:07 +01:00
libgomp-plugin.h [PR libgomp/65742, PR middle-end/66332] libgomp: Remove plugin for non-shared memory host execution 2015-08-10 18:48:26 +02:00
libgomp.h libgomp.h (struct acc_dispatch_t): Remove args from exec_func. 2015-11-03 20:18:33 +00:00
libgomp.map c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 22:20:41 +00:00
libgomp.spec.in
libgomp.texi builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
libgomp_f.h.in libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
libgomp_g.h gcc/ 2015-11-05 16:08:08 +01:00
loop.c gcc/ 2015-11-05 16:08:08 +01:00
loop_ull.c gcc/ 2015-11-05 16:08:08 +01:00
oacc-async.c mkoffload.c (process): Support variable mapping. 2015-04-08 15:58:33 +00:00
oacc-cuda.c mkoffload.c (process): Support variable mapping. 2015-04-08 15:58:33 +00:00
oacc-host.c libgomp.h (struct acc_dispatch_t): Remove args from exec_func. 2015-11-03 20:18:33 +00:00
oacc-init.c libgomp: Additional acc_shutdown bug fixing and testing 2015-10-26 17:24:44 +01:00
oacc-int.h re PR libgomp/67141 (wrong libgomp mutex initialisation order) 2015-09-22 06:45:22 +00:00
oacc-mem.c [PR libgomp/65437, libgomp/66518] Initialize runtime in acc_update_device, acc_update_self 2015-10-26 17:24:17 +01:00
oacc-parallel.c c-pragma.c (oacc_pragmas): Add entry for declare directive. 2015-11-12 22:20:41 +00:00
oacc-plugin.c Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
oacc-plugin.h Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
omp.h.in builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
omp_lib.f90.in builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
omp_lib.h.in builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
openacc.f90 [PR libgomp/65742, PR middle-end/66332] libgomp: Remove plugin for non-shared memory host execution 2015-08-10 18:48:26 +02:00
openacc.h openacc.h (enum acc_device_t): Reformat. 2015-10-30 00:13:22 +00:00
openacc_lib.h [PR libgomp/65742, PR middle-end/66332] libgomp: Remove plugin for non-shared memory host execution 2015-08-10 18:48:26 +02:00
ordered.c builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
parallel.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
sections.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
single.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00
splay-tree.c Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
splay-tree.h Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
target.c gcc/ 2015-11-05 16:08:08 +01:00
task.c builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
taskloop.c builtin-types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR, [...]): New. 2015-10-13 21:06:23 +02:00
team.c [gomp] Add thread attribute customization 2015-09-03 11:34:28 +00:00
work.c libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library. 2015-01-10 20:10:37 +01:00