OSDN Git Service

* passes.c (rest_of_clean_state): Decompose the instruction stream.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Sep 2004 09:05:53 +0000 (09:05 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Sep 2004 09:05:53 +0000 (09:05 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87080 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/passes.c

index 19d3fae..856eff4 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-04  Jan Hubicka  <jh@suse.cz>
+
+       * passes.c (rest_of_clean_state):  Decompose the instruction stream.
+
 2004-09-04  Richard Sandiford  <rsandifo@redhat.com>
 
        * doc/md.texi (shift patterns): New anchor.  Add reference to
index 7c6f002..a125c71 100644 (file)
@@ -1634,6 +1634,18 @@ static void
 rest_of_clean_state (void)
 {
   coverage_end_function ();
+  rtx insn, next;
+
+  /* It is very important to decompose the RTL instruction chain here:
+     debug information keeps pointing into CODE_LABEL insns inside the function
+     body.  If these remain pointing to the other insns, we end up preserving
+     whole RTL chain and attached detailed debug info in memory.  */
+  for (insn = get_insns (); insn; insn = next)
+    {
+      next = NEXT_INSN (insn);
+      NEXT_INSN (insn) = NULL;
+      PREV_INSN (insn) = NULL;
+    }
 
   /* In case the function was not output,
      don't leave any temporary anonymous types