Patch: enabling 1st insn scheduling for sh4.
DJ Delorie
dj@redhat.com
Fri Mar 19 08:14:00 GMT 2004
> I approve your patch if you add MINUS (not only PLUS) too to check the
> stack adjustment.
Thanks! Here's the patch as applied:
2004-03-04 DJ Delorie <dj@redhat.com>
PR optimization/14282
* sched-deps.c (sched_analyze_insn): Allow a stack adjustment
between a call and the assignment of its return value.
Index: sched-deps.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-deps.c,v
retrieving revision 1.70
diff -p -C2 -r1.70 sched-deps.c
*** sched-deps.c 4 Mar 2004 16:28:48 -0000 1.70
--- sched-deps.c 4 Mar 2004 19:01:04 -0000
*************** sched_analyze_insn (struct deps *deps, r
*** 1128,1132 ****
if (GET_CODE (tmp) == SUBREG)
tmp = SUBREG_REG (tmp);
! if (GET_CODE (tmp) == REG)
src_regno = REGNO (tmp);
else
--- 1128,1138 ----
if (GET_CODE (tmp) == SUBREG)
tmp = SUBREG_REG (tmp);
! if ((GET_CODE (tmp) == PLUS
! || GET_CODE (tmp) == MINUS)
! && GET_CODE (XEXP (tmp, 0)) == REG
! && REGNO (XEXP (tmp, 0)) == STACK_POINTER_REGNUM
! && dest_regno == STACK_POINTER_REGNUM)
! src_regno = STACK_POINTER_REGNUM;
! else if (GET_CODE (tmp) == REG)
src_regno = REGNO (tmp);
else
More information about the Gcc-patches
mailing list