]> 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)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 22 Apr 2021 17:14:33 +0000 (10:14 -0700)
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 23573416a12e03c2ce40c6fac073586d85953e6a..96f2c13a191d05f30f9353ed245e32936f772225 100644 (file)
@@ -1412,8 +1412,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;