[gcc/devel/omp/gcc-16] nvptx: remove erroneous stack deletion

Sandra Loosemore via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:a2f391c7879f30bd49bde05870f25f40dcca84e3

commit a2f391c7879f30bd49bde05870f25f40dcca84e3
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 (cleanup_and_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 eecbb82c3ee6..abd0c509848f 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -1981,8 +1981,6 @@ cleanup_and_alloc (int ord, size_t size, bool managed)
   ptx_dev->free_blocks = NULL;
   pthread_mutex_unlock (&ptx_dev->free_blocks_lock);
 
-  nvptx_stacks_free (ptx_dev, false);
-
   while (blocks)
     {
       tmp = blocks->next;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.