gcc/libgomp/config
Andrew Stubbs e7d6c277fa amdgcn, libgomp: low-latency allocator
This implements the OpenMP low-latency memory allocator for AMD GCN using the
small per-team LDS memory (Local Data Store).

Since addresses can now refer to LDS space, the "Global" address space is
no-longer compatible.  This patch therefore switches the backend to use
entirely "Flat" addressing (which supports both memories).  A future patch
will re-enable "global" instructions for cases where it is known to be safe
to do so.

gcc/ChangeLog:

	* config/gcn/gcn-builtins.def (DISPATCH_PTR): New built-in.
	* config/gcn/gcn.cc (gcn_init_machine_status): Disable global
	addressing.
	(gcn_expand_builtin_1): Implement GCN_BUILTIN_DISPATCH_PTR.

libgomp/ChangeLog:

	* config/gcn/libgomp-gcn.h (TEAM_ARENA_START): Move to here.
	(TEAM_ARENA_FREE): Likewise.
	(TEAM_ARENA_END): Likewise.
	(GCN_LOWLAT_HEAP): New.
	* config/gcn/team.c (LITTLEENDIAN_CPU): New, and import hsa.h.
	(__gcn_lowlat_init): New prototype.
	(gomp_gcn_enter_kernel): Initialize the low-latency heap.
	* libgomp.h (TEAM_ARENA_START): Move to libgomp.h.
	(TEAM_ARENA_FREE): Likewise.
	(TEAM_ARENA_END): Likewise.
	* plugin/plugin-gcn.c (lowlat_size): New variable.
	(print_kernel_dispatch): Label the group_segment_size purpose.
	(init_environment_variables): Read GOMP_GCN_LOWLAT_POOL.
	(create_kernel_dispatch): Pass low-latency head allocation to kernel.
	(run_kernel): Use shadow; don't assume values.
	* testsuite/libgomp.c/omp_alloc-traits.c: Enable for amdgcn.
	* config/gcn/allocator.c: New file.
	* libgomp.texi: Document low-latency implementation details.
2023-12-06 16:48:57 +00:00
..
accel openmp: Add support for the 'indirect' clause in C/C++ 2023-11-07 15:44:50 +00:00
bsd Update copyright years. 2023-01-16 11:52:17 +01:00
darwin Update copyright years. 2023-01-16 11:52:17 +01:00
gcn amdgcn, libgomp: low-latency allocator 2023-12-06 16:48:57 +00:00
hpux Update copyright years. 2023-01-16 11:52:17 +01:00
linux Fix libgomp build on targets that are not Linux-based or accelerators 2023-11-07 22:20:53 +00:00
mingw32 Update copyright years. 2023-01-16 11:52:17 +01:00
nvptx openmp, nvptx: low-lat memory access traits 2023-12-06 16:48:57 +00:00
posix Update copyright years. 2023-01-16 11:52:17 +01:00
rtems Update copyright years. 2023-01-16 11:52:17 +01:00
t-aix aix: remove libgomp and libatomic archives before creating FAT archives 2020-10-11 17:30:24 -04:00