diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-02-17 14:13:15 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-03-24 17:26:18 +0100 |
commit | b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a (patch) | |
tree | c1abd94286bf36a5bb7a3f1f0822da7c84a62c59 | |
parent | 5bb50fb4e8fd10b4f6180e756380161c1ffd8a3e (diff) | |
download | gcc-b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a.zip gcc-b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a.tar.gz gcc-b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a.tar.bz2 |
Miscellaneous clean-up re OpenMP 'ompx_host_mem_space'
Like done for nvptx in og12 commit 23f52e49368d7b26a1b1a72d6bb903d31666e961
"Miscellaneous clean-up re OpenMP 'ompx_unified_shared_mem_space', 'ompx_host_mem_space'".
Clean-up for og12 commit c77c45a641fedc3fe770e909cc010fb1735bdbbd
"amdgcn, libgomp: low-latency allocator". No functional change.
libgomp/
* config/gcn/allocator.c (gcn_memspace_free): Explicitly handle
'memspace == ompx_host_mem_space'.
-rw-r--r-- | libgomp/ChangeLog.omp | 3 | ||||
-rw-r--r-- | libgomp/config/gcn/allocator.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 63d1f56..ef957e3 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,8 @@ 2023-03-24 Thomas Schwinge <thomas@codesourcery.com> + * config/gcn/allocator.c (gcn_memspace_free): Explicitly handle + 'memspace == ompx_host_mem_space'. + Backported from master: 2023-03-24 Thomas Schwinge <thomas@codesourcery.com> diff --git a/libgomp/config/gcn/allocator.c b/libgomp/config/gcn/allocator.c index 001de89..e9980f6 100644 --- a/libgomp/config/gcn/allocator.c +++ b/libgomp/config/gcn/allocator.c @@ -36,6 +36,7 @@ when the memspace access trait is set accordingly. */ #include "libgomp.h" +#include <assert.h> #include <stdlib.h> #define BASIC_ALLOC_PREFIX __gcn_lowlat @@ -86,6 +87,9 @@ gcn_memspace_free (omp_memspace_handle_t memspace, void *addr, size_t size) __gcn_lowlat_free (shared_pool, addr, size); } + else if (memspace == ompx_host_mem_space) + /* Just verify what all allocator functions return. */ + assert (addr == NULL); else free (addr); } |