gcc/libgomp/testsuite
Martin Liska b8d89b03db Remove build dependence on HSA run-time
2016-11-23  Martin Liska  <mliska@suse.cz>
            Martin Jambor  <mjambor@suse.cz>

gcc/
	* doc/install.texi: Remove entry about --with-hsa-kmt-lib.

libgomp/
	* plugin/hsa.h: New file.
	* plugin/hsa_ext_finalize.h: New file.
	* plugin/configfrag.ac: Remove hsa-kmt-lib test.  Added checks for
	header file unistd.h, and functions secure_getenv, __secure_getenv,
	getuid, geteuid, getgid and getegid.
	* plugin/Makefrag.am (libgomp_plugin_hsa_la_CPPFLAGS): Added
	-D_GNU_SOURCE.
	* plugin/plugin-hsa.c: Include config.h, inttypes.h and stdbool.h.
	Handle various cases of secure_getenv presence, add an implementation
	when we can test effective UID and GID.
	(struct hsa_runtime_fn_info): New structure.
	(hsa_runtime_fn_info hsa_fns): New variable.
	(hsa_runtime_lib): Likewise.
	(support_cpu_devices): Likewise.
	(init_enviroment_variables): Load newly introduced ENV
	variables.
	(hsa_warn): Call hsa run-time functions via hsa_fns structure.
	(hsa_fatal): Likewise.
	(DLSYM_FN): New macro.
	(init_hsa_runtime_functions): New function.
	(suitable_hsa_agent_p): Call hsa run-time functions via hsa_fns
	structure.  Depending on environment, also allow CPU devices.
	(init_hsa_context): Call hsa run-time functions via hsa_fns structure.
	(get_kernarg_memory_region): Likewise.
	(GOMP_OFFLOAD_init_device): Likewise.
	(destroy_hsa_program): Likewise.
	(init_basic_kernel_info): New function.
	(GOMP_OFFLOAD_load_image): Use it.
	(create_and_finalize_hsa_program): Call hsa run-time functions via
	hsa_fns structure.
	(create_single_kernel_dispatch): Likewise.
	(release_kernel_dispatch): Likewise.
	(init_single_kernel): Likewise.
	(parse_target_attributes): Allow up multiple HSA grid dimensions.
	(get_group_size): New function.
	(run_kernel): Likewise.
	(GOMP_OFFLOAD_run): Outline most functionality to run_kernel.
	(GOMP_OFFLOAD_fini_device): Call hsa run-time functions via hsa_fns
	structure.
	* testsuite/lib/libgomp.exp: Remove hsa_kmt_lib support.
	* testsuite/libgomp-test-support.exp.in: Likewise.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* config.h.in: Likewise.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.



Co-Authored-By: Martin Jambor <mjambor@suse.cz>

From-SVN: r242749
2016-11-23 13:27:13 +01:00
..
config Update copyright years. 2016-01-04 15:30:50 +01:00
lib Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
libgomp.c omp-low.c (lower_omp_target): Fix up argument to is_reference. 2016-11-10 12:38:05 +01:00
libgomp.c++ typeck.c (cp_build_unary_op): Diagnose incrementing boolean expressions. 2016-09-14 17:46:59 +00:00
libgomp.fortran libgomp testsuite: add missing map clauses 2016-11-15 20:14:32 +03:00
libgomp.graphite Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp.hsa.c [hsa] Avoid segfault in hsa switch expansion 2016-05-23 13:45:13 +02:00
libgomp.oacc-c [PR middle-end/71373] Handle more OMP_CLAUSE_* in nested function decomposition 2016-06-10 11:22:51 +02:00
libgomp.oacc-c++ C++ OpenACC routine directive testing: templated, and "auto", trailing return type syntax 2016-08-04 15:35:10 +02:00
libgomp.oacc-c-c++-common nvptx.c (PTX_GANG_DEFAULT): Set to zero. 2016-11-02 15:10:02 -07:00
libgomp.oacc-fortran re PR middle-end/70895 (OpenACC: loop reduction does not work. Output is zero.) 2016-08-18 14:46:19 +00:00
Makefile.am Merge current set of OpenACC changes from gomp-4_0-branch. 2015-01-15 21:11:12 +01:00
Makefile.in Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
libgomp-test-support.exp.in Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00