OSDN Git Service

2007-02-11 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Feb 2007 22:10:43 +0000 (22:10 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Feb 2007 22:10:43 +0000 (22:10 +0000)
* genattrtab.c (contained_in_p): Delete unused function.
(write_expr_attr_cache): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121827 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genattrtab.c

index 9b6445f..959a1ff 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-11  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+       * genattrtab.c (contained_in_p): Delete unused function.
+       (write_expr_attr_cache): Likewise.
+
 2007-02-11  Jan Hubicka  <jh@suse.cz>
 
        * ipa-inline.c (cgraph_edge_badness): Add "else" missing in the
index 6442324..0cf378a 100644 (file)
@@ -3056,37 +3056,6 @@ compares_alternatives_p (rtx exp)
   return 0;
 }
 
-/* Returns nonzero is INNER is contained in EXP.  */
-
-static int
-contained_in_p (rtx inner, rtx exp)
-{
-  int i, j;
-  const char *fmt;
-
-  if (rtx_equal_p (inner, exp))
-    return 1;
-
-  for (i = 0, fmt = GET_RTX_FORMAT (GET_CODE (exp));
-       i < GET_RTX_LENGTH (GET_CODE (exp)); i++)
-    switch (*fmt++)
-      {
-      case 'e':
-      case 'u':
-       if (contained_in_p (inner, XEXP (exp, i)))
-         return 1;
-       break;
-
-      case 'E':
-       for (j = 0; j < XVECLEN (exp, i); j++)
-         if (contained_in_p (inner, XVECEXP (exp, i, j)))
-           return 1;
-       break;
-      }
-
-  return 0;
-}
-
 /* Process DEFINE_PEEPHOLE, DEFINE_INSN, and DEFINE_ASM_ATTRIBUTES.  */
 
 static void
@@ -3912,51 +3881,6 @@ write_attr_case (struct attr_desc *attr, struct attr_value *av,
   printf ("\n");
 }
 
-/* Search for uses of non-const attributes and write code to cache them.  */
-
-static int
-write_expr_attr_cache (rtx p, struct attr_desc *attr)
-{
-  const char *fmt;
-  int i, ie, j, je;
-
-  if (GET_CODE (p) == EQ_ATTR)
-    {
-      if (XSTR (p, 0) != attr->name)
-       return 0;
-
-      if (!attr->is_numeric)
-       printf ("  enum attr_%s ", attr->name);
-      else
-       printf ("  int ");
-
-      printf ("attr_%s = get_attr_%s (insn);\n", attr->name, attr->name);
-      return 1;
-    }
-
-  fmt = GET_RTX_FORMAT (GET_CODE (p));
-  ie = GET_RTX_LENGTH (GET_CODE (p));
-  for (i = 0; i < ie; i++)
-    {
-      switch (*fmt++)
-       {
-       case 'e':
-         if (write_expr_attr_cache (XEXP (p, i), attr))
-           return 1;
-         break;
-
-       case 'E':
-         je = XVECLEN (p, i);
-         for (j = 0; j < je; ++j)
-           if (write_expr_attr_cache (XVECEXP (p, i, j), attr))
-             return 1;
-         break;
-       }
-    }
-
-  return 0;
-}
-
 /* Utilities to write in various forms.  */
 
 static void