]> gcc.gnu.org Git - gcc.git/commitdiff
toplev.c (rest_of_compilation): Revert previous patch.
authorJan Hubicka <jh@suse.cz>
Thu, 7 Jun 2001 15:10:58 +0000 (17:10 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 7 Jun 2001 15:10:58 +0000 (15:10 +0000)
* toplev.c (rest_of_compilation): Revert previous patch.
* final.c (shorten_branches): Likewise.

From-SVN: r42961

gcc/ChangeLog
gcc/final.c
gcc/toplev.c

index 856333dbc9781388ff6ac719300ee3c8998f1b59..00352ed4d367b690ee66b77c346f449fe03c52c7 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jun  7 17:09:50 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * toplev.c (rest_of_compilation): Revert previous patch.
+       * final.c (shorten_branches): Likewise.
+
 2001-06-07  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
 
        * pself.c, pself1.c, pself2.c, pself3.c, pself4.c, pself5.c:
index a3fe70d61cbf28d5b0e1143aada970b17b9addf5..7b36b1b41020b44e577f775fca857c60035c1e70 100644 (file)
@@ -960,6 +960,26 @@ shorten_branches (first)
   int uid;
   rtx align_tab[MAX_CODE_ALIGN];
 
+  /* In order to make sure that all instructions have valid length info,
+     we must split them before we compute the address/length info.  */
+
+  for (insn = NEXT_INSN (first); insn; insn = NEXT_INSN (insn))
+    if (INSN_P (insn))
+      {
+       rtx old = insn;
+       /* Don't split the insn if it has been deleted.  */
+       if (! INSN_DELETED_P (old))
+         insn = try_split (PATTERN (old), old, 1);
+       /* When not optimizing, the old insn will be still left around
+          with only the 'deleted' bit set.  Transform it into a note
+          to avoid confusion of subsequent processing.  */
+       if (INSN_DELETED_P (old))
+         {
+           PUT_CODE (old, NOTE);
+           NOTE_LINE_NUMBER (old) = NOTE_INSN_DELETED;
+           NOTE_SOURCE_FILE (old) = 0;
+         }
+      }
 #endif
 
   /* We must do some computations even when not actually shortening, in
index 0e197cc2581de7ef80fa7d43947acaad50810ed5..ba0864109b68f6869bb1e2c3dde220d23fa50688 100644 (file)
@@ -3685,16 +3685,18 @@ rest_of_compilation (decl)
     }
 #endif
 
-  timevar_push (TV_SHORTEN_BRANCH);
-  if (0
-#ifdef HAVE_ATTR_length
-      || 1
-#endif
-#ifdef STACK_REGS
-      || 1
+#ifndef STACK_REGS
+  /* ??? Do this before shorten branches so that we aren't creating
+     insns too late and fail sanity checks in final. */
+  convert_to_eh_region_ranges ();
 #endif
-      )
-    split_all_insns (0);
+
+  /* Shorten branches.
+
+     Note this must run before reg-stack because of death note (ab)use
+     in the ia32 backend.  */
+  timevar_push (TV_SHORTEN_BRANCH);
+  shorten_branches (get_insns ());
   timevar_pop (TV_SHORTEN_BRANCH);
 
 #ifdef STACK_REGS
@@ -3707,14 +3709,9 @@ rest_of_compilation (decl)
   timevar_pop (TV_REG_STACK);
 
   ggc_collect ();
-#endif
 
   convert_to_eh_region_ranges ();
-
-  /* Shorten branches.  */
-  timevar_push (TV_SHORTEN_BRANCH);
-  shorten_branches (get_insns ());
-  timevar_pop (TV_SHORTEN_BRANCH);
+#endif
 
   current_function_nothrow = nothrow_function_p ();
   if (current_function_nothrow)
This page took 0.086292 seconds and 5 git commands to generate.