This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR c++/27574 (PING)
> On Mon, Nov 3, 2008 at 2:53 PM, Dodji Seketeli <dodji@redhat.com> wrote:
> > Richard Guenther a écrit :
> >>
> >> Hm. What is the effect on text size for C++ applications?
> >
> > Well, I don't have any hard figures for that, but I suspect that as the only
> > the bodies of abstract functions which clones are reachable (and thus which
> > bodies are emitted) are now being added, the text size might grow only very
> > slightly.
> >
> > In any case, I am rebuilding/installing a gcc tree here so that I can
> > compile some c++ programs of mine to come up with some data.
> >
> >> We do not need the function text itself but only its debug information -
> >> the debug
> >> information for the decl, not the text, correct?
> >
> > I think for a function decl, we "only" need DECL_ARGUMENTS (decl) and
> > DECL_INITIAL (decl) to be present so that we can generate debug info.
>
> So the only problem is the following line
>
> DECL_INITIAL (node->decl) = error_mark_node;
>
> in cgraph_release_function_body? Does it fix the PR
> if you make that conditional on DECL_ABSTRACT?
The reason for setting DECL_INITIAL there was that BLOCK pointers used
to point to generic function body that remained in memory.
I think it is not needed at all and might not be the case anymore, so it
might be fine. Still blocks occupy quite a lot of ram, can dwarf2out be
in charge of releasing them?
Honza
>
> Thanks,
> Richard.