bootstrap failure with cvs current and --enable-checking

Richard Henderson rth@cygnus.com
Sun Oct 24 13:22:00 GMT 1999


On Sun, Oct 24, 1999 at 12:59:34PM -0700, Mark Mitchell wrote:
> Please right ChangeLogs and commit.  Thanks!

Graham doesn't have write access.  I did the cleanup and commit.


r~


        * alias.c: Include ggc.h.
        (reg_base_value, new_reg_base_value, reg_base_value_size): Make static.
        (record_set): Verify enough room in reg_base_value.
        (init_alias_analysis): Allocate reg_base_value with xcalloc.
        Register it as a GC root.
        (end_alias_analysis): Free reg_base_value.  Remove it as a GC root.
        * Makefile.in (alias.o): Depend on ggc.h.

        * unroll.c (unroll_loop): Verify the insn before a barrier
        is a JUMP_INSN before checking JUMP_LABEL.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.328
diff -c -p -d -r1.328 Makefile.in
*** Makefile.in	1999/10/22 02:38:57	1.328
--- Makefile.in	1999/10/24 20:14:10
*************** reorg.o : reorg.c $(CONFIG_H) system.h $
*** 1579,1585 ****
     $(BASIC_BLOCK_H) $(REGS_H) insn-config.h insn-attr.h insn-flags.h \
     $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h
  alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h \
!    $(REGS_H) toplev.h output.h $(EXPR_H) insn-flags.h
  regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
     $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h function.h \
     $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
--- 1579,1585 ----
     $(BASIC_BLOCK_H) $(REGS_H) insn-config.h insn-attr.h insn-flags.h \
     $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h
  alias.o : alias.c $(CONFIG_H) system.h $(RTL_H) flags.h hard-reg-set.h \
!    $(REGS_H) toplev.h output.h $(EXPR_H) insn-flags.h ggc.h
  regmove.o : regmove.c $(CONFIG_H) system.h $(RTL_H) insn-config.h \
     $(RECOG_H) output.h reload.h $(REGS_H) hard-reg-set.h flags.h function.h \
     $(EXPR_H) insn-flags.h $(BASIC_BLOCK_H) toplev.h
Index: alias.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/alias.c,v
retrieving revision 1.63
diff -c -p -d -r1.63 alias.c
*** alias.c	1999/10/03 16:08:30	1.63
--- alias.c	1999/10/24 20:14:10
*************** Boston, MA 02111-1307, USA.  */
*** 25,30 ****
--- 25,31 ----
  #include "tree.h"
  #include "tm_p.h"
  #include "function.h"
+ #include "insn-flags.h"
  #include "expr.h"
  #include "regs.h"
  #include "hard-reg-set.h"
*************** Boston, MA 02111-1307, USA.  */
*** 32,38 ****
  #include "output.h"
  #include "toplev.h"
  #include "splay-tree.h"
! #include "insn-flags.h"
  
  /* The alias sets assigned to MEMs assist the back-end in determining
     which MEMs can alias which other MEMs.  In general, two MEMs in
--- 33,39 ----
  #include "output.h"
  #include "toplev.h"
  #include "splay-tree.h"
! #include "ggc.h"
  
  /* The alias sets assigned to MEMs assist the back-end in determining
     which MEMs can alias which other MEMs.  In general, two MEMs in
*************** static int nonlocal_reference_p         
*** 127,135 ****
     address.  The mode determines whether it is a function argument or
     other special value. */
  
! rtx *reg_base_value;
! rtx *new_reg_base_value;
! unsigned int reg_base_value_size;	/* size of reg_base_value array */
  #define REG_BASE_VALUE(X) \
    ((unsigned) REGNO (X) < reg_base_value_size ? reg_base_value[REGNO (X)] : 0)
  
--- 128,136 ----
     address.  The mode determines whether it is a function argument or
     other special value. */
  
! static rtx *reg_base_value;
! static rtx *new_reg_base_value;
! static unsigned int reg_base_value_size;	/* size of reg_base_value array */
  #define REG_BASE_VALUE(X) \
    ((unsigned) REGNO (X) < reg_base_value_size ? reg_base_value[REGNO (X)] : 0)
  
