rtlanal.c (rtx_unstable_p): Use CONSTANT_P.
authorJohn Wehle <john@feith.com>
Thu, 17 Aug 2000 17:20:10 +0000 (17:20 +0000)
committerJohn Wehle <wehle@gcc.gnu.org>
Thu, 17 Aug 2000 17:20:10 +0000 (17:20 +0000)
* rtlanal.c (rtx_unstable_p): Use CONSTANT_P.
(rtx_unstable_p, rtx_varies_p): Process vectors.

From-SVN: r35762

gcc/ChangeLog
gcc/rtlanal.c

index 5add95cc397bf16b36d4b785d956264570753821..ed0c3c0e81fecdd1e24638c1e127efa86023650c 100644 (file)
@@ -1,3 +1,8 @@
+Thu Aug 17 13:20:32 EDT 2000  John Wehle  (john@feith.com)
+
+       * rtlanal.c (rtx_unstable_p): Use CONSTANT_P.
+       (rtx_unstable_p, rtx_varies_p): Process vectors.
+
 2000-08-16  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>
 
        * config/sh/lib1funcs.asm (GLOBAL): Define.  Use for all
index 22e05662164d733fcb667301c56a234f5c0493c1..5c69a506b55adebd01eaceb6f1f1071a7637bebe 100644 (file)
@@ -58,7 +58,7 @@ rtx_unstable_p (x)
   if (code == QUEUED)
     return 1;
 
-  if (code == CONST || code == CONST_INT)
+  if (CONSTANT_P (x))
     return 0;
 
   if (code == REG)
@@ -70,8 +70,18 @@ rtx_unstable_p (x)
   fmt = GET_RTX_FORMAT (code);
   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
     if (fmt[i] == 'e')
-      if (rtx_unstable_p (XEXP (x, i)))
-       return 1;
+      {
+       if (rtx_unstable_p (XEXP (x, i)))
+         return 1;
+      }
+    else if (fmt[i] == 'E')
+      {
+       int j;
+       for (j = 0; j < XVECLEN (x, i); j++)
+         if (rtx_unstable_p (XVECEXP (x, i, j)))
+           return 1;
+      }
+
   return 0;
 }
 
@@ -121,8 +131,18 @@ rtx_varies_p (x)
   fmt = GET_RTX_FORMAT (code);
   for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
     if (fmt[i] == 'e')
-      if (rtx_varies_p (XEXP (x, i)))
-       return 1;
+      {
+       if (rtx_varies_p (XEXP (x, i)))
+         return 1;
+      }
+    else if (fmt[i] == 'E')
+      {
+       int j;
+       for (j = 0; j < XVECLEN (x, i); j++)
+         if (rtx_varies_p (XVECEXP (x, i, j)))
+           return 1;
+      }
+
   return 0;
 }