This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] ipa-profile.c: reset call_sums state within ipa-profile.c (v2; PR 93315)
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Martin Liška <mliska at suse dot cz>, luoxhu <luoxhu at linux dot ibm dot com>, Christophe Lyon <christophe dot lyon at linaro dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, Bill Schmidt <wschmidt at linux dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 21 Jan 2020 10:32:57 -0500
- Subject: Re: [PATCH] ipa-profile.c: reset call_sums state within ipa-profile.c (v2; PR 93315)
- References: <20200118174234.GB40492@kam.mff.cuni.cz> <20200121135640.17844-1-dmalcolm@redhat.com> <20200121151031.GB4245@kam.mff.cuni.cz>
On Tue, 2020-01-21 at 16:10 +0100, Jan Hubicka wrote:
> > If we do, then, if I understand correctly, this would only affect
> > someone who tried to use libgccjit to generate .o files with -flto,
> > repeatedly, within a single process. I don't know of anyone doing
> > that, and if that's broken, that would be a separate, pre-existing,
> > bug, I think.
>
> Yes, i think we can play with that incrementally especially if
> someone
> tries to use -flto with JIT setup (which by itself looks like bit of
> overkill but perhaps things like offloading or so could make this
> meaningful).
>
> Honza
> > Dave
Thanks. Is the patch OK?
> > gcc/ChangeLog:
> > PR ipa/93315
> > * ipa-profile.c (ipa_profile): Delete call_sums and set it to
> > NULL on exit.
> > ---
> > gcc/ipa-profile.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c
> > index 03272f20987..a69ba0c373a 100644
> > --- a/gcc/ipa-profile.c
> > +++ b/gcc/ipa-profile.c
> > @@ -1023,6 +1023,9 @@ ipa_profile (void)
> > if (dump_file && (dump_flags & TDF_DETAILS))
> > symtab->dump (dump_file);
> >
> > + delete call_sums;
> > + call_sums = NULL;
> > +
> > return 0;
> > }
> >
> > --
> > 2.21.0
> >