aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2021-02-23 21:35:08 +0000
committerSandra Loosemore <sloosemore@baylibre.com>2025-05-15 20:25:46 +0000
commitadc63e59f99f856ff4cd6b1fdb2331b16f603e41 (patch)
treee82c7469731decf2ab0e1ed4a94e682ce3cda4fc
parent36d4c7cc19ebe08be4a421411e602630a763650e (diff)
downloadgcc-adc63e59f99f856ff4cd6b1fdb2331b16f603e41.zip
gcc-adc63e59f99f856ff4cd6b1fdb2331b16f603e41.tar.gz
gcc-adc63e59f99f856ff4cd6b1fdb2331b16f603e41.tar.bz2
nvptx: remove erroneous stack deletion
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.
-rw-r--r--libgomp/plugin/plugin-nvptx.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index a5cf859..d5953c3 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -1799,8 +1799,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;