libgomp: Runtime USM

This patch introduces support for runtime USM, meaning that libgomp
can now automatically detect and set Unified Shared Memory capabilities.
It can be controlled via a new environment variable, 'GOMP_RUNTIME_USM',
which can be set to 'enabled', 'auto', or 'disabled'.  Documentation
for the feature has also been added.

libgomp/ChangeLog:

	* env.c (enum gomp_runtime_usm_t): New environment variable.
	(parse_rt_usm): Parse new environment variable.
	(initialize_env): Behavior handling for new variable.
	* libgomp-plugin.h (GOMP_OFFLOAD_CAP_AUTO_USM): New capability.
	(GOMP_OFFLOAD_get_dev_caps): New function for enumeration.
	* libgomp.h (enum gomp_device_num): Fix whitespace.
	(enum gomp_runtime_usm_t): Define.
	(struct gomp_device_descr): Add 'get_dev_caps_func'.
	* libgomp.texi: Update documentation.
	* plugin/plugin-gcn.c (get_memory_region): Fix whitespace.
	(process_reverse_offload): Ditto.
	(gcn_exec): Remove preprocessor elision.
	(is_apu_with_xnack): New function.
	(GCN_DEVICE): Query XNACK support.
	(GOMP_OFFLOAD_get_dev_caps): New function.
	* plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_dev_caps): Ditto.
	* target.c (gomp_init_device): Logic for deciding USM behavior.
	(gomp_load_plugin_for_device): Get symbol.
	(gomp_target_init): New comment, and fix style.
7 files changed