From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id C092F384F00E; Fri, 24 Mar 2023 16:28:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C092F384F00E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679675308; bh=znQYoW02Z/8h6bGgS4pUlHKOVP/Y9ow7LNhy0nHDXmU=; h=From:To:Subject:Date:From; b=buBPsQyia/4ijkfeR/ZUgoqqHTPMTMdnrQwWz0FKkWC/adjG7QANyf9axXDjifPRT W7G1QMl9hTw8EdcKBXzU7CUTSuoqxG+VYBHpHU/cxoCOCGKu19AG9XVmhMlG6LK+6G jNYsH+1PXwqWnbpPq4OqfHFlrpN5OSudL9SVQ1Uo= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/omp/gcc-12] Miscellaneous clean-up re OpenMP 'ompx_host_mem_space' X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/devel/omp/gcc-12 X-Git-Oldrev: 5bb50fb4e8fd10b4f6180e756380161c1ffd8a3e X-Git-Newrev: b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a Message-Id: <20230324162828.C092F384F00E@sourceware.org> Date: Fri, 24 Mar 2023 16:28:28 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a commit b39e4bbab59f5e4b551c44dbce0ce3acf4afc22a Author: Thomas Schwinge Date: Fri Feb 17 14:13:15 2023 +0100 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'. Diff: --- libgomp/ChangeLog.omp | 3 +++ libgomp/config/gcn/allocator.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index 63d1f563d5d..ef957e3d2d8 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,5 +1,8 @@ 2023-03-24 Thomas Schwinge + * config/gcn/allocator.c (gcn_memspace_free): Explicitly handle + 'memspace == ompx_host_mem_space'. + Backported from master: 2023-03-24 Thomas Schwinge diff --git a/libgomp/config/gcn/allocator.c b/libgomp/config/gcn/allocator.c index 001de89ffe0..e9980f6f98e 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 #include #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); }