From 5a5325cb7288ba6ee85682f079aebc26131cceba Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 18 Aug 1998 01:24:51 -0700 Subject: [PATCH] From Kaveh R. Ghazi. * config/sparc/sparc.c (ultra_find_type): Add empty semicolon statement after end of loop label. From me... * config/sparc/sparc.c (ultra_types_avail): New variable. (ultra_build_types_avail): New function to record mask of insn types in ready list at this cycle. (ultrasparc_sched_reorder): Call it. (ultra_find_type): Use it to quicken the search. Also simplif dependency check, don't use rtx_equal_p because we know exactly what we are looking for. From-SVN: r21817 --- gcc/ChangeLog | 15 ++++++++++++++ gcc/config/sparc/sparc.c | 44 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 56 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48bf14a967b..d1c7cff21ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +Tue Aug 18 07:15:27 1998 Kaveh R. Ghazi + + * config/sparc/sparc.c (ultra_find_type): Add empty semicolon + statement after end of loop label. + +Tue Aug 18 07:13:27 1998 David S. Miller + + * config/sparc/sparc.c (ultra_types_avail): New variable. + (ultra_build_types_avail): New function to record mask of insn + types in ready list at this cycle. + (ultrasparc_sched_reorder): Call it. + (ultra_find_type): Use it to quicken the search. Also simplif + dependency check, don't use rtx_equal_p because we know exactly + what we are looking for. + Tue Aug 18 03:20:53 1998 Richard Earnshaw (rearnsha@arm.com) * arm.h (SECONDARY_INPUT_RELOAD_CLASS): Return NO_REGS if compiling diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 0dbd10c3463..dd75d7fe731 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -6316,6 +6316,9 @@ ultra_fpmode_conflict_exists (fpmode) NOTE: This scheme depends upon the fact that we have less than 32 distinct type attributes. */ + +static int ultra_types_avail; + static rtx * ultra_find_type (type_mask, list, start) int type_mask; @@ -6324,6 +6327,11 @@ ultra_find_type (type_mask, list, start) { int i; + /* Short circuit if no such insn exists in the ready + at the moment. */ + if ((type_mask & ultra_types_avail) == 0) + return 0; + for (i = start; i >= 0; i--) { rtx insn = list[i]; @@ -6366,14 +6374,22 @@ ultra_find_type (type_mask, list, start) || (check_depend == 1 && GET_CODE (slot_insn) == INSN && GET_CODE (slot_pat) == SET - && rtx_equal_p (SET_DEST (slot_pat), - SET_SRC (pat))) + && ((GET_CODE (SET_DEST (slot_pat)) == REG + && GET_CODE (SET_SRC (pat)) == REG + && REGNO (SET_DEST (slot_pat)) == + REGNO (SET_SRC (pat))) + || (GET_CODE (SET_DEST (slot_pat)) == SUBREG + && GET_CODE (SET_SRC (pat)) == SUBREG + && REGNO (SUBREG_REG (SET_DEST (slot_pat))) == + REGNO (SUBREG_REG (SET_SRC (pat))) + && SUBREG_WORD (SET_DEST (slot_pat)) == + SUBREG_WORD (SET_SRC (pat)))) || (check_fpmode_conflict == 1 && GET_CODE (slot_insn) == INSN && GET_CODE (slot_pat) == SET && ((GET_MODE (SET_DEST (slot_pat)) == SFmode || GET_MODE (SET_DEST (slot_pat)) == DFmode) - && GET_MODE (SET_DEST (slot_pat)) != fpmode)))) + && GET_MODE (SET_DEST (slot_pat)) != fpmode))))) goto next; } @@ -6403,10 +6419,30 @@ ultra_find_type (type_mask, list, start) return &list[i]; } next: + ; } return 0; } +static void +ultra_build_types_avail (ready, n_ready) + rtx *ready; + int n_ready; +{ + int i = n_ready - 1; + + ultra_types_avail = 0; + while(i >= 0) + { + rtx insn = ready[i]; + + if (recog_memoized (insn) >= 0) + ultra_types_avail |= TMASK (get_attr_type (insn)); + + i -= 1; + } +} + /* Place insn pointed to my IP into the pipeline. Make element THIS of READY be that insn if it is not already. TYPE indicates the pipeline class @@ -6602,6 +6638,8 @@ ultrasparc_sched_reorder (dump, sched_verbose, ready, n_ready) && recog_memoized (ready[this_insn]) < 0) this_insn--; + ultra_build_types_avail (ready, this_insn + 1); + while (this_insn >= 0) { int old_group_size = up->group_size; -- 2.30.2