From: Andrew Stubbs Date: Tue, 23 Feb 2021 21:35:08 +0000 (+0000) Subject: nvptx: remove erroneous stack deletion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d71d7ccaa67fc0000ac5ff33ba48ddee9b48284b;p=thirdparty%2Fgcc.git 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. --- diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 23573416a12e..96f2c13a191d 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -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;