]> git.ipfire.org Git - thirdparty/gcc.git/commit
amdgcn, libgomp: custom USM allocator
authorAndrew Stubbs <ams@codesourcery.com>
Tue, 13 Dec 2022 23:31:21 +0000 (23:31 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Wed, 11 Jan 2023 17:10:29 +0000 (17:10 +0000)
commit2d6fb9681337077a3b639f94ed725245f17bc596
tree9884bb307643202aafe5d3b3d88797f25cecc8a0
parent8f0788600840869e9fa016ff08ad07eb485a4f83
amdgcn, libgomp: custom USM allocator

There were problems with critical driver data sharing pages with USM data, so
this new allocator implementation moves USM to entirely different pages.

libgomp/ChangeLog:

* plugin/plugin-gcn.c: Include sys/mman.h and unistd.h.
(usm_heap_create): New function.
(struct usm_splay_tree_key_s): Delete function.
(usm_splay_compare): Delete function.
(splay_tree_prefix): Delete define.
(GOMP_OFFLOAD_usm_alloc): Use new allocator.
(GOMP_OFFLOAD_usm_free): Likewise.
(GOMP_OFFLOAD_is_usm_ptr): Likewise.
(gomp_fatal): Delete macro.
(splay_tree_c): Delete.
* usm-allocator.c: New file.
libgomp/plugin/plugin-gcn.c
libgomp/usm-allocator.c [new file with mode: 0644]