]> 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>
Tue, 21 Jun 2022 13:11:33 +0000 (14:11 +0100)
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/ChangeLog.omp
libgomp/plugin/plugin-nvptx.c

index e5a076be5576df15bce76102fa5bd9f4bea8d050..4bf75fd6861ac5ec66b95d4e378b7a2bee1a2b08 100644 (file)
@@ -1,3 +1,8 @@
+2021-02-23  Andrew Stubbs  <ams@codesourcery.com>
+
+       * plugin/plugin-nvptx.c (GOMP_OFFLOAD_alloc): Remove early call to
+       nvptx_stacks_free.
+
 2021-02-02  Chung-Lin Tang  <cltang@codesourcery.com>
 
        * libgomp-plugin.h (GOMP_OFFLOAD_supported_features): New declaration.
index 9c6b5d395a297a8bb0a7ebb3171ebd1efdf7732c..eeadc906d03ad08ca98b2ab1b178c6b4f18c1756 100644 (file)
@@ -1428,8 +1428,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;