]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nvptx: remove erroneous stack deletion
authorAndrew Stubbs <ams@codesourcery.com>
Tue, 23 Feb 2021 21:35:08 +0000 (21:35 +0000)
committerAndrew Stubbs <ams@codesourcery.com>
Tue, 2 Mar 2021 14:16:14 +0000 (14:16 +0000)
The stacks are not supposed to be deleted every time memory is allocated, only
when there is insufficient memory.  The unconditional call here seems to be in
error, and is causing a costly reallocation of the stacks before every launch.

libgomp/

* plugin/plugin-nvptx.c (GOMP_OFFLOAD_alloc): Remove early call to
nvptx_stacks_free.

libgomp/plugin/plugin-nvptx.c

index 942fb989bac5ff0faa1401a7dc8fcb2fd4b9eb88..21db2bd29c81fd3ce714cd331b9c66638e7db1d1 100644 (file)
@@ -1411,8 +1411,6 @@ GOMP_OFFLOAD_alloc (int ord, size_t size)
   ptx_dev->free_blocks = NULL;
   pthread_mutex_unlock (&ptx_dev->free_blocks_lock);
 
-  nvptx_stacks_free (ptx_dev, false);
-
   while (blocks)
     {
       tmp = blocks->next;