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]

[PATCH] Fix flag_eliminate_dwarf2_dups/flag_eliminate_unused_debug_types clash


Hello,

the mentioned options interacted badly, because first we have computed
hashes for CU's and then we altered them, causing the created sections
to mismatch. This patch fixes the order.

Anyway, dups removal is moreorless useless together with unused types
removal, as CU's usually won't match. I have a patch to put basic types
into their own CU's somewhere (this lead to almost irrelevant decrease
of debug info size for larger projects); this could be easily modified
so that in case flag_eliminate_unused_debug_types is enabled, it would
move any types into own CU's, thus making the combination useful.

Zdenek

Changelog:
	* dwarf2out.c (dwarf2out_finish): Swap break_out_includes and
	prune_unused_types order.

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.402
diff -c -3 -p -r1.402 dwarf2out.c
*** dwarf2out.c	28 Feb 2003 23:57:47 -0000	1.402
--- dwarf2out.c	3 Mar 2003 20:50:29 -0000
*************** dwarf2out_finish (input_filename)
*** 12977,12987 ****
  
    /* Generate separate CUs for each of the include files we've seen.
       They will go into limbo_die_list.  */
-   if (flag_eliminate_dwarf2_dups)
-     break_out_includes (comp_unit_die);
- 
    if (flag_eliminate_unused_debug_types)
      prune_unused_types ();
  
    /* Traverse the DIE's and add add sibling attributes to those DIE's
       that have children.  */
--- 12977,12987 ----
  
    /* Generate separate CUs for each of the include files we've seen.
       They will go into limbo_die_list.  */
    if (flag_eliminate_unused_debug_types)
      prune_unused_types ();
+ 
+   if (flag_eliminate_dwarf2_dups)
+     break_out_includes (comp_unit_die);
  
    /* Traverse the DIE's and add add sibling attributes to those DIE's
       that have children.  */


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