public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/omp/gcc-12] nvptx: remove erroneous stack deletion
@ 2022-06-29 14:39 Kwok Yeung
  0 siblings, 0 replies; only message in thread
From: Kwok Yeung @ 2022-06-29 14:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:86a04ff9b51ccf512ccb7578497100888f5f9925

commit 86a04ff9b51ccf512ccb7578497100888f5f9925
Author: Andrew Stubbs <ams@codesourcery.com>
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/ChangeLog.omp         | 5 +++++
 libgomp/plugin/plugin-nvptx.c | 2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index e5a076be557..4bf75fd6861 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,8 @@
+2021-02-23  Andrew Stubbs  <ams@codesourcery.com>
+
+	* plugin/plugin-nvptx.c (GOMP_OFFLOAD_alloc): Remove early call to
+	nvptx_stacks_free.
+
 2021-02-02  Chung-Lin Tang  <cltang@codesourcery.com>
 
 	* libgomp-plugin.h (GOMP_OFFLOAD_supported_features): New declaration.
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index 9c6b5d395a2..eeadc906d03 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -1428,8 +1428,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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-29 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-29 14:39 [gcc/devel/omp/gcc-12] nvptx: remove erroneous stack deletion Kwok Yeung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).