[autovect] Fix values passed to analyze_subscript_affine_affine

Sebastian Pop sebastian.pop@cri.ensmp.fr
Thu Jan 13 14:52:00 GMT 2005


Hi,

I have committed this patch for fixing a bug reported by Dorit
offline.  Because the definition of evolution_function_is_affine_p has
changed to include evolutions that contain symbols not declared in the
current loop, there were some symbols that filtered down to the
analyze_subscript_affine_affine function, which caused an ICE.

I have to see wheter this patch also applies to mainline. 

Tested on autovect-branch on i686.  Applied to autovect-branch.

Index: ChangeLog.autovect
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.autovect,v
retrieving revision 1.1.2.21
diff -d -u -p -r1.1.2.21 ChangeLog.autovect
--- ChangeLog.autovect	12 Jan 2005 15:52:10 -0000	1.1.2.21
+++ ChangeLog.autovect	13 Jan 2005 14:43:59 -0000
@@ -1,3 +1,10 @@
+2005-01-13  Sebastian Pop  <pop@cri.ensmp.fr>
+
+	* tree-data-ref.c (analyze_subscript_affine_affine): Clarify
+	function's comment.  Include a FIXME note for the symbolic case.
+	(analyze_siv_subscript, analyze_miv_subscript): Ensure that no 
+	symbolic evolution is passed to analyze_subscript_affine_affine.
+
 2005-01-12  Ira Rosen  <irar@il.ibm.com>
 	    Dorit Naishlos  <dorit@il.ibm.com>
 
Index: tree-data-ref.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-data-ref.c,v
retrieving revision 2.15.4.5
diff -d -u -p -r2.15.4.5 tree-data-ref.c
--- tree-data-ref.c	19 Dec 2004 23:32:48 -0000	2.15.4.5
+++ tree-data-ref.c	13 Jan 2005 14:43:59 -0000
@@ -1333,8 +1333,14 @@ compute_overlap_steps_for_affine_1_2 (tr
 }
 
 /* Determines the overlapping elements due to accesses CHREC_A and
-   CHREC_B, that are affine functions.  This is a part of the
-   subscript analyzer.  */
+   CHREC_B, that are affine functions.  This function cannot handle
+   symbolic evolution functions, ie. when initial conditions are
+   parameters, because it uses lambda matrices of integers.  
+
+   FIXME: It is sometimes possible to perform the test for symbolic
+   cases, however these have to be implemented in another function.
+   Example: {t, +, 1}_1 vs {t, +, 2}_1 have exactly the same
+   overlaps as {0, +, 1}_1 vs {0, +, 2}_1  */
 
 static void
 analyze_subscript_affine_affine (tree chrec_a, 
@@ -1656,7 +1662,9 @@ analyze_siv_subscript (tree chrec_a, 
 				      overlaps_b, overlaps_a, last_conflicts);
   
   else if (evolution_function_is_affine_p (chrec_a)
-	   && evolution_function_is_affine_p (chrec_b))
+	   && !chrec_contains_symbols (chrec_a)
+	   && evolution_function_is_affine_p (chrec_b)
+	   && !chrec_contains_symbols (chrec_b))
     analyze_subscript_affine_affine (chrec_a, chrec_b, 
 				     overlaps_a, overlaps_b, last_conflicts);
   else
@@ -1748,7 +1756,9 @@ analyze_miv_subscript (tree chrec_a, 
     }
   
   else if (evolution_function_is_affine_multivariate_p (chrec_a)
-	   && evolution_function_is_affine_multivariate_p (chrec_b))
+	   && !chrec_contains_symbols (chrec_a)
+	   && evolution_function_is_affine_multivariate_p (chrec_b)
+	   && !chrec_contains_symbols (chrec_b))
     {
       /* testsuite/.../ssa-chrec-35.c
 	 {0, +, 1}_2  vs.  {0, +, 1}_3



More information about the Gcc-patches mailing list