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] Remove PEELED_CHREC nodes


Hi,

This patch removes the PEELED_CHREC nodes from the scalar evolution
analyzer.  Bootstrapped on i686.

Sebastian.

Index: ChangeLog.lno
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.lno,v
retrieving revision 1.1.2.195
diff -d -u -p -r1.1.2.195 ChangeLog.lno
--- ChangeLog.lno	18 Jun 2004 20:52:31 -0000	1.1.2.195
+++ ChangeLog.lno	21 Jun 2004 14:45:35 -0000
@@ -1,3 +1,22 @@
+2004-06-21  Sebastian Pop  <pop@cri.ensmp.fr>
+
+	* tree.def (PEELED_CHREC): Removed.
+	* tree-chrec.c (is_not_constant_evolution, chrec_fold_plus_1, 
+	chrec_fold_multiply, chrec_replace_initial_condition, chrec_convert):
+	Don't handle PEELED_CHREC nodes.
+	(chrec_fold_plus_peel_cst, chrec_fold_plus_poly_peel, 
+	chrec_fold_plus_peel_poly, chrec_fold_plus_peel_peel, 
+	chrec_fold_multiply_peel_cst, chrec_fold_multiply_poly_peel, 
+	chrec_fold_multiply_peel_peel, simplify_peeled_chrec): Removed.
+	* tree-chrec.h (tree_is_chrec): Don't handle PEELED_CHREC nodes.
+	(build_peeled_chrec, evolution_function_is_peeled_affine_p): Removed.
+	* tree-pretty-print.c (dump_generic_node): Don't handle
+	PEELED_CHREC nodes.
+	* tree-scalar-evolution.c (analyze_evolution_in_loop,
+	instantiate_parameters_1): Same.
+	(chrec_stats, reset_chrecs_counters, dump_chrecs_stats, 
+	gather_chrec_stats): Don't count the number of PEELED_CHREC nodes.
+
 2004-06-18  Sebastian Pop  <pop@cri.ensmp.fr>
 
 	* Makefile.in (OBJS-common): Remove tree-elim-check.o.
Index: tree-chrec.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-chrec.c,v
retrieving revision 1.1.2.25
diff -d -u -p -r1.1.2.25 tree-chrec.c
--- tree-chrec.c	13 Jun 2004 20:58:19 -0000	1.1.2.25
+++ tree-chrec.c	21 Jun 2004 14:45:35 -0000
@@ -44,8 +44,7 @@ Software Foundation, 59 Temple Place - S
 static inline bool
 is_not_constant_evolution (tree cst)
 {
-  return (TREE_CODE (cst) == POLYNOMIAL_CHREC
-	  || TREE_CODE (cst) == PEELED_CHREC);
+  return (TREE_CODE (cst) == POLYNOMIAL_CHREC);
 }
 
 /* Fold CODE for a polynomial function and a constant.  */
@@ -89,27 +88,6 @@ chrec_fold_poly_cst (enum tree_code code
     }
 }
 
-/* Fold the addition of a peeled chrec and a constant.  */
-
-static inline tree 
-chrec_fold_plus_peel_cst (tree type, 
-			  tree peel, 
-			  tree cst)
-{
-#if defined ENABLE_CHECKING
-  if (peel == NULL_TREE
-      || cst == NULL_TREE
-      || TREE_CODE (peel) != PEELED_CHREC
-      || is_not_constant_evolution (cst))
-    abort ();
-#endif
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel),
-     chrec_fold_plus (type, CHREC_LEFT (peel), cst),
-     chrec_fold_plus (type, CHREC_RIGHT (peel), cst));
-}
-
 /* Fold the addition of two polynomial functions.  */
 
 static inline tree 
@@ -183,166 +161,8 @@ chrec_fold_plus_poly_poly (enum tree_cod
       (CHREC_VARIABLE (poly0), left, right); 
 }
 
