Patchwork Merge identical cases

login
register
mail settings
Submitter Marek Polacek
Date Sept. 20, 2012, 9:54 a.m.
Message ID <20120920095422.GS1265@redhat.com>
Download mbox | patch
Permalink /patch/185365/
State New
Headers show

Comments

Marek Polacek - Sept. 20, 2012, 9:54 a.m.
In tree-ssa-operands.c in get_expr_operands we have two identical
cases, for SSA_NAME and {VAR,PARM,RESULT}_DECL.  If that isn't 
intentional (maybe it's clearer to split _*NAME and *_DECL--the
compiler will merge them anyway), we can merge those two cases.
Regtested/bootstrapped on x86_64.

2012-09-20  Marek Polacek  <polacek@redhat.com>

	* tree-ssa-operands.c (get_expr_operands): Merge identical cases.


	Marek
Richard Guenther - Sept. 20, 2012, 11:20 a.m.
On Thu, Sep 20, 2012 at 11:54 AM, Marek Polacek <polacek@redhat.com> wrote:
> In tree-ssa-operands.c in get_expr_operands we have two identical
> cases, for SSA_NAME and {VAR,PARM,RESULT}_DECL.  If that isn't
> intentional (maybe it's clearer to split _*NAME and *_DECL--the
> compiler will merge them anyway), we can merge those two cases.
> Regtested/bootstrapped on x86_64.

Ok.

Thanks,
Richard.

> 2012-09-20  Marek Polacek  <polacek@redhat.com>
>
>         * tree-ssa-operands.c (get_expr_operands): Merge identical cases.
>
> --- gcc/tree-ssa-operands.c.mp  2012-09-20 11:22:40.364588965 +0200
> +++ gcc/tree-ssa-operands.c     2012-09-20 11:29:40.178904905 +0200
> @@ -1,5 +1,6 @@
>  /* SSA operands management for trees.
>     Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
> +   2011, 2012
>     Free Software Foundation, Inc.
>
>  This file is part of GCC.
> @@ -841,9 +842,6 @@ get_expr_operands (gimple stmt, tree *ex
>        return;
>
>      case SSA_NAME:
> -     add_stmt_operand (expr_p, stmt, flags);
> -     return;
> -
>      case VAR_DECL:
>      case PARM_DECL:
>      case RESULT_DECL:
>
>         Marek

Patch

--- gcc/tree-ssa-operands.c.mp	2012-09-20 11:22:40.364588965 +0200
+++ gcc/tree-ssa-operands.c	2012-09-20 11:29:40.178904905 +0200
@@ -1,5 +1,6 @@ 
 /* SSA operands management for trees.
    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2011, 2012
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -841,9 +842,6 @@  get_expr_operands (gimple stmt, tree *ex
       return;
 
     case SSA_NAME:
-     add_stmt_operand (expr_p, stmt, flags);
-     return;
-
     case VAR_DECL:
     case PARM_DECL:
     case RESULT_DECL: