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]

[lno] More cleanups


Some more cleanups of functions that are no longer used.
Bootstrapped on i686.

Sebastian

Index: ChangeLog.lno
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.lno,v
retrieving revision 1.1.2.201
diff -d -u -p -r1.1.2.201 ChangeLog.lno
--- ChangeLog.lno	22 Jun 2004 17:33:33 -0000	1.1.2.201
+++ ChangeLog.lno	23 Jun 2004 14:05:44 -0000
@@ -1,3 +1,17 @@
+2004-06-23  Sebastian Pop  <pop@cri.ensmp.fr>
+	
+	* tree-chrec.c (chrec_fold_automatically_generated_operands): Now
+	static.  Clean comments.
+	(hide_evolution_in_loop, chrec_merge_types): Removed.  
+	* tree-chrec.h (hide_evolution_in_loop,
+	chrec_fold_automatically_generated_operands): Remove declarations.
+	* tree-scalar-evolution.c: Remove an old part of the comment at the 
+	beginning of the file.
+	(compute_overall_effect_of_inner_loop, 
+	compute_overall_effect_of_inner_loop, add_to_evolution_1,
+	analyze_scalar_evolution_1, analyze_scalar_evolution): Test for 
+	chrec_dont_know instead of calling chrec_contains_undetermined.
+	
 2004-06-22  Dorit Naishlos <dorit@il.ibm.com>
 
 	* tree-vectorizer.c (vect_create_data_ref): Fix setting of mem_tag.
@@ -31,7 +45,8 @@
 	* cfgloop.h (loop): Update comments around nb_iterations field.  
 	* lambda-code.c (gcc_loop_to_lambda_loop): Always check for 
 	undetermined chrec after calling number_of_iterations_in_loop.
