gcc/libgomp
Jakub Jelinek 800bcc8c00 openmp: Add basic library allocator support.
This patch adds very basic allocator support (omp_{init,destroy}_allocator,
omp_{alloc,free}, omp_[sg]et_default_allocator).
The plan is to use memkind (likely dlopened) for high bandwidth memory, but
that part isn't implemented yet, probably mlock for pinned memory and see
what other options there are for other kinds of memory.
For offloading targets, we need to decide if we want to support the
dynamic allocators (and on which targets), or if e.g. all we do is at compile
time replace omp_alloc/omp_free calls with constexpr predefined allocators
with something special.

And allocate directive and allocator/uses_allocators clauses are future work
too.

2020-05-19  Jakub Jelinek  <jakub@redhat.com>

	* omp.h.in (omp_uintptr_t): New typedef.
	(__GOMP_UINTPTR_T_ENUM): Define.
	(omp_memspace_handle_t, omp_allocator_handle_t, omp_alloctrait_key_t,
	omp_alloctrait_value_t, omp_alloctrait_t): New typedefs.
	(__GOMP_DEFAULT_NULL_ALLOCATOR): Define.
	(omp_init_allocator, omp_destroy_allocator, omp_set_default_allocator,
	omp_get_default_allocator, omp_alloc, omp_free): Declare.
	* libgomp.h (struct gomp_team_state): Add def_allocator field.
	(gomp_def_allocator): Declare.
	* libgomp.map (OMP_5.0.1): Export omp_set_default_allocator,
	omp_get_default_allocator, omp_init_allocator, omp_destroy_allocator,
	omp_alloc and omp_free.
	* team.c (gomp_team_start): Copy over ts.def_allocator.
	* env.c (gomp_def_allocator): New variable.
	(parse_wait_policy): Adjust function comment.
	(parse_allocator): New function.
	(handle_omp_display_env): Print OMP_ALLOCATOR.
	(initialize_env): Call parse_allocator.
	* Makefile.am (libgomp_la_SOURCES): Add allocator.c.
	* allocator.c: New file.
	* icv.c (omp_set_default_allocator, omp_get_default_allocator): New
	functions.
	* testsuite/libgomp.c-c++-common/alloc-1.c: New test.
	* testsuite/libgomp.c-c++-common/alloc-2.c: New test.
	* testsuite/libgomp.c-c++-common/alloc-3.c: New test.
	* Makefile.in: Regenerated.
2020-05-19 10:11:01 +02:00
..
config [OpenACC] Set 'acc_device_current = -1' 2020-04-29 09:54:37 +02:00
plugin amdgcn: Check HSA return codes [PR94629] 2020-04-23 15:05:23 +01:00
testsuite openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
.gitattributes
acc_prof.h
acinclude.m4
aclocal.m4
affinity-fmt.c
affinity.c
alloc.c
atomic.c
barrier.c
ChangeLog openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
ChangeLog.graphite
config.h.in
configure x86: Also check if -fcf-protection works 2020-05-15 09:07:17 -07:00
configure.ac libgomp/test: Remove a build sysroot fix regression 2020-04-06 23:32:45 +01:00
configure.tgt
critical.c
env.c openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
error.c
fortran.c
hashtab.h
icv-device.c
icv.c openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
iter_ull.c
iter.c
libgomp_f.h.in
libgomp_g.h
libgomp-plugin.c
libgomp-plugin.h
libgomp.h openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
libgomp.map openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
libgomp.spec.in
libgomp.texi
lock.c
loop_ull.c
loop.c
Makefile.am openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
Makefile.in openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
oacc-async.c
oacc-cuda.c
oacc-host.c
oacc-init.c [gcn] Use 'radeon' for the environment variable 'ACC_DEVICE_TYPE' 2020-04-29 09:24:07 +02:00
oacc-int.h
oacc-mem.c
oacc-parallel.c
oacc-plugin.c
oacc-plugin.h
oacc-profiling.c
oacc-target.c
omp_lib.f90.in
omp_lib.h.in
omp.h.in openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
openacc_lib.h [OpenACC] Set 'acc_device_current = -1' 2020-04-29 09:54:37 +02:00
openacc.f90 [OpenACC] Set 'acc_device_current = -1' 2020-04-29 09:54:37 +02:00
openacc.h [OpenACC] Set 'acc_device_current = -1' 2020-04-29 09:54:37 +02:00
ordered.c
parallel.c
priority_queue.c
priority_queue.h
sections.c
secure_getenv.h
single.c
splay-tree.c
splay-tree.h
target.c libgomp – fix handling of 'target enter data' 2020-03-31 20:38:38 +02:00
task.c
taskloop.c
team.c openmp: Add basic library allocator support. 2020-05-19 10:11:01 +02:00
teams.c
work.c