https://gcc.gnu.org/g:adc63e59f99f856ff4cd6b1fdb2331b16f603e41
commit adc63e59f99f856ff4cd6b1fdb2331b16f603e41 Author: Andrew Stubbs <[email protected]> Date: Tue Feb 23 21:35:08 2021 +0000 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: --- libgomp/plugin/plugin-nvptx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index a5cf859db197..d5953c39a6b9 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;
