This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-iterator.c: Remove expr_only.
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 18 Apr 2009 11:24:56 +0200
- Subject: Re: [patch] tree-iterator.c: Remove expr_only.
- References: <20090418011313.60E6E6F62056@daisy.codesourcery.com>
On Sat, Apr 18, 2009 at 3:13 AM, Kazu Hirata <kazu@codesourcery.com> wrote:
> Hi,
>
> Attached is a patch to remove expr_only.
>
> AFAICT, this function has been unused since gimple-tuples-branch was
> merged into mainline at Revision 138207.
>
> Bootstrapped on x86_64-pc-linux-gnu. ?OK to apply?
Ok.
Thanks,
Richard.
> Kazu Hirata
>
> 2009-04-17 ?Kazu Hirata ?<kazu@codesourcery.com>
>
> ? ? ? ?* tree-iterator.c (expr_only): Remove.
> ? ? ? ?* tree.h: Remove the prototype for expr_only.
>
> Index: gcc/tree-iterator.c
> ===================================================================
> --- gcc/tree-iterator.c (revision 146215)
> +++ gcc/tree-iterator.c (working copy)
> @@ -280,29 +280,4 @@ expr_last (tree expr)
> ? return expr;
> ?}
>
> -/* If EXPR is a single statement return it. ?If EXPR is a
> - ? STATEMENT_LIST containing exactly one statement S, return S.
> - ? Otherwise, return NULL. ?*/
> -
> -tree
> -expr_only (tree expr)
> -{
> - ?if (expr == NULL_TREE)
> - ? ?return NULL_TREE;
> -
> - ?if (TREE_CODE (expr) == STATEMENT_LIST)
> - ? ?{
> - ? ? ?struct tree_statement_list_node *n = STATEMENT_LIST_TAIL (expr);
> - ? ? ?if (n && STATEMENT_LIST_HEAD (expr) == n)
> - ? ? ? return n->stmt;
> - ? ? ?else
> - ? ? ? return NULL_TREE;
> - ? ?}
> -
> - ?if (TREE_CODE (expr) == COMPOUND_EXPR)
> - ? ?return NULL_TREE;
> -
> - ?return expr;
> -}
> -
> ?#include "gt-tree-iterator.h"
> Index: gcc/tree.h
> ===================================================================
> --- gcc/tree.h ?(revision 146215)
> +++ gcc/tree.h ?(working copy)
> @@ -4261,7 +4261,6 @@ extern tree convert (tree, tree);
> ?extern unsigned int expr_align (const_tree);
> ?extern tree expr_first (tree);
> ?extern tree expr_last (tree);
> -extern tree expr_only (tree);
> ?extern tree size_in_bytes (const_tree);
> ?extern HOST_WIDE_INT int_size_in_bytes (const_tree);
> ?extern HOST_WIDE_INT max_int_size_in_bytes (const_tree);
>