-/* Fold the addition of a polynomial and a peeled chrec.  */
-
-static inline tree 
-chrec_fold_plus_poly_peel (enum tree_code code, 
-			   tree type, 
-			   tree poly, 
-			   tree peel)
-{
-#if defined ENABLE_CHECKING
-  if (peel == NULL_TREE
-      || poly == NULL_TREE
-      || TREE_CODE (peel) != PEELED_CHREC
-      || TREE_CODE (poly) != POLYNOMIAL_CHREC)
-    abort ();
-#endif
-  
-  /*
-    {a, +, b}_1 + (c, d)_2  ->  ({a, +, b}_1 + c, {a, +, b}_1 + d)_2,
-    {a, +, b}_2 + (c, d)_1  ->  {a + (c, d)_1, +, b}_2,
-    {a, +, b}_x + (c, d)_x  ->  ({a, +, b}_x + c, {a, +, b}_x + d)_x.  */
-  if (CHREC_VARIABLE (poly) < CHREC_VARIABLE (peel))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel), 
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, poly, CHREC_LEFT (peel)) : 
-	chrec_fold_minus (type, poly, CHREC_LEFT (peel))),
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, poly, CHREC_RIGHT (peel)) :
-	chrec_fold_minus (type, poly, CHREC_RIGHT (peel))));
-  
-  if (CHREC_VARIABLE (poly) > CHREC_VARIABLE (peel))
-    return build_polynomial_chrec 
-      (CHREC_VARIABLE (poly), 
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, CHREC_LEFT (poly), peel) :
-	chrec_fold_minus (type, CHREC_LEFT (poly), peel)),
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, CHREC_RIGHT (poly), peel) :
-	chrec_fold_minus (type, CHREC_RIGHT (poly), peel)));
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel), 
-     (code == PLUS_EXPR ? 
-      chrec_fold_plus (type, poly, CHREC_LEFT (peel)) :
-      chrec_fold_minus (type, poly, CHREC_LEFT (peel))),
-     (code == PLUS_EXPR ? 
-      chrec_fold_plus (type, poly, CHREC_RIGHT (peel)) :
-      chrec_fold_minus (type, poly, CHREC_RIGHT (peel))));
-}
-
-/* Fold the addition of a polynomial and a peeled chrec.  */
-
-static inline tree 
-chrec_fold_plus_peel_poly (enum tree_code code, 
-			   tree type, 
-			   tree peel, 
-			   tree poly)
-{
-#if defined ENABLE_CHECKING
-  if (peel == NULL_TREE
-      || poly == NULL_TREE
-      || TREE_CODE (peel) != PEELED_CHREC
-      || TREE_CODE (poly) != POLYNOMIAL_CHREC)
-    abort ();
-#endif
-  
-  /*
-    {a, +, b}_1 + (c, d)_2  ->  ({a, +, b}_1 + c, {a, +, b}_1 + d)_2,
-    {a, +, b}_2 + (c, d)_1  ->  {a + (c, d)_1, +, b}_2,
-    {a, +, b}_x + (c, d)_x  ->  ({a, +, b}_x + c, {a, +, b}_x + d)_x.  */
-  if (CHREC_VARIABLE (poly) < CHREC_VARIABLE (peel))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel), 
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, CHREC_LEFT (peel), poly) : 
-	chrec_fold_minus (type, CHREC_LEFT (peel), poly)),
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, CHREC_RIGHT (peel), poly) :
-	chrec_fold_minus (type, CHREC_RIGHT (peel), poly)));
-  
-  if (CHREC_VARIABLE (poly) > CHREC_VARIABLE (peel))
-    return build_polynomial_chrec 
-      (CHREC_VARIABLE (poly), 
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, peel, CHREC_LEFT (poly)) :
-	chrec_fold_minus (type, peel, CHREC_LEFT (poly))),
-       (code == PLUS_EXPR ? 
-	chrec_fold_plus (type, peel, CHREC_RIGHT (poly)) :
-	chrec_fold_minus (type, peel, CHREC_RIGHT (poly))));
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel), 
-     (code == PLUS_EXPR ? 
-      chrec_fold_plus (type, CHREC_LEFT (peel), poly) :
-      chrec_fold_minus (type, CHREC_LEFT (peel), poly)),
-     (code == PLUS_EXPR ? 
-      chrec_fold_plus (type, CHREC_RIGHT (peel), poly) :
-      chrec_fold_minus (type, CHREC_RIGHT (peel), poly)));
-}
-
-/* Fold the addition of two peeled chrecs.  */
-
-static inline tree 
-chrec_fold_plus_peel_peel (tree type, 
-			   tree peel0, 
-			   tree peel1)
-{
-#if defined ENABLE_CHECKING
-  if (peel0 == NULL_TREE
-      || peel1 == NULL_TREE
-      || TREE_CODE (peel0) != PEELED_CHREC
-      || TREE_CODE (peel1) != PEELED_CHREC)
-    abort ();
-#endif
-  
-  /*
-    (a, b)_1 + (c, d)_2  ->  ((a, b)_1 + c, (a, b)_1 + d)_2,
-    (a, b)_2 + (c, d)_1  ->  (a + (c, d)_1, b + (c, d)_1)_2,
-    (a, b)_x + (c, d)_x  ->  (a + c, b + d)_x.  */
-  if (CHREC_VARIABLE (peel0) < CHREC_VARIABLE (peel1))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel1), 
-       chrec_fold_plus (type, peel0, CHREC_LEFT (peel1)),
-       chrec_fold_plus (type, peel0, CHREC_RIGHT (peel1)));
-  
-  if (CHREC_VARIABLE (peel0) > CHREC_VARIABLE (peel1))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel0), 
-       chrec_fold_plus (type, CHREC_LEFT (peel0), peel1),
-       chrec_fold_plus (type, CHREC_RIGHT (peel0), peel1));
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel0), 
-     chrec_fold_plus (type, CHREC_LEFT (peel0), CHREC_LEFT (peel1)),
-     chrec_fold_plus (type, CHREC_RIGHT (peel0), CHREC_RIGHT (peel1)));
-}
-
 
 
-/* Fold the multiplication of a peeled chrec and a constant.  */
-
-static inline tree 
-chrec_fold_multiply_peel_cst (tree type, 
-			      tree peel, 
-			      tree cst)
-{
-#if defined ENABLE_CHECKING
-  if (peel == NULL_TREE
-      || cst == NULL_TREE
-      || TREE_CODE (peel) != PEELED_CHREC
-      || is_not_constant_evolution (cst))
-    abort ();
-#endif
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel),
-     chrec_fold_multiply (type, CHREC_LEFT (peel), cst),
-     chrec_fold_multiply (type, CHREC_RIGHT (peel), cst));
-}
-
 /* Fold the multiplication of an interval and a constant.  */
 
 static inline tree 
