public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: Tom Tromey <tromey@redhat.com>, gcc-patches@gcc.gnu.org
Subject: [patch#2] dwarf2out: Drop the size + performance overhead of DW_AT_sibling
Date: Tue, 18 Oct 2011 09:03:00 -0000	[thread overview]
Message-ID: <20111018082809.GA30776@host1.jankratochvil.net> (raw)
In-Reply-To: <B3CD2835-0260-4A6C-8141-C8570A44CEBD@adacore.com>

On Tue, 18 Oct 2011 09:24:08 +0200, Tristan Gingold wrote:
> What is wrong with my suggestion of adding a command line option to keep the
> siblings ?  This option could be removed in a few years if nobody complained
> about sibling removal.

I find an extra option just a pollution of doc and everything by an option
which will never get used.  Wouldn't it be enough to disable it by
-gstrict-dwarf?  While currently the -gstrict-dwarf meaning is different
I believe the purpose is correct - to be more backward compatible.


Thanks,
Jan


gcc/
2011-10-12  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Stop producing DW_AT_sibling without -gstrict-dwarf.
	* dwarf2out.c (dwarf2out_finish): Remove calls of
	add_sibling_attributes if !DWARF_STRICT.  Extend the comment with
	reason.

--- gcc/dwarf2out.c	(revision 180121)
+++ gcc/dwarf2out.c	(working copy)
@@ -22496,13 +22496,17 @@ dwarf2out_finish (const char *filename)
       prune_unused_types ();
     }
 
-  /* Traverse the DIE's and add add sibling attributes to those DIE's
-     that have children.  */
-  add_sibling_attributes (comp_unit_die ());
-  for (node = limbo_die_list; node; node = node->next)
-    add_sibling_attributes (node->die);
-  for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next)
-    add_sibling_attributes (ctnode->root_die);
+  if (dwarf_strict)
+    {
+      /* Traverse the DIE's and add add sibling attributes to those DIE's that
+	 have children.  It is produced only for compatibility reasons as it is
+	 both a size and consumer performance hit.  */
+      add_sibling_attributes (comp_unit_die ());
+      for (node = limbo_die_list; node; node = node->next)
+	add_sibling_attributes (node->die);
+      for (ctnode = comdat_type_list; ctnode != NULL; ctnode = ctnode->next)
+	add_sibling_attributes (ctnode->root_die);
+    }
 
   /* Output a terminator label for the .text section.  */
   switch_to_section (text_section);

  reply	other threads:[~2011-10-18  8:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-12 14:18 [patch] " Jan Kratochvil
2011-10-12 14:59 ` Tristan Gingold
2011-10-12 15:28   ` Jan Kratochvil
2011-10-13 21:16     ` Jan Kratochvil
2011-10-14  9:36       ` Tristan Gingold
2011-10-14 14:18         ` Tom Tromey
2011-10-17  9:44           ` Tristan Gingold
2011-10-17 13:42             ` Tom Tromey
2011-10-18  8:39               ` Tristan Gingold
2011-10-18  9:03                 ` Jan Kratochvil [this message]
2011-10-18  9:04                   ` [patch#2] " Jakub Jelinek
2011-10-20 15:13                     ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111018082809.GA30776@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gingold@adacore.com \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).