Re: [PATCH 0/3] Enable pointer_query caching throughout.
On 2/3/22 17:33, Martin Sebor wrote: On 2/3/22 17:18, David Edelsohn wrote: On Thu, Feb 3, 2022 at 6:09 PM Martin Sebor wrote: 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.) Hi, Martin Thanks for the quick response. Yes, I am able to restore bootstrap on AIX (32 bit) with the change. Let me finish testing it and if all goes well commit it later tonight. Now pushed as r12-7043. Martin Thanks for the confirmation! Martin Thanks, David 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 indices; + auto_vec indices; /* The cache itself. */ - vec access_refs; + auto_vec access_refs; }; public:
Re: [PATCH 0/3] Enable pointer_query caching throughout.
On 2/3/22 17:18, David Edelsohn wrote: On Thu, Feb 3, 2022 at 6:09 PM Martin Sebor wrote: 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.) Hi, Martin Thanks for the quick response. Yes, I am able to restore bootstrap on AIX (32 bit) with the change. Let me finish testing it and if all goes well commit it later tonight. Thanks for the confirmation! Martin Thanks, David 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 indices; +auto_vec indices; /* The cache itself. */ -vec access_refs; +auto_vec access_refs; }; public:
Re: [PATCH 0/3] Enable pointer_query caching throughout.
On Thu, Feb 3, 2022 at 6:09 PM Martin Sebor wrote: > > 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.) Hi, Martin Thanks for the quick response. Yes, I am able to restore bootstrap on AIX (32 bit) with the change. Thanks, David > > 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 indices; > +auto_vec indices; > /* The cache itself. */ > -vec access_refs; > +auto_vec access_refs; > }; > > public:
Re: [PATCH 0/3] Enable pointer_query caching throughout.
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 indices; +auto_vec indices; /* The cache itself. */ -vec access_refs; +auto_vec access_refs; }; public:
Re: [PATCH 0/3] Enable pointer_query caching throughout.
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. Thanks, David
Re: [PATCH 0/3] Enable pointer_query caching throughout.
On Thu, Feb 3, 2022 at 12:35 AM Martin Sebor wrote: > > Richard, as we discussed(*), this patch series enables the pointer_query > cache in the remaining two passes where it's currently disabled. Since > not using the cache is not an option anymore, the first patch in > the series makes it a private member of the pointer_query class and its > use unconditional. It also simplifies the two passes that use it to > avoid having to install it. > > Tested on x86_64-linux. OK for the whole series. Thanks for fixing this issue! Richard. > Martin > > [*] For reference: > https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589243.html
[PATCH 0/3] Enable pointer_query caching throughout.
Richard, as we discussed(*), this patch series enables the pointer_query cache in the remaining two passes where it's currently disabled. Since not using the cache is not an option anymore, the first patch in the series makes it a private member of the pointer_query class and its use unconditional. It also simplifies the two passes that use it to avoid having to install it. Tested on x86_64-linux. Martin [*] For reference: https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589243.html