-	* tree-chrec.c (chrec_fold_multiply_ival_cst, chrec_fold_multiply_ival_ival, 
+	* tree-chrec.c (chrec_fold_multiply_ival_cst, 
+	chrec_fold_multiply_ival_ival, 
 	chrec_merge_types, chrec_contains_intervals, chrec_evaluate, 
 	chrec_merge_intervals): Removed.
 	(chrec_fold_plus_1, chrec_fold_plus, chrec_fold_minus, 
Index: tree-chrec.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-chrec.c,v
retrieving revision 1.1.2.28
diff -d -u -p -r1.1.2.28 tree-chrec.c
--- tree-chrec.c	22 Jun 2004 16:03:43 -0000	1.1.2.28
+++ tree-chrec.c	23 Jun 2004 14:05:44 -0000
@@ -223,20 +223,14 @@ chrec_fold_multiply_poly_poly (tree type
 /* When the operands are automatically_generated_chrec_p, the fold has
    to respect the semantics of the operands.  */
 
-tree 
+static inline tree 
 chrec_fold_automatically_generated_operands (tree op0, 
 					     tree op1)
 {
-  /* TOP op x = TOP,
-     x op TOP = TOP.  */
   if (chrec_contains_undetermined (op0)
       || chrec_contains_undetermined (op1))
     return chrec_dont_know;
   
-  /* BOT op TOP = TOP, 
-     TOP op BOT = TOP, 
-     BOT op x = BOT,
-     x op BOT = BOT.  */
   if (op0 == chrec_known
       || op1 == chrec_known)
     return chrec_known;
@@ -496,32 +490,6 @@ initial_condition (tree chrec)
     return chrec;
 }
 
-/* Returns a multivariate function that has no evolution in LOOP_NUM.
-   Mask the evolution LOOP_NUM.  */
-
-tree 
-hide_evolution_in_loop (tree chrec, unsigned loop_num)
-{
-  if (automatically_generated_chrec_p (chrec))
-    return chrec;
-  
-  switch (TREE_CODE (chrec))
-    {
-    case POLYNOMIAL_CHREC:
-      if (CHREC_VARIABLE (chrec) >= loop_num)
-	return hide_evolution_in_loop (CHREC_LEFT (chrec), loop_num);
-
-      else
-	return build_polynomial_chrec 
-	  (CHREC_VARIABLE (chrec), 
-	   hide_evolution_in_loop (CHREC_LEFT (chrec), loop_num), 
-	   CHREC_RIGHT (chrec));
-
-    default:
-      return chrec;
-    }
-}
-
 /* Returns a univariate function that represents the evolution in
    LOOP_NUM.  Mask the evolution of any other loop.  */
 
@@ -619,21 +587,6 @@ reset_evolution_in_loop (unsigned loop_n
   return build_polynomial_chrec (loop_num, chrec, new_evol);
 }
 
-/* Determine the type of the result after the merge of types TYPE0 and
-   TYPE1.  */
-
-static inline tree 
-chrec_merge_types (tree type0, 
-		   tree type1)
-{
-  if (type0 == type1)
-    return type0;
-
-  else 
-    /* FIXME.  */
-    return NULL_TREE;
-}
-
 /* Merges two evolution functions that were found by following two
    alternate paths of a conditional expression.  */
 
Index: tree-chrec.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-chrec.h,v
retrieving revision 1.1.2.24
diff -d -u -p -r1.1.2.24 tree-chrec.h
--- tree-chrec.h	22 Jun 2004 14:12:21 -0000	1.1.2.24
+++ tree-chrec.h	23 Jun 2004 14:05:44 -0000
@@ -78,10 +78,8 @@ extern tree update_initial_condition_to_
 extern tree initial_condition (tree);
 extern tree evolution_part_in_loop_num (tree, unsigned);
 extern tree hide_evolution_in_other_loops_than_loop (tree, unsigned);
-extern tree hide_evolution_in_loop (tree, unsigned);
 extern tree reset_evolution_in_loop (unsigned, tree, tree);
 extern tree chrec_merge (tree, tree);
-extern tree chrec_fold_automatically_generated_operands (tree, tree);
 
 /* Observers.  */
 extern bool is_multivariate_chrec (tree);
Index: tree-scalar-evolution.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-scalar-evolution.c,v
retrieving revision 1.1.2.61
diff -d -u -p -r1.1.2.61 tree-scalar-evolution.c
--- tree-scalar-evolution.c	22 Jun 2004 16:03:44 -0000	1.1.2.61
+++ tree-scalar-evolution.c	23 Jun 2004 14:05:45 -0000
@@ -36,8 +36,7 @@ Software Foundation, 59 Temple Place - S
      
    - When the definition is a MODIFY_EXPR: if the right hand side
    (RHS) of the definition cannot be statically analyzed, the answer
-   of the analyzer is: "don't know", that corresponds to the
-   conservative [-oo, +oo] element of the lattice of intervals.
+   of the analyzer is: "don't know".  
    Otherwise, for all the variables that are not yet analyzed in the
    RHS, try to determine their evolution, and finally try to
    evaluate the operation of the RHS that gives the evolution
@@ -480,7 +479,7 @@ compute_overall_effect_of_inner_loop (st
 {
   bool val = false;
 
-  if (chrec_contains_undetermined (evolution_fn))
+  if (evolution_fn == chrec_dont_know)
     return chrec_dont_know;
 
   else if (TREE_CODE (evolution_fn) == POLYNOMIAL_CHREC)
@@ -491,7 +490,7 @@ compute_overall_effect_of_inner_loop (st
 	    loop_from_num (current_loops, CHREC_VARIABLE (evolution_fn));
 	  tree nb_iter = number_of_iterations_in_loop (inner_loop);
 
-	  if (chrec_contains_undetermined (nb_iter))
+	  if (nb_iter == chrec_dont_know)
 	    return chrec_dont_know;
 	  else
 	    {
@@ -717,7 +716,7 @@ add_to_evolution_1 (unsigned loop_nb, 
       
     default:
       /* These nodes do not depend on a loop.  */
-      if (chrec_contains_undetermined (chrec_before))
+      if (chrec_before == chrec_dont_know)
 	return chrec_dont_know;
       return build_polynomial_chrec (loop_nb, chrec_before, to_add);
     }
@@ -1864,7 +1863,7 @@ analyze_scalar_evolution_1 (struct loop 
  set_and_end:
 
   /* Keep the symbolic form.  */
-  if (chrec_contains_undetermined (res))
+  if (res == chrec_dont_know)
     res = var;
 
   if (loop == def_loop)
@@ -1905,8 +1904,7 @@ analyze_scalar_evolution (struct loop *l
 
   res = analyze_scalar_evolution_1 (loop, var, get_scalar_evolution (var));
 
-  if (TREE_CODE (var) == SSA_NAME && 
-      chrec_contains_undetermined (res))
+  if (TREE_CODE (var) == SSA_NAME && res == chrec_dont_know)
     res = var;
 
   if (dump_file && (dump_flags & TDF_DETAILS))


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