@@ -439,80 +259,6 @@ chrec_fold_multiply_poly_poly (tree type
       chrec_fold_multiply (type, CHREC_RIGHT (poly0), CHREC_RIGHT (poly1))));
 }
 
-/* Fold the addition of a polynomial and a peeled chrec.  */
-
-static inline tree 
-chrec_fold_multiply_poly_peel (tree type, 
-			       tree poly, 
-			       tree peel)
-{
-#if defined ENABLE_CHECKING
-  if (peel == NULL_TREE
-      || poly == NULL_TREE
-      || TREE_CODE (peel) != PEELED_CHREC
-      || TREE_CODE (poly) != POLYNOMIAL_CHREC)
-    abort ();
-#endif
-  
-  /*
-    {a, +, b}_1 * (c, d)_2  ->  ({a, +, b}_1 * c, {a, +, b}_1 * d)_2,
-    {a, +, b}_2 * (c, d)_1  ->  {a * (c, d)_1, +, b}_2,
-    {a, +, b}_x * (c, d)_x  ->  ({a, +, b}_x * c, {a, +, b}_x * d)_x.  */
-  if (CHREC_VARIABLE (poly) < CHREC_VARIABLE (peel))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel), 
-       chrec_fold_multiply (type, poly, CHREC_LEFT (peel)),
-       chrec_fold_multiply (type, poly, CHREC_RIGHT (peel)));
-  
-  if (CHREC_VARIABLE (poly) > CHREC_VARIABLE (peel))
-    return build_polynomial_chrec 
-      (CHREC_VARIABLE (poly), 
-       chrec_fold_multiply (type, CHREC_LEFT (poly), peel),
-       chrec_fold_multiply (type, CHREC_RIGHT (poly), peel));
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel), 
-     chrec_fold_multiply (type, poly, CHREC_LEFT (peel)),
-     chrec_fold_multiply (type, poly, CHREC_RIGHT (peel)));
-}
-
-/* Fold the addition of two peeled chrecs.  */
-
-static inline tree 
-chrec_fold_multiply_peel_peel (tree type, 
-			       tree peel0, 
-			       tree peel1)
-{
-#if defined ENABLE_CHECKING
-  if (peel0 == NULL_TREE
-      || peel1 == NULL_TREE
-      || TREE_CODE (peel0) != PEELED_CHREC
-      || TREE_CODE (peel1) != PEELED_CHREC)
-    abort ();
-#endif
-  
-  /*
-    (a, b)_1 * (c, d)_2  ->  ((a, b)_1 * c, (a, b)_1 * d)_2,
-    (a, b)_2 * (c, d)_1  ->  (a * (c, d)_1, b * (c, d)_1)_2,
-    (a, b)_x * (c, d)_x  ->  (a * c, b * d)_x.  */
-  if (CHREC_VARIABLE (peel0) < CHREC_VARIABLE (peel1))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel1), 
-       chrec_fold_multiply (type, peel0, CHREC_LEFT (peel1)),
-       chrec_fold_multiply (type, peel0, CHREC_RIGHT (peel1)));
-  
-  if (CHREC_VARIABLE (peel0) > CHREC_VARIABLE (peel1))
-    return build_peeled_chrec 
-      (CHREC_VARIABLE (peel0), 
-       chrec_fold_multiply (type, CHREC_LEFT (peel0), peel1),
-       chrec_fold_multiply (type, CHREC_RIGHT (peel0), peel1));
-  
-  return build_peeled_chrec 
-    (CHREC_VARIABLE (peel0), 
-     chrec_fold_multiply (type, CHREC_LEFT (peel0), CHREC_LEFT (peel1)),
-     chrec_fold_multiply (type, CHREC_RIGHT (peel0), CHREC_RIGHT (peel1)));
-}
-
 /* Fold the multiplication of two intervals.  */
 
 static inline tree
