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]

Re: [bugs] Another ICE


Content-Description: message body text
> 
> Hi Honza,
> 
> I got another ICE with yesterday evenings version of gcc :-((
> 
> Egbert.
> 
Hi,
the bug is caused by gcse, that emits result of gen_move_insn and then update
basic block info for last insn. In case gen_move_insn used sequence of insns,
others are kept w/o any info.

(hmm, ugly - perhaps we can avoid gcse from using the BASIC_BLOCK_FOR_INSN
completely? I can't imagince case gcse is doing transformation and don't know
basic block information and keeping that array up-to-date is expensive)

Honza

Thu May 31 17:47:52 CEST 2001  Jan Hubicka  <jh@suse.cz>

	* gcse.c (update_ld_motion_stores): Handle sequences properly.

Index: gcse.c
===================================================================
RCS file: /home/cvs/Repository/gcc/gcc/gcse.c,v
retrieving revision 1.11
diff -c -3 -p -r1.11 gcse.c
*** gcse.c	2001/05/14 11:32:57	1.11
--- gcse.c	2001/05/31 14:47:18
*************** update_ld_motion_stores (expr)
*** 6384,6389 ****
--- 6381,6387 ----
  	  rtx src = SET_SRC (pat);
  	  rtx reg = expr->reaching_reg;
  	  rtx copy, new;
+ 	  rtx first;
  
  	  /* If we've already copied it, continue.  */
  	  if (expr->reaching_reg == src)
*************** update_ld_motion_stores (expr)
*** 6399,6407 ****
  	    }
  	  
  	  copy = gen_move_insn ( reg, SET_SRC (pat));
  	  new = emit_insn_before (copy, insn);
  	  record_one_set (REGNO (reg), new);
! 	  set_block_for_new_insns (new, BLOCK_FOR_INSN (insn));
  	  SET_SRC (pat) = reg;
  
  	  /* un-recognize this pattern since it's probably different now.  */
--- 6397,6414 ----
  	    }
  	  
  	  copy = gen_move_insn ( reg, SET_SRC (pat));
+ 	  first = PREV_INSN (insn);
  	  new = emit_insn_before (copy, insn);
  	  record_one_set (REGNO (reg), new);
! 
! 	  /* Update basic block numbers for insn emitted
! 	     copy may be sequence) */
! 	  while (first != new)
! 	    {
! 	      first = NEXT_INSN (first);
! 	      set_block_for_new_insns (first, BLOCK_FOR_INSN (insn));
! 	    }
! 
  	  SET_SRC (pat) = reg;
  
  	  /* un-recognize this pattern since it's probably different now.  */


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