]> gcc.gnu.org Git - gcc.git/commitdiff
From Kaveh R. Ghazi.
authorDavid S. Miller <davem@gcc.gnu.org>
Tue, 18 Aug 1998 08:24:51 +0000 (01:24 -0700)
committerDavid S. Miller <davem@gcc.gnu.org>
Tue, 18 Aug 1998 08:24:51 +0000 (01:24 -0700)
* 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
gcc/config/sparc/sparc.c

index 48bf14a967b58d733dc8d9221cf39adf1857dd37..d1c7cff21caed021701c312ac12e7da6d37fd732 100644 (file)
@@ -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
index 0dbd10c3463f51a531e4f5c22ddbff082aeedb1a..dd75d7fe731dad3e1d6ef2b9e24cd6c529184aec 100644 (file)
@@ -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;
 
This page took 0.08396 seconds and 5 git commands to generate.