From 9319b68ccb43bdb371e78983b74c76dcb49a6e1f Mon Sep 17 00:00:00 2001 From: Andrew Stubbs Date: Tue, 23 Feb 2021 21:35:08 +0000 Subject: [PATCH] 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. --- 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 942fb989bac5..21db2bd29c81 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1411,8 +1411,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; -- 2.47.2