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] Remove an unused argument from expand_assignment().


Hi,

Attached is a patch to remove an unused argument from
expand_assignment().  As far as I can tell from cvs annotate, the
unused argument has been around as long as gcc has been in cvs.

Tested on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2003-07-14  Kazu Hirata  <kazu@cs.umass.edu>

	* expr.c (expand_assignment): Remove an unused argument
	SUGGEST_REG.
	* expr.h: Update the prototype.
	* function.c: Update the callers.
	* stmt.c: Likewise.

2003-07-14  Kazu Hirata  <kazu@cs.umass.edu>

	* expr.c: Remove the last argument to expand_assignment().

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.567
diff -u -r1.567 expr.c
--- expr.c	9 Jul 2003 00:58:54 -0000	1.567
+++ expr.c	14 Jul 2003 16:27:55 -0000
@@ -4111,16 +4111,10 @@
    If WANT_VALUE is nonzero, return an rtx for the value of TO.
    (This may contain a QUEUED rtx;
    if the value is constant, this rtx is a constant.)
-   Otherwise, the returned value is NULL_RTX.
-
-   SUGGEST_REG is no longer actually used.
-   It used to mean, copy the value through a register
-   and return that register, if that is possible.
-   We now use WANT_VALUE to decide whether to do this.  */
+   Otherwise, the returned value is NULL_RTX.  */
 
 rtx
-expand_assignment (tree to, tree from, int want_value,
-		   int suggest_reg ATTRIBUTE_UNUSED)
+expand_assignment (tree to, tree from, int want_value)
 {
   rtx to_rtx = 0;
   rtx result;
@@ -9122,7 +9116,7 @@
 	tree lhs = TREE_OPERAND (exp, 0);
 	tree rhs = TREE_OPERAND (exp, 1);
 
-	temp = expand_assignment (lhs, rhs, ! ignore, original_target != 0);
+	temp = expand_assignment (lhs, rhs, ! ignore);
 	return temp;
       }
 
@@ -9167,13 +9161,13 @@
 					     (TREE_CODE (rhs) == BIT_IOR_EXPR
 					      ? integer_one_node
 					      : integer_zero_node)),
-			       0, 0);
+			       0);
 	    do_pending_stack_adjust ();
 	    emit_label (label);
 	    return const0_rtx;
 	  }
 
-	temp = expand_assignment (lhs, rhs, ! ignore, original_target != 0);
+	temp = expand_assignment (lhs, rhs, ! ignore);
 
 	return temp;
       }
@@ -9776,7 +9770,7 @@
 	  incremented = TREE_OPERAND (incremented, 0);
 	}
 
-      temp = expand_assignment (incremented, newexp, ! post && ! ignore , 0);
+      temp = expand_assignment (incremented, newexp, ! post && ! ignore);
       return post ? op0 : temp;
     }
 
Index: expr.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.h,v
retrieving revision 1.143
diff -u -r1.143 expr.h
--- expr.h	29 Jun 2003 16:21:58 -0000	1.143
+++ expr.h	14 Jul 2003 16:27:56 -0000
@@ -496,7 +496,7 @@
 			    int, rtx, int, rtx, rtx, int, rtx);
 
 /* Expand an assignment that stores the value of FROM into TO.  */
-extern rtx expand_assignment (tree, tree, int, int);
+extern rtx expand_assignment (tree, tree, int);
 
 /* Generate code for computing expression EXP,
    and storing the value into TARGET.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.445
diff -u -r1.445 function.c
--- function.c	11 Jul 2003 16:28:22 -0000	1.445
+++ function.c	14 Jul 2003 16:28:09 -0000
@@ -4812,7 +4812,7 @@
 	      /* TREE_USED gets set erroneously during expand_assignment.  */
 	      save_tree_used = TREE_USED (parm);
 	      expand_assignment (parm,
-				 make_tree (nominal_type, tempreg), 0, 0);
+				 make_tree (nominal_type, tempreg), 0);
 	      TREE_USED (parm) = save_tree_used;
 	      conversion_insns = get_insns ();
 	      did_conversion = 1;
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.318
diff -u -r1.318 stmt.c
--- stmt.c	7 Jul 2003 17:57:21 -0000	1.318
+++ stmt.c	14 Jul 2003 16:28:19 -0000
@@ -3984,13 +3984,13 @@
       if (code == INTEGER_TYPE || code == REAL_TYPE || code == ENUMERAL_TYPE
 	  || code == POINTER_TYPE || code == REFERENCE_TYPE)
 	expand_assignment (decl, convert (TREE_TYPE (decl), integer_zero_node),
-			   0, 0);
+			   0);
       emit_queue ();
     }
   else if (DECL_INITIAL (decl) && TREE_CODE (DECL_INITIAL (decl)) != TREE_LIST)
     {
       emit_line_note (DECL_SOURCE_LOCATION (decl));
-      expand_assignment (decl, DECL_INITIAL (decl), 0, 0);
+      expand_assignment (decl, DECL_INITIAL (decl), 0);
       emit_queue ();
     }
 
Index: java/expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.167
diff -u -r1.167 expr.c
--- java/expr.c	7 Jul 2003 17:57:30 -0000	1.167
+++ java/expr.c	14 Jul 2003 16:29:55 -0000
@@ -232,7 +232,7 @@
 
       decl = find_stack_slot (stack_index, type);
       if (decl != node)
-	  expand_assignment (decl, node, 0, 0);
+	  expand_assignment (decl, node, 0);
       stack_index += 1 + TYPE_IS_WIDE (type);
     }
 }
@@ -986,7 +986,7 @@
   expand_assignment (build_java_arrayaccess (array,
 					     rhs_type_node,
 					     index),
-		     rhs_node, 0, 0);
+		     rhs_node, 0);
 }
 
 /* Expand the evaluation of ARRAY[INDEX]. build_java_check_indexed_type makes 
@@ -1273,7 +1273,7 @@
     local_var = find_local_variable (local_var_index, int_type_node, pc);
     constant_value = build_int_2 (ival, ival < 0 ? -1 : 0);
     res = fold (build (PLUS_EXPR, int_type_node, local_var, constant_value));
-    expand_assignment (local_var, res, 0, 0);
+    expand_assignment (local_var, res, 0);
 }
 
       
@@ -2350,7 +2350,7 @@
 		warning_with_decl (field_decl, "assignment to final field `%s' not in constructor");
 	    }
 	}
-      expand_assignment (field_ref, new_value, 0, 0);
+      expand_assignment (field_ref, new_value, 0);
     }
   else
     push_value (field_ref);
@@ -2461,7 +2461,7 @@
 	expand_decl (array_decl);
 	tmp = expand_assignment (array_decl,
 				 build_new_array (element_type, length),
-				 1, 0);
+				 1);
 	if (TREE_CONSTANT (init)
 	    && ilength >= 10 && JPRIMITIVE_TYPE_P (element_type))
 	  {
@@ -2480,7 +2480,7 @@
 	expand_assignment (build (COMPONENT_REF, TREE_TYPE (data_fld),
 				  build_java_indirect_ref (array_type, 
 					  array_decl, flag_check_references), 
-				  data_fld), init, 0, 0);
+				  data_fld), init, 0);
 	return tmp;
       }
     case BLOCK:
@@ -3091,7 +3091,7 @@
     type = TREE_TYPE (value);				\
     decl = find_local_variable (var, type, oldpc);	\
     set_local_type (var, type );			\
-    expand_assignment (decl, value, 0, 0);		\
+    expand_assignment (decl, value, 0);			\
   }
 
 #define STORE(OPERAND_TYPE, OPERAND_VALUE) \


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