diff mbox

[debug-early] gut out check_die

Message ID 55403314.8030604@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez April 29, 2015, 1:25 a.m. UTC
Remove the bits of the checking code that have never found anything 
useful in the last few months of work.  Plus, they're timing out on big 
test cases.

I'm removing them, as they were never meant to go into production.

Committed to branch.

Aldy
commit e6b1a0f8433ad2d72bd23d4d5def127431e22452
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Tue Apr 28 18:22:05 2015 -0700

    Remove most sanity checks from check_die().  These were temporarily
    there during the branch work and were taking too long to execute while
    never finding anything of interest.
diff mbox

Patch

diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index db7866c..f512ec7 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -5723,10 +5723,10 @@  dwarf2out_dump_early_debug_stats (void)
     }
 }
 
-/* Sanity checks on DW_AT_inline DIEs.  */
+/* Sanity checks on DIEs.  */
 
 static void
-check_die_inline (dw_die_ref die)
+check_die (dw_die_ref die)
 {
   /* A debugging information entry that is a member of an abstract
      instance tree [that has DW_AT_inline] should not contain any
@@ -5749,49 +5749,7 @@  check_die_inline (dw_die_ref die)
 		    && a->dw_attr != DW_AT_frame_base
 		    && a->dw_attr != DW_AT_GNU_all_call_sites);
     }
-
 }
-
-/* Perform some sanity checks on DIEs after they have been generated
-   earlier in the compilation process.  */
-
-static void
-check_die (dw_die_ref die)
-{
-  static unsigned long mark = 1;
-  dw_die_ref c, p;
-
-  check_die_inline (die);
-
-  /* Check that all of our children have their parent set to us.  */
-  c = die->die_child;
-  if (c) do {
-      c = c->die_sib;
-      gcc_assert (c->die_parent == die);
-    } while (c != die->die_child);
-
-  /* Check the we are part of our parent's child list.  */
-  mark++;
-  p = die->die_parent;
-  if (p)
-    {
-      c = p->die_child;
-      gcc_assert (c);
-      do {
-	c = c->die_sib;
-	/* Found it.  */
-	if (c == die)
-	  break;
-	/* If we're at start --> not found.  */
-	gcc_assert (c != p->die_child);
-	/* If we've seen this node already the circular list doesn't
-	   even go back to start.  */
-	gcc_assert (c->die_abbrev != mark);
-	c->die_abbrev = mark;
-      } while (1);
-    }
-}
-
 
 /* Start a new compilation unit DIE for an include file.  OLD_UNIT is the CU
    for the enclosing include file, if any.  BINCL_DIE is the DW_TAG_GNU_BINCL