sched clobber patch killing the PA

Richard Henderson rth@cygnus.com
Mon Mar 8 23:46:00 GMT 1999


On Mon, Mar 08, 1999 at 02:38:14PM -0700, Jeffrey A Law wrote:
> This change:
> Sun Mar  7 11:21:02 1999  Richard Henderson  <rth@cygnus.com>
> 
>         * haifa-sched.c (reg_last_clobbers): New.
>         (reg_pending_clobbers, bb_reg_last_clobbers): New.
>         (compute_block_backward_dependences): Allocate memory for them.
>         (schedule_region): Likewise.
>         (sched_analyze_1): Clobbers don't interfere with one another.
>         They do interfere with sets ...
>         (sched_analyze_2): ... and uses.
>         (sched_analyze): Likewise.
>         (sched_analyze_insn): Update reg_last_clobbers appropriately.
> 
> Is breaking the PA.

Oops.  Just missed a case.  Such things don't happen on the targets 
I tested.


r~


        * haifa-sched.c (sched_analyze_1): Fix last change -- add clobber
        dependancies to sets in the non-hard-reg case too.

Index: haifa-sched.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/haifa-sched.c,v
retrieving revision 1.83
diff -c -p -d -r1.83 haifa-sched.c
*** haifa-sched.c	1999/03/07 11:50:32	1.83
--- haifa-sched.c	1999/03/09 07:43:35
*************** sched_analyze_1 (x, insn)
*** 3392,3398 ****
  	    add_dependence (insn, XEXP (u, 0), REG_DEP_OUTPUT);
  
  	  if (code == SET)
! 	    SET_REGNO_REG_SET (reg_pending_sets, regno);
  	  else
  	    SET_REGNO_REG_SET (reg_pending_clobbers, regno);
  
--- 3392,3402 ----
  	    add_dependence (insn, XEXP (u, 0), REG_DEP_OUTPUT);
  
  	  if (code == SET)
! 	    {
! 	      for (u = reg_last_clobbers[regno]; u; u = XEXP (u, 1))
! 		add_dependence (insn, XEXP (u, 0), REG_DEP_OUTPUT);
! 	      SET_REGNO_REG_SET (reg_pending_sets, regno);
! 	    }
  	  else
  	    SET_REGNO_REG_SET (reg_pending_clobbers, regno);
  


More information about the Gcc-patches mailing list