This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve PR29433, don't duplicate identifier names in dwarf2out


On Thu, 7 Dec 2006, Mark Mitchell wrote:

> Richard Guenther wrote:
> > On Wed, 6 Dec 2006, Mark Mitchell wrote:
> > 
> >> Richard Guenther wrote:
> >>> On Fri, 1 Dec 2006, Mike Stump wrote:
> >>>
> >>>> On Nov 30, 2006, at 11:15 PM, Mark Mitchell wrote:
> >>>>>>>> On Thu, 2006-11-30 at 17:18 +0100, Richard Guenther wrote:
> >>>>>>>>> This patch changes dwarf2out.c to not duplicate the strings in
> >>>>>>>>> identifier
> >>>>> This patch is OK, thanks!
> >>>> The dwarf2 changes I think are safe enough to consider for 4.2, Richard, if
> >>>> you agree, I'd be nice to put them in 4.2 as well.
> >>> I agree in principle - but this isn't a regression, so ...
> >>>
> >>> Mark, is this ok for 4.2 as well?
> >> I think that to put this on 4.2, we need a little bit of rigor: measure
> >> something and show that it uses some significant amount less memory.
> >> We've historically put compile-time improvements on release branches if
> >> they seemed safe, and this qualifies.  So, let's just prove it actually
> >> does something useful, which we certainly expect, and then it's OK.
> > 
> > On the testcase from PR29433 we get a 1.4GB improvement in memory usage
> > compiling with -O0 -g.
> 
> That's plenty of justification; go ahead.

Well, it doesn't apply to 4.2 because the patch which introduced the
regression was applied on trunk only:

2006-11-14  Caroline Tice  <ctice@apple.com>

        * dwarf2out.c (debug_pubtypes_section): New static global 
variable.
        (pubname_entry):  Add DEF_VEC_O and DEF_VEC_ALLOC_O statements for
        this type.
        (pubname_table):  Redefine as a vector.
        (pubtype_table):  New static global variable, defined as a vector.
        (pubname_table_allocated): Remove static global variable.
        (pubname_table_in_use): Remove static global variable.
        (PUBNAME_TABLE_INCREMENT): Remove constant.
        (size_of_pubnames): Add parameter to deal with either pubnames or
        pubtypes, and change code to deal with table being a vector.
        (add_pubname):  Change to deal with table being a vector.
        (add_pubtype):  New function.
        (output_pubnames): Add parameter to deal with either pubnames or
        pubtypes, and change code to deal with table being a vector.
        (gen_array_type_die):  Add call to add_pubtype.
        (gen_enumeration_type_die): Add call to add_pubtype.
        (gen_struct_or_union_type_die): Add call to add_pubtype.
        (gen_subroutine_type_die): Add call to add_pubtype.
        (dwarf2out_init): Add code to initialize pubname_table and
        pubtype_table vectors; also initialize debug_pubtypes_section.
        (prune_unused_types):  Change to deal with pubnames being a 
vector.
        (dwarf2out_finish): Change to deal with pubnames being a vector; 
add
        pubnames table to call to output_pubnames;  Add code to output 
pubtypes
        table if DEBUG_PUBTYPES_SECTION is defined.
        * config/darwin.c (darwin_file_start):  Add DEBUG_PUBTYPES_SECTION 
to
        debugnames.
        * config/darwin.h (DEBUG_PUBTYPES_SECTION): Define new global 
variable.

Richard.

--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]