*************** static void
*** 449,455 ****
  record_set (dest, set)
       rtx dest, set;
  {
!   register int regno;
    rtx src;
  
    if (GET_CODE (dest) != REG)
--- 450,456 ----
  record_set (dest, set)
       rtx dest, set;
  {
!   register unsigned regno;
    rtx src;
  
    if (GET_CODE (dest) != REG)
*************** record_set (dest, set)
*** 457,462 ****
--- 458,466 ----
  
    regno = REGNO (dest);
  
+   if (regno >= reg_base_value_size)
+     abort ();
+ 
    if (set)
      {
        /* A CLOBBER wipes out any old value but does not prevent a previously
*************** init_alias_analysis ()
*** 1533,1544 ****
       optimization.  Loop unrolling can create a large number of
       registers.  */
    reg_base_value_size = maxreg * 2;
!   reg_base_value = (rtx *)oballoc (reg_base_value_size * sizeof (rtx));
    new_reg_base_value = (rtx *)alloca (reg_base_value_size * sizeof (rtx));
    reg_seen = (char *)alloca (reg_base_value_size);
-   bzero ((char *) reg_base_value, reg_base_value_size * sizeof (rtx));
    if (! reload_completed && flag_unroll_loops)
      {
        alias_invariant = (rtx *)xrealloc (alias_invariant,
  					 reg_base_value_size * sizeof (rtx));
        bzero ((char *)alias_invariant, reg_base_value_size * sizeof (rtx));
--- 1537,1551 ----
       optimization.  Loop unrolling can create a large number of
       registers.  */
    reg_base_value_size = maxreg * 2;
!   reg_base_value = (rtx *) xcalloc (reg_base_value_size, sizeof (rtx));
!   if (ggc_p)
!     ggc_add_rtx_root (reg_base_value, reg_base_value_size);
! 
    new_reg_base_value = (rtx *)alloca (reg_base_value_size * sizeof (rtx));
    reg_seen = (char *)alloca (reg_base_value_size);
    if (! reload_completed && flag_unroll_loops)
      {
+       /* ??? Why are we realloc'ing if we're just going to zero it?  */
        alias_invariant = (rtx *)xrealloc (alias_invariant,
  					 reg_base_value_size * sizeof (rtx));
        bzero ((char *)alias_invariant, reg_base_value_size * sizeof (rtx));
*************** void
*** 1716,1726 ****
  end_alias_analysis ()
  {
    reg_known_value = 0;
!   reg_base_value = 0;
    reg_base_value_size = 0;
    if (alias_invariant)
      {
!       free ((char *)alias_invariant);
        alias_invariant = 0;
      }
  }
--- 1723,1740 ----
  end_alias_analysis ()
  {
    reg_known_value = 0;
!   reg_known_value_size = 0;
!   if (reg_base_value)
!     {
!       if (ggc_p)
! 	ggc_del_root (reg_base_value);
!       free (reg_base_value);
!       reg_base_value = 0;
!     }
    reg_base_value_size = 0;
    if (alias_invariant)
      {
!       free (alias_invariant);
        alias_invariant = 0;
      }
  }
Index: unroll.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/unroll.c,v
retrieving revision 1.70
diff -c -p -d -r1.70 unroll.c
*** unroll.c	1999/10/15 18:07:48	1.70
--- unroll.c	1999/10/24 20:14:10
*************** unroll_loop (loop_end, insn_count, loop_
*** 649,654 ****
--- 649,655 ----
  
    if (unroll_type == UNROLL_NAIVE
        && GET_CODE (last_loop_insn) == BARRIER
+       && GET_CODE (PREV_INSN (last_loop_insn)) == JUMP_INSN
        && start_label != JUMP_LABEL (PREV_INSN (last_loop_insn)))
      {
        /* In this case, we must copy the jump and barrier, because they will
*************** copy_loop_body (copy_start, copy_end, ma
*** 1961,1967 ****
  	  /* Make split induction variable constants `permanent' since we
  	     know there are no backward branches across iteration variable
  	     settings which would invalidate this.  */
! 	  if (dest_reg_was_split)
  	    {
  	      int regno = REGNO (SET_DEST (pattern));
  
--- 1962,1969 ----
  	  /* Make split induction variable constants `permanent' since we
  	     know there are no backward branches across iteration variable
  	     settings which would invalidate this.  */
! 	  if (dest_reg_was_split
!               && (GET_CODE (pattern) == SET || GET_CODE (pattern) == USE))
  	    {
  	      int regno = REGNO (SET_DEST (pattern));


More information about the Gcc-patches mailing list