@@ -613,10 +359,7 @@ chrec_fold_plus_1 (enum tree_code code, 
 	{
 	case POLYNOMIAL_CHREC:
 	  return chrec_fold_plus_poly_poly (code, type, op0, op1);
-	  
-	case PEELED_CHREC:
-	  return chrec_fold_plus_poly_peel (code, type, op0, op1);
-	  
+
 	default:
 	  if (code == PLUS_EXPR)
 	    return build_polynomial_chrec 
@@ -629,27 +372,7 @@ chrec_fold_plus_1 (enum tree_code code, 
 	       chrec_fold_minus (type, CHREC_LEFT (op0), op1),
 	       CHREC_RIGHT (op0));
 	}
-      
-    case PEELED_CHREC:
-      switch (TREE_CODE (op1))
-	{
-	case POLYNOMIAL_CHREC:
-	  return chrec_fold_plus_peel_poly (code, type, op0, op1);
-	  
-	case PEELED_CHREC:
-	  return chrec_fold_plus_peel_peel (type, op0, op1);
-	  
-	default:
-	  return build_peeled_chrec 
-	    (CHREC_VARIABLE (op0),
-	     (code == PLUS_EXPR ? 
-	      chrec_fold_plus (type, CHREC_LEFT (op0), op1) :
-	      chrec_fold_minus (type, CHREC_LEFT (op0), op1)),
-	     (code == PLUS_EXPR ? 
-	      chrec_fold_plus (type, CHREC_RIGHT (op0), op1) :
-	      chrec_fold_minus (type, CHREC_RIGHT (op0), op1)));
-	}
-      
+
     case INTERVAL_CHREC:
       switch (TREE_CODE (op1))
 	{
@@ -719,18 +442,6 @@ chrec_fold_plus_1 (enum tree_code code, 
 				    convert (type,
 					     integer_minus_one_node)));
 
-	case PEELED_CHREC:
-	  if (code == PLUS_EXPR)
-	    return build_peeled_chrec 
-	      (CHREC_VARIABLE (op1),
-	       chrec_fold_plus (type, op0, CHREC_LEFT (op1)),
-	       chrec_fold_plus (type, op0, CHREC_RIGHT (op1)));
-	  else
-	    return build_peeled_chrec 
-	      (CHREC_VARIABLE (op1),
-	       chrec_fold_minus (type, op0, CHREC_LEFT (op1)),
-	       chrec_fold_minus (type, op0, CHREC_RIGHT (op1)));
-	  
 	case INTERVAL_CHREC:
 	  t1 = (code == PLUS_EXPR ? 
 		chrec_fold_plus (type, op0, CHREC_LOW (op1)) : 
@@ -817,9 +528,6 @@ chrec_fold_multiply (tree type, 
 	case POLYNOMIAL_CHREC:
 	  return chrec_fold_multiply_poly_poly (type, op0, op1);
 	  
-	case PEELED_CHREC:
-	  return chrec_fold_multiply_poly_peel (type, op0, op1);
-	  
 	default:
 	  if (integer_onep (op1))
 	    return op0;
@@ -832,27 +540,6 @@ chrec_fold_multiply (tree type, 
 	     chrec_fold_multiply (type, CHREC_RIGHT (op0), op1));
 	}
       
-    case PEELED_CHREC:
-      switch (TREE_CODE (op1))
-	{
-	case POLYNOMIAL_CHREC:
-	  return chrec_fold_multiply_poly_peel (type, op1, op0);
-	  
-	case PEELED_CHREC:
-	  return chrec_fold_multiply_peel_peel (type, op0, op1);
-	  
-	default:
-	  if (integer_onep (op1))
-	    return op0;
-	  if (integer_zerop (op1))
-	    return convert (type, integer_zero_node);
-	  
-	  return build_peeled_chrec 
-	    (CHREC_VARIABLE (op0),
-	     chrec_fold_multiply (type, CHREC_LEFT (op0), op1),
-	     chrec_fold_multiply (type, CHREC_RIGHT (op0), op1));
-	}
-      
     case INTERVAL_CHREC:
       switch (TREE_CODE (op1))
 	{
@@ -862,12 +549,6 @@ chrec_fold_multiply (tree type, 
 	     chrec_fold_multiply (type, CHREC_LEFT (op1), op0),
 	     chrec_fold_multiply (type, CHREC_RIGHT (op1), op0));
 	  
-	case PEELED_CHREC:
-	  return build_peeled_chrec 
-	    (CHREC_VARIABLE (op1),
-	     chrec_fold_multiply (type, CHREC_LEFT (op1), op0),
-	     chrec_fold_multiply (type, CHREC_RIGHT (op1), op0));
-	  
 	case INTERVAL_CHREC:
 	  return chrec_fold_multiply_ival_ival (type, op0, op1);
 	  
@@ -894,12 +575,6 @@ chrec_fold_multiply (tree type, 
 	     chrec_fold_multiply (type, CHREC_LEFT (op1), op0),
 	     chrec_fold_multiply (type, CHREC_RIGHT (op1), op0));
 	  
-	case PEELED_CHREC:
-	  return build_peeled_chrec 
-	    (CHREC_VARIABLE (op1),
-	     chrec_fold_multiply (type, CHREC_LEFT (op1), op0),
-	     chrec_fold_multiply (type, CHREC_RIGHT (op1), op0));
-	  
 	case INTERVAL_CHREC:
 	  return chrec_fold_multiply_ival_cst (type, op1, op0);
 	  
@@ -917,18 +592,6 @@ chrec_fold_multiply (tree type, 
 
 /* Operations.  */
 
-/* Try to recognize the nature of the peeled chrec and to transform it
-   into a more specific chrec: polynomial, periodic, ...  For example,
-   this function transforms (6, {9, +, 3}_1)_1 into {6, +, 3}_1.  */
-
-tree
-simplify_peeled_chrec (tree peel)
-{
-  tree res = peel;
-  
-  return res;
-}
-
 /* Helper function.  Use the Newton's interpolating formula for
    evaluating the value of the evolution function.  */
 
@@ -1047,9 +710,6 @@ chrec_replace_initial_condition (tree ch
 	 chrec_replace_initial_condition (CHREC_LEFT (chrec), init_cond),
 	 CHREC_RIGHT (chrec));
       
-    case PEELED_CHREC:
-      return chrec_top;
-      
     default:
       return init_cond;
     }
@@ -1615,12 +1275,6 @@ chrec_convert (tree type, 
 				     chrec_convert (type,
 						    CHREC_RIGHT (chrec)));
 
-    case PEELED_CHREC:
-      return build_peeled_chrec 
-	(CHREC_VARIABLE (chrec), 
-	 chrec_convert (type, CHREC_LEFT (chrec)), 
-	 chrec_convert (type, CHREC_RIGHT (chrec)));
-      
     case INTERVAL_CHREC:
       return build_interval_chrec
 	(chrec_convert (type, CHREC_LOW (chrec)), 
Index: tree-chrec.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-chrec.h,v
retrieving revision 1.1.2.22
diff -d -u -p -r1.1.2.22 tree-chrec.h
--- tree-chrec.h	16 Jun 2004 20:54:52 -0000	1.1.2.22
+++ tree-chrec.h	21 Jun 2004 14:45:35 -0000
@@ -57,8 +57,7 @@ static inline bool
 tree_is_chrec (tree expr)
 {
   if (TREE_CODE (expr) == INTERVAL_CHREC
-      || TREE_CODE (expr) == POLYNOMIAL_CHREC
-      || TREE_CODE (expr) == PEELED_CHREC)
+      || TREE_CODE (expr) == POLYNOMIAL_CHREC)
     return true;
   else
     return false;
@@ -75,7 +74,6 @@ extern tree count_ev_in_wider_type (tree
 extern tree chrec_type (tree);
 
 /* Operations.  */
-extern tree simplify_peeled_chrec (tree);
 extern tree chrec_apply (unsigned, tree, tree);
 extern tree chrec_replace_initial_condition (tree, tree);
 extern tree update_initial_condition_to_origin (tree);
@@ -129,17 +127,6 @@ build_polynomial_chrec (unsigned loop_nu
 		build_int_2 (loop_num, 0), left, right);
 }
 
-/* Build a peeled chain of recurrence.  */
-
-static inline tree 
-build_peeled_chrec (unsigned loop_num, 
-		    tree left, 
-		    tree right)
-{
-  return build (PEELED_CHREC, TREE_TYPE (left),
-		build_int_2 (loop_num, 0), left, right);
-}
-
 /* Build a chrec top interval for type.  */
 
 static inline tree 
@@ -249,21 +236,6 @@ evolution_function_is_multivariate (tree
   return !evolution_function_is_univariate_p (chrec);
 }
 
-/* Determine whether the given tree is an affine peeled chrec.  */
-
-static inline bool 
-evolution_function_is_peeled_affine_p (tree chrec)
-{
-  if (chrec == NULL_TREE)
-    return false;
-  
-  if (TREE_CODE (chrec) == PEELED_CHREC)
-    return (evolution_function_is_affine_or_constant_p (CHREC_LEFT (chrec)) 
-	    && evolution_function_is_affine_p (CHREC_RIGHT (chrec)));
-
-  return false;
-}
-
 /* Determines which expressions are simpler to be {handled | kept} in a 
    symbolic form.  */
 
Index: tree-pretty-print.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pretty-print.c,v
retrieving revision 1.1.2.70.2.8
diff -d -u -p -r1.1.2.70.2.8 tree-pretty-print.c
--- tree-pretty-print.c	14 Jun 2004 01:58:14 -0000	1.1.2.70.2.8
+++ tree-pretty-print.c	21 Jun 2004 14:45:35 -0000
@@ -1475,16 +1475,6 @@ dump_generic_node (pretty_printer *buffe
       is_stmt = false;
       break;
       
-    case PEELED_CHREC:
-      pp_string (buffer, "(");
-      dump_generic_node (buffer, CHREC_LEFT (node), spc, flags, false);
-      pp_string (buffer, ", ");
-      dump_generic_node (buffer, CHREC_RIGHT (node), spc, flags, false);
-      pp_string (buffer, ")_");
-      dump_generic_node (buffer, CHREC_VAR (node), spc, flags, false);
-      is_stmt = false;
-      break;
-
     case INTERVAL_CHREC:
       if (node == chrec_top)
 	pp_string (buffer, "[-oo, +oo]");
Index: tree-scalar-evolution.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-scalar-evolution.c,v
retrieving revision 1.1.2.58
diff -d -u -p -r1.1.2.58 tree-scalar-evolution.c
--- tree-scalar-evolution.c	18 Jun 2004 20:52:32 -0000	1.1.2.58
+++ tree-scalar-evolution.c	21 Jun 2004 14:45:35 -0000
@@ -1563,20 +1563,11 @@ analyze_evolution_in_loop (tree loop_phi
 	 loop_phi_node by following the ssa edges, the
 	 evolution is represented by a peeled chrec, ie. the
 	 first iteration, EV_FN has the value INIT_COND, then
-	 all the other iterations it has the value of ARG.  */
+	 all the other iterations it has the value of ARG.  
+	 For the moment, PEELED_CHREC nodes are not built.  */
       if (!res)
-	{
-	  /* FIXME: when dealing with periodic scalars, the
-	     analysis of the scalar evolution of ARG would
-	     create an infinite recurrence.  Solution: don't
-	     try to simplify the peeled chrec at this time,
-	     but wait until having more information.   */
-	  ev_fn = build_peeled_chrec (loop->num, init_cond, arg);
-		  
-	  /* Try to simplify the peeled chrec.  */
-	  ev_fn = simplify_peeled_chrec (ev_fn);
-	}
-	      
+	ev_fn = chrec_top;
+      
       /* When there are multiple back edges of the loop (which in fact never
 	 happens currently, but nevertheless), merge their evolutions. */
       evolution_function = chrec_merge (evolution_function, ev_fn);
@@ -2029,13 +2020,6 @@ instantiate_parameters_1 (struct loop *l
 				      allow_superloop_chrecs);
       return build_polynomial_chrec (CHREC_VARIABLE (chrec), op0, op1);
 
-    case PEELED_CHREC:
-      op0 = instantiate_parameters_1 (loop, CHREC_LEFT (chrec),
-				      allow_superloop_chrecs);
-      op1 = instantiate_parameters_1 (loop, CHREC_RIGHT (chrec),
-				      allow_superloop_chrecs);
-      return build_peeled_chrec (CHREC_VARIABLE (chrec), op0, op1);
-
     case INTERVAL_CHREC:
       op0 = instantiate_parameters_1 (loop, CHREC_LOW (chrec),
 				      allow_superloop_chrecs);
@@ -2245,7 +2229,6 @@ number_of_iterations_for_all_loops (varr
 struct chrec_stats 
 {
   unsigned nb_chrecs;
-  unsigned nb_peeled;
   unsigned nb_affine;
   unsigned nb_affine_multivar;
   unsigned nb_higher_poly;
@@ -2260,7 +2243,6 @@ static inline void
 reset_chrecs_counters (struct chrec_stats *stats)
 {
   stats->nb_chrecs = 0;
-  stats->nb_peeled = 0;
   stats->nb_affine = 0;
   stats->nb_affine_multivar = 0;
   stats->nb_higher_poly = 0;
@@ -2280,7 +2262,6 @@ dump_chrecs_stats (FILE *file, struct ch
   fprintf (file, "%d\taffine multivariate chrecs\n", stats->nb_affine_multivar);
   fprintf (file, "%d\tdegree greater than 2 polynomials\n", 
 	   stats->nb_higher_poly);
-  fprintf (file, "%d\taffine peeled chrecs\n", stats->nb_peeled);
   fprintf (file, "%d\tchrec_top chrecs\n", stats->nb_chrec_top);
   fprintf (file, "%d\tinterval chrecs\n", stats->nb_chrec_top);
   fprintf (file, "-----------------------------------------\n");
@@ -2355,12 +2336,6 @@ gather_chrec_stats (tree chrec, struct c
 	}
       break;
 
-    case PEELED_CHREC:
-      if (dump_file && (dump_flags & TDF_STATS))
-	fprintf (dump_file, "  peeled chrec\n");
-      stats->nb_peeled++;
-      break;
-      
     default:
       break;
     }
Index: tree.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.def,v
retrieving revision 1.52.2.21.2.8
diff -d -u -p -r1.52.2.21.2.8 tree.def
--- tree.def	14 Jun 2004 01:58:16 -0000	1.52.2.21.2.8
+++ tree.def	21 Jun 2004 14:45:40 -0000
@@ -908,10 +908,6 @@ DEFTREECODE (INTERVAL_CHREC, "interval_c
    Under the form: cr = {CHREC_LEFT (cr), +, CHREC_RIGHT (cr)}.  */
 DEFTREECODE (POLYNOMIAL_CHREC, "polynomial_chrec", 'e', 3)
 
-/* Peeled chains of recurrences.
-   Under the form: (CHREC_LEFT (cr), CHREC_RIGHT (cr)).  */
-DEFTREECODE (PEELED_CHREC, "peeled_chrec", 'e', 3)
-
 /* Used to chain children of container statements together.
    Use the interface in tree-iterator.h to access this node.  */
 DEFTREECODE (STATEMENT_LIST, "statement_list", 'x', 0)


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