aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@gcc.gnu.org>1998-08-18 01:24:51 -0700
committerDavid S. Miller <davem@gcc.gnu.org>1998-08-18 01:24:51 -0700
commit5a5325cb7288ba6ee85682f079aebc26131cceba (patch)
treefe8f8049f63b8601f354fe7c6469a749992479c5
parenta2767b67092e13dea0a795f77285ae54bc15debf (diff)
downloadgcc-5a5325cb7288ba6ee85682f079aebc26131cceba.zip
gcc-5a5325cb7288ba6ee85682f079aebc26131cceba.tar.gz
gcc-5a5325cb7288ba6ee85682f079aebc26131cceba.tar.bz2
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
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/config/sparc/sparc.c44
2 files changed, 56 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 48bf14a..d1c7cff 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,18 @@
+Tue Aug 18 07:15:27 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * 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 <davem@pierdol.cobaltmicro.com>
+
+ * 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 0dbd10c..dd75d7f 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;