From ad9a29f3de6d8d0e9c92b8087f4057a3bed74a26 Mon Sep 17 00:00:00 2001 From: manu Date: Sun, 11 Feb 2007 22:10:43 +0000 Subject: [PATCH] 2007-02-11 Manuel Lopez-Ibanez * 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 | 5 ++++ gcc/genattrtab.c | 76 -------------------------------------------------------- 2 files changed, 5 insertions(+), 76 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b6445f..959a1ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-02-11 Manuel Lopez-Ibanez + + * genattrtab.c (contained_in_p): Delete unused function. + (write_expr_attr_cache): Likewise. + 2007-02-11 Jan Hubicka * ipa-inline.c (cgraph_edge_badness): Add "else" missing in the diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 6442324..0cf378a 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -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 -- 2.7.4