This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] tree-ssa-forwprop.c: Remove redundant code.


Hi,

Attached is a patch to remove redundant code.

Just above these definitions of op0 and op1, we have identical
definitions of op0 and op1, so we don't need to repeat the same thing
again.

Tested on i686-pc-linux-gnu.  Committed as obvious.

Kazu Hirata

2005-05-11  Kazu Hirata  <kazu@cs.umass.edu>

	* tree-ssa-forwprop.c (forward_propagate_into_cond_1): Remove
	redundant code.

Index: tree-ssa-forwprop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-forwprop.c,v
retrieving revision 2.14
diff -u -d -p -r2.14 tree-ssa-forwprop.c
--- tree-ssa-forwprop.c	15 Apr 2005 18:42:35 -0000	2.14
+++ tree-ssa-forwprop.c	10 May 2005 21:12:33 -0000
@@ -189,8 +189,6 @@ forward_propagate_into_cond_1 (tree cond
 
       if (has_single_use (test_var))
 	{
-	  tree op0 = TREE_OPERAND (def_rhs, 0);
-	  tree op1 = TREE_OPERAND (def_rhs, 1);
 	  enum tree_code new_code;
 	  tree t;
 
@@ -246,9 +244,6 @@ forward_propagate_into_cond_1 (tree cond
 	  if (has_single_use (test_var))
 	    {
 	      /* TEST_VAR was set from a relational operator.  */
-	      tree op0 = TREE_OPERAND (def_rhs, 0);
-	      tree op1 = TREE_OPERAND (def_rhs, 1);
-
 	      new_cond = build (TREE_CODE (def_rhs),
 				boolean_type_node, op0, op1);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]