public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Sebor <msebor@gmail.com>
To: David Edelsohn <dje.gcc@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH 0/3] Enable pointer_query caching throughout.
Date: Thu, 3 Feb 2022 16:09:03 -0700	[thread overview]
Message-ID: <008f4f40-3d6c-6e50-5b95-c20444a50873@gmail.com> (raw)
In-Reply-To: <CAGWvnyk6owNqhn2GqKLM=MqSvN=OLbCGw4nCZg0NN2bB+D_kng@mail.gmail.com>

On 2/3/22 15:56, David Edelsohn wrote:
> This series of patches has exploded memory usage and I can no longer
> bootstrap GCC on AIX.
> 
> As with the Ranger problem exposed by Aldy's patch last September,
> something is not freeing memory.
> 
> Even on systems where GCC still bootstrap, this excessive memory usage
> severely damages GCC compile performance.

Does the change below by any chance make a difference?  (It's just
a hunch, I haven't tested it beyond quickly building stage 1 and
running a few tests.)

Martin


diff --git a/gcc/pointer-query.h b/gcc/pointer-query.h
index 4c725eeaf34..801a240c38d 100644
--- a/gcc/pointer-query.h
+++ b/gcc/pointer-query.h
@@ -164,9 +164,9 @@ class pointer_query
    struct cache_type
    {
      /* 1-based indices into cache.  */
-    vec<unsigned> indices;
+    auto_vec<unsigned> indices;
      /* The cache itself.  */
-    vec<access_ref> access_refs;
+    auto_vec<access_ref> access_refs;
    };

  public:

  reply	other threads:[~2022-02-03 23:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 22:56 David Edelsohn
2022-02-03 23:09 ` Martin Sebor [this message]
2022-02-04  0:18   ` David Edelsohn
2022-02-04  0:33     ` Martin Sebor
2022-02-04  2:49       ` Martin Sebor
  -- strict thread matches above, loose matches on Subject: below --
2022-02-02 23:35 Martin Sebor
2022-02-03  9:07 ` Richard Biener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=008f4f40-3d6c-6e50-5b95-c20444a50873@gmail.com \
    --to=msebor@gmail.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).