This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bootstrap failure on ppc darwin


Problem appears to be unrelated to the rtlanal change at all.
The split_all_insns pass before sched1 creates new basic blocks,
and doesn't update life information in these new blocks.  Later,
sched1 verifies the (bogus) life information and aborts.

The following appears to fix the problem.  I'll start a bootstraps
and such shortly.


r~


	* recog.c (split_all_insns): Include new blocks in life update;
	do a global life update.

Index: recog.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/recog.c,v
retrieving revision 1.174
diff -c -p -d -r1.174 recog.c
*** recog.c	31 Jan 2003 23:34:13 -0000	1.174
--- recog.c	15 Feb 2003 01:29:44 -0000
*************** split_all_insns (upd_life)
*** 2840,2851 ****
       int upd_life;
  {
    sbitmap blocks;
!   int changed;
    basic_block bb;
  
    blocks = sbitmap_alloc (last_basic_block);
    sbitmap_zero (blocks);
!   changed = 0;
  
    FOR_EACH_BB_REVERSE (bb)
      {
--- 2840,2851 ----
       int upd_life;
  {
    sbitmap blocks;
!   bool changed;
    basic_block bb;
  
    blocks = sbitmap_alloc (last_basic_block);
    sbitmap_zero (blocks);
!   changed = false;
  
    FOR_EACH_BB_REVERSE (bb)
      {
*************** split_all_insns (upd_life)
*** 2870,2876 ****
  	      while (GET_CODE (last) == BARRIER)
  		last = PREV_INSN (last);
  	      SET_BIT (blocks, bb->index);
! 	      changed = 1;
  	      insn = last;
  	    }
  	}
--- 2870,2876 ----
  	      while (GET_CODE (last) == BARRIER)
  		last = PREV_INSN (last);
  	      SET_BIT (blocks, bb->index);
! 	      changed = true;
  	      insn = last;
  	    }
  	}
*************** split_all_insns (upd_life)
*** 2878,2891 ****
  
    if (changed)
      {
        find_many_sub_basic_blocks (blocks);
      }
  
    if (changed && upd_life)
!     {
!       count_or_remove_death_notes (blocks, 1);
!       update_life_info (blocks, UPDATE_LIFE_LOCAL, PROP_DEATH_NOTES);
!     }
  #ifdef ENABLE_CHECKING
    verify_flow_info ();
  #endif
--- 2878,2898 ----
  
    if (changed)
      {
+       int old_last_basic_block = last_basic_block;
+ 
        find_many_sub_basic_blocks (blocks);
+ 
+       while (old_last_basic_block < last_basic_block)
+ 	{
+ 	  SET_BIT (blocks, old_last_basic_block);
+ 	  old_last_basic_block++;
+ 	}
      }
  
    if (changed && upd_life)
!     update_life_info (blocks, UPDATE_LIFE_GLOBAL_RM_NOTES,
! 		      PROP_DEATH_NOTES | PROP_REG_INFO);
! 
  #ifdef ENABLE_CHECKING
    verify_flow_info ();
  #endif


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]