patch applied to loop.c

Joern Rennecke amylaar@cygnus.co.uk
Wed Jun 30 23:15:00 GMT 1999


Reviewed By Jeffrey law.

Thu Jun 17 21:34:24 1999  J"orn Rennecke <amylaar@cygnus.co.uk>

	* loop.c (strength_reduce): When doing biv->giv conversion, update
	reg note of NEXT->insn.

Index: loop.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/loop.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -p -r1.164 -r1.165
*** loop.c	1999/06/17 13:29:10	1.164
--- loop.c	1999/06/17 13:35:59	1.165
*************** strength_reduce (scan_start, end, loop_t
*** 4198,4204 ****
  	  for (vp = &bl->biv, next = *vp; v = next, next = v->next_iv;)
  	    {
  	      HOST_WIDE_INT offset;
! 	      rtx set, add_val, old_reg, dest_reg, last_use_insn;
  	      int old_regno, new_regno;
  
  	      if (! v->always_executed
--- 4198,4204 ----
  	  for (vp = &bl->biv, next = *vp; v = next, next = v->next_iv;)
  	    {
  	      HOST_WIDE_INT offset;
! 	      rtx set, add_val, old_reg, dest_reg, last_use_insn, note;
  	      int old_regno, new_regno;
  
  	      if (! v->always_executed
*************** strength_reduce (scan_start, end, loop_t
*** 4304,4310 ****
      
  	      REG_IV_TYPE (new_regno) = GENERAL_INDUCT;
  	      REG_IV_INFO (new_regno) = v;
!     
  	      /* Remove the increment from the list of biv increments,
  		 and record it as a giv.  */
  	      *vp = next;
--- 4304,4316 ----
      
  	      REG_IV_TYPE (new_regno) = GENERAL_INDUCT;
  	      REG_IV_INFO (new_regno) = v;
! 
! 	      /* If next_insn has a REG_EQUAL note that mentiones OLD_REG,
! 		 it must be replaced.  */
! 	      note = find_reg_note (next->insn, REG_EQUAL, NULL_RTX);
! 	      if (note && reg_mentioned_p (old_reg, XEXP (note, 0)))
! 		XEXP (note, 0) = copy_rtx (SET_SRC (single_set (next->insn)));
! 
  	      /* Remove the increment from the list of biv increments,
  		 and record it as a giv.  */
  	      *vp = next;



More information about the Gcc-patches mailing list