re PR bootstrap/4191 (GCC does not build for d30v-elf - needs tweaking for crtstuff...
authorRichard Henderson <rth@gcc.gnu.org>
Fri, 12 Apr 2002 07:52:05 +0000 (00:52 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 12 Apr 2002 07:52:05 +0000 (00:52 -0700)
        PR bootstrap/4191
        * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef.

        * flow.c (mark_used_reg): Manage reg_cond_dead properly for
        modes spanning multiple hard regs.

        * recog.c (peephole2_optimize): Rebuild jump labels as needed.

From-SVN: r52205

gcc/ChangeLog
gcc/config/d30v/d30v.h
gcc/flow.c
gcc/recog.c

index 1eb5798cefead0e304314dc96530198da9201a0b..5d8aecb3c385de30abecbcce0d25bc9fc4652259 100644 (file)
@@ -1,3 +1,13 @@
+2002-04-12  Richard Henderson  <rth@redhat.com>
+
+       PR bootstrap/4191
+       * config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef.
+
+       * flow.c (mark_used_reg): Manage reg_cond_dead properly for
+       modes spanning multiple hard regs.
+    
+       * recog.c (peephole2_optimize): Rebuild jump labels as needed.
+
 2002-04-11  John David Anglin  <dave@hiauly1.hia.nrc.ca>
 
        * pa.c (pa_output_function_prologue): Don't accumulate the total
@@ -85,7 +95,7 @@
        * config/alpha/openbsd.h: Do not directly include alpha/alpha.h.
        * config/alpha/vms.h: Likewise.
 
-2002-04-11  Richard Sandiford  <rsand
+2002-04-11  Richard Sandiford  <rsandifo@redhat.com>
 
        * doc/extend.texi: Remove old claim that typedefs cannot have
        an alignment attribute.
@@ -800,7 +810,7 @@ objc:
        * protoize.c: Match include directory usage with cppdefault.c.
 
 2002-04-03  Jeffrey A Law  (law@redhat.com)
-            Hans-Peter Nilsson  <hp@bitrange.com>
+           Hans-Peter Nilsson  <hp@bitrange.com>
 
        * combine.c (simplify_comparison): Avoid narrowing a comparison
        with a paradoxical subreg when doing so would drop signficant bits.
@@ -878,7 +888,7 @@ Tue Apr  2 06:47:40 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 2002-04-01  Vladimir Makarov  <vmakarov@redhat.com>
 
        * config/pa/pa-pro-end.h (ASM_OUTPUT_ALIGNED_COMMON,
-        ASM_OUTPUT_ALIGNED_LOCAL): Redefine them.
+       ASM_OUTPUT_ALIGNED_LOCAL): Redefine them.
 
 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
 
@@ -899,8 +909,8 @@ objc:
 
 2002-04-01  Bob Wilson  <bob.wilson@acm.org>
 
-        * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning
-        in previous change.
+       * config/xtensa/xtensa.c (xtensa_va_arg): Fix compiler warning
+       in previous change.
 
 2002-04-01  Bob Wilson  <bob.wilson@acm.org>
 
@@ -1053,7 +1063,7 @@ Sun Mar 31 14:43:24 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * libgcc2.c (__bb_exit_func): Make static.
 
-        * config/alpha/alpha.md (trap): New.
+       * config/alpha/alpha.md (trap): New.
 
 2002-03-31  Richard Henderson  <rth@redhat.com>
 
@@ -1081,11 +1091,11 @@ Sun Mar 31 14:43:24 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
        * config/sparc/linux64.h (HANDLE_PRAGMA_PACK_PUSH_POP): Likewise.
 
 2002-03-30  Roger Sayle <roger@eyesopen.com>
-            Richard Henderson  <rth@redhat.com>
+           Richard Henderson  <rth@redhat.com>
 
-        * regmove.c (combine_stack_adjustments_for_block): Avoid
-        emitting a stack adjustment of zero bytes.  Let delete_insn
-        update bb->head.
+       * regmove.c (combine_stack_adjustments_for_block): Avoid
+       emitting a stack adjustment of zero bytes.  Let delete_insn
+       update bb->head.
 
 2002-03-30  Richard Henderson  <rth@redhat.com>
 
index 122e8b25b10bb4cedf2208de4978ea0e185140f3..41eceb575e131d62777f0d3b74ecbed15066be77 100644 (file)
@@ -3357,7 +3357,6 @@ do {                                                                      \
 
    Defined in svr4.h.  */
 /* #define INIT_SECTION_ASM_OP */
-#undef INIT_SECTION_ASM_OP
 
 /* If defined, `main' will not call `__main' as described above.  This macro
    should be defined for systems that control the contents of the init section
index 332d5434f682ac9132b913d8b67b80bf5cda65e3..627c28550fe90cbf3c82c2378f743c81c6606520 100644 (file)
@@ -3610,6 +3610,10 @@ mark_used_reg (pbi, reg, cond, insn)
   /* Mark the register as being live.  */
   for (i = regno_first; i <= regno_last; ++i)
     {
+#ifdef HAVE_conditional_execution
+      int this_was_live = REGNO_REG_SET_P (pbi->reg_live, i);
+#endif
+
       SET_REGNO_REG_SET (pbi->reg_live, i);
 
 #ifdef HAVE_conditional_execution
@@ -3621,7 +3625,7 @@ mark_used_reg (pbi, reg, cond, insn)
          struct reg_cond_life_info *rcli;
          rtx ncond;
 
-         if (some_was_live)
+         if (this_was_live)
            {
              node = splay_tree_lookup (pbi->reg_cond_dead, i);
              if (node == NULL)
@@ -3663,7 +3667,7 @@ mark_used_reg (pbi, reg, cond, insn)
              SET_REGNO_REG_SET (pbi->reg_cond_reg, REGNO (XEXP (cond, 0)));
            }
        }
-      else if (some_was_live)
+      else if (this_was_live)
        {
          /* The register may have been conditionally live previously, but
             is now unconditionally live.  Remove it from the conditionally
index 3289f6ebe105dd53e79cd04d7a851ef2ff8ffdf2..7987d20ea88c7dea082995628f172f87162986dc 100644 (file)
@@ -3003,6 +3003,7 @@ peephole2_optimize (dump_file)
   bool changed;
 #endif
   bool do_cleanup_cfg = false;
+  bool do_rebuild_jump_labels = false;
 
   /* Initialize the regsets we're going to use.  */
   for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i)
@@ -3045,7 +3046,7 @@ peephole2_optimize (dump_file)
          prev = PREV_INSN (insn);
          if (INSN_P (insn))
            {
-             rtx try, before_try;
+             rtx try, before_try, x;
              int match_len;
              rtx note;
 
@@ -3139,7 +3140,6 @@ peephole2_optimize (dump_file)
                  /* Re-insert the EH_REGION notes.  */
                  if (note)
                    {
-                     rtx x;
                      edge eh_edge;
 
                      for (eh_edge = bb->succ; eh_edge
@@ -3209,25 +3209,35 @@ peephole2_optimize (dump_file)
                  COPY_REG_SET (live, peep2_insn_data[i].live_before);
 
                  /* Update life information for the new sequence.  */
+                 x = try;
                  do
                    {
-                     if (INSN_P (try))
+                     if (INSN_P (x))
                        {
                          if (--i < 0)
                            i = MAX_INSNS_PER_PEEP2;
-                         peep2_insn_data[i].insn = try;
-                         propagate_one_insn (pbi, try);
+                         peep2_insn_data[i].insn = x;
+                         propagate_one_insn (pbi, x);
                          COPY_REG_SET (peep2_insn_data[i].live_before, live);
                        }
-                     try = PREV_INSN (try);
+                     x = PREV_INSN (x);
                    }
-                 while (try != prev);
+                 while (x != prev);
 
                  /* ??? Should verify that LIVE now matches what we
                     had before the new sequence.  */
 
                  peep2_current = i;
 #endif
+
+                 /* If we generated a jump instruction, it won't have
+                    JUMP_LABEL set.  Recompute after we're done.  */
+                 for (x = try; x != before_try; x = PREV_INSN (x))
+                   if (GET_CODE (x) == JUMP_INSN)
+                     {
+                       do_rebuild_jump_labels = true;
+                       break;
+                     }
                }
            }
 
@@ -3242,6 +3252,9 @@ peephole2_optimize (dump_file)
     FREE_REG_SET (peep2_insn_data[i].live_before);
   FREE_REG_SET (live);
 
+  if (do_rebuild_jump_labels)
+    rebuild_jump_labels (get_insns ());
+
   /* If we eliminated EH edges, we may be able to merge blocks.  Further,
      we've changed global life since exception handlers are no longer
      reachable.  */