]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alpha.c (summarize_insn): Handle ASM_OPERANDS.
authorRichard Henderson <rth@cygnus.com>
Tue, 4 Nov 1997 21:15:45 +0000 (13:15 -0800)
committerJeff Law <law@gcc.gnu.org>
Tue, 4 Nov 1997 21:15:45 +0000 (14:15 -0700)
        * alpha.c (summarize_insn): Handle ASM_OPERANDS.  Don't recurse
        for SUBREG, just fall through.

        * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero.

        * alpha.md (attr trap): Make TRAP_YES non-zero for sanity's sake.

        * combine.c (try_combine): When setting elim_i1, check if newi2pat
        sets i1dest.

        * combine.c (try_combine): When setting elim_i2, check whether newi2pat
        sets i2dest.  When calling distribute_notes for i3dest_killed, pass
        elim_i2 and elim_i1.

Co-Authored-By: Jim Wilson <wilson@cygnus.com>
From-SVN: r16313

gcc/ChangeLog
gcc/combine.c
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.md

index 81aad33be286e1c93a3ecc8ce1fbb22b86003377..fdb1b1b255c6ecd44d069929f81422648ff530c7 100644 (file)
@@ -1,3 +1,20 @@
+Tue Nov  4 14:12:30 1997  Richard Henderson  (rth@cygnus.com)
+                         Jim Wilson  (wilson@cygnus.com)
+
+       * alpha.c (summarize_insn): Handle ASM_OPERANDS.  Don't recurse
+       for SUBREG, just fall through.
+
+       * alpha.c (alpha_handle_trap_shadows): Init sum.defd to zero.
+
+       * alpha.md (attr trap): Make TRAP_YES non-zero for sanity's sake.
+
+       * combine.c (try_combine): When setting elim_i1, check if newi2pat
+       sets i1dest.
+
+        * combine.c (try_combine): When setting elim_i2, check whether newi2pat
+        sets i2dest.  When calling distribute_notes for i3dest_killed, pass
+        elim_i2 and elim_i1.
+
 Mon Nov  3 14:36:50 1997  Jeffrey A Law  (law@cygnus.com)
 
        * configure.in (sco5): Use cpio to install header files.
index 3626e48e9757dc144afb88a80fe1f5f36ac77f42..bcb6fe9c783f3c6d9e915c6b66aba2a93869b649 100644 (file)
@@ -2141,10 +2141,14 @@ try_combine (i3, i2, i1)
     rtx i3links, i2links, i1links = 0;
     rtx midnotes = 0;
     register int regno;
-    /* Compute which registers we expect to eliminate.  */
-    rtx elim_i2 = (newi2pat || i2dest_in_i2src || i2dest_in_i1src
+    /* Compute which registers we expect to eliminate.  newi2pat may be setting
+       either i3dest or i2dest, so we must check it.  */
+    rtx elim_i2 = ((newi2pat && reg_set_p (i2dest, newi2pat))
+                  || i2dest_in_i2src || i2dest_in_i1src
                   ? 0 : i2dest);
-    rtx elim_i1 = i1 == 0 || i1dest_in_i1src ? 0 : i1dest;
+    rtx elim_i1 = (i1 == 0 || i1dest_in_i1src
+                  || (newi2pat && reg_set_p (i1dest, newi2pat))
+                  ? 0 : i1dest);
 
     /* Get the old REG_NOTES and LOG_LINKS from all our insns and
        clear them.  */
@@ -2305,7 +2309,7 @@ try_combine (i3, i2, i1)
        distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
                                   NULL_RTX),
                          NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
-                         NULL_RTX, NULL_RTX);
+                         elim_i2, elim_i1);
       }
 
     /* For I2 and I1, we have to be careful.  If NEWI2PAT exists and sets
index 0c5334004f40036146049bbc5cca71cddc5b5f2d..b3ac7132f059f9c980921abebafa4e27c5d7d189 100644 (file)
@@ -2784,11 +2784,20 @@ summarize_insn (x, sum, set)
       summarize_insn (XEXP (x, 0), sum, 0);
       break;
 
+    case ASM_OPERANDS:
+      for (i = ASM_OPERANDS_INPUT_LENGTH (x) - 1; i >= 0; i--)
+       summarize_insn (ASM_OPERANDS_INPUT (x, i), sum, 0);
+      break;
+
     case PARALLEL:
       for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
        summarize_insn (XVECEXP (x, 0, i), sum, 0);
       break;
 
+    case SUBREG:
+      x = SUBREG_REG (x);
+      /* FALLTHRU */
+
     case REG:
       {
        int regno = REGNO (x);
@@ -2824,10 +2833,6 @@ summarize_insn (x, sum, set)
       summarize_insn (XEXP (x, 0), sum, 0);
       break;
 
-    case SUBREG:
-      summarize_insn (SUBREG_REG (x), sum, set);
-      break;
-
     case CONST_INT:   case CONST_DOUBLE:
     case SYMBOL_REF:  case LABEL_REF:     case CONST:
       break;
@@ -2958,7 +2963,7 @@ alpha_handle_trap_shadows (insns)
                  sum.used.i = 0;
                  sum.used.fp = 0;
                  sum.used.mem = 0;
-                 sum.defd = shadow.used;
+                 sum.defd = sum.used;
 
                  switch (GET_CODE (i))
                    {
index 570ab915ae26ed68304ad6a4a5b3f46f587ebe58..af7f1d265d2710357d70b09189f1cbb7b2b0d4d1 100644 (file)
@@ -39,7 +39,7 @@
 ;; The TRAP_TYPE attribute marks instructions that may generate traps
 ;; (which are imprecise and may need a trapb if software complention
 ;; is desired).
-(define_attr "trap" "yes,no" (const_string "no"))
+(define_attr "trap" "no,yes" (const_string "no"))
 
 ;; For the EV4 we include four function units: ABOX, which computes
 ;; the address, BBOX, used for branches, EBOX, used for integer