gcc/libgomp
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
plugin Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
testsuite Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
ChangeLog Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
ChangeLog.graphite Add forgotten ChangeLog entries. 2010-03-08 17:49:42 +00:00
Makefile.am omp-low.c (lower_omp_ordered): Add argument to GOMP_SMD_ORDERED_* internal calls - 0 if... 2015-11-14 19:42:13 +01:00
Makefile.in Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
acinclude.m4 Fix Solaris symbol versioning (PR libstdc++/52188) 2012-02-27 13:51:50 +00:00
aclocal.m4 Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
alloc.c Update copyright years. 2016-01-04 15:30:50 +01:00
barrier.c Update copyright years. 2016-01-04 15:30:50 +01:00
config.h.in Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01:00
configure Remove build dependence on HSA run-time 2016-11-23 13:27:13 +01: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 Update copyright years. 2016-01-04 15:30:50 +01:00
env.c Update copyright years. 2016-01-04 15:30:50 +01:00
error.c Update copyright years. 2016-01-04 15:30:50 +01:00
fortran.c Update copyright years. 2016-01-04 15:30:50 +01:00
hashtab.h hashtab.h: Use standard GPLv3 with runtime exception boilerplate. 2016-11-01 17:47:50 +01:00
iter.c Update copyright years. 2016-01-04 15:30:50 +01:00
iter_ull.c Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp-plugin.c Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp-plugin.h Merge of HSA 2016-01-19 11:35:10 +01:00
libgomp.h oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
libgomp.map Merge BUILT_IN_GOACC_HOST_DATA into BUILT_IN_GOACC_DATA_START 2016-02-02 14:53:55 +01:00
libgomp.spec.in Generally link to libgomp for -ftree-parallelize-loops=*. 2013-11-07 16:07:34 +01:00
libgomp.texi * libgomp.texi: Updates for OpenACC. 2016-01-12 17:03:03 +00:00
libgomp_f.h.in Update copyright years. 2016-01-04 15:30:50 +01:00
libgomp_g.h libgomp external ABI prototypes maintenance 2016-04-12 15:13:53 +02:00
loop.c Update copyright years. 2016-01-04 15:30:50 +01:00
loop_ull.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-async.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-cuda.c Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-host.c oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
oacc-init.c oacc-init.c (goacc_new_thread): Use sizeof of the appropriate size when allocating new thread. 2016-10-27 17:36:36 +00:00
oacc-int.h Update copyright years. 2016-01-04 15:30:50 +01:00
oacc-mem.c oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
oacc-parallel.c oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
oacc-plugin.c oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
oacc-plugin.h oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
omp.h.in Update copyright years. 2016-01-04 15:30:50 +01:00
omp_lib.f90.in cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead of 201307. 2016-11-10 18:05:18 +01:00
omp_lib.h.in cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead of 201307. 2016-11-10 18:05:18 +01:00
openacc.f90 Update copyright years. 2016-01-04 15:30:50 +01:00
openacc.h openacc.c (acc_on_device): Add routine pragma for C++ wrapper. 2016-01-06 15:47:14 +00:00
openacc_lib.h Update copyright years. 2016-01-04 15:30:50 +01:00
ordered.c Update copyright years. 2016-01-04 15:30:50 +01:00
parallel.c Update copyright years. 2016-01-04 15:30:50 +01:00
priority_queue.c Update copyright years. 2016-01-04 15:30:50 +01:00
priority_queue.h Update copyright years. 2016-01-04 15:30:50 +01:00
sections.c Update copyright years. 2016-01-04 15:30:50 +01:00
single.c Update copyright years. 2016-01-04 15:30:50 +01:00
splay-tree.c Update copyright years. 2016-01-04 15:30:50 +01:00
splay-tree.h Update copyright years. 2016-01-04 15:30:50 +01:00
target.c oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter. 2016-05-26 13:28:25 +00:00
task.c omp-low.c (lower_omp_target): Use GOMP_MAP_FIRSTPRIVATE_INT regardless whether there are depend clauses or not. 2016-04-12 09:05:29 +02:00
taskloop.c Update copyright years. 2016-01-04 15:30:50 +01:00
team.c Update copyright years. 2016-01-04 15:30:50 +01:00
work.c Update copyright years. 2016-01-04 15:30:50 +01:00