[lno] we now intechange loops on a well known benchmark...

Sebastian Pop sebastian.pop@cri.ensmp.fr
Thu Sep 2 16:08:00 GMT 2004


On Thu, Sep 02, 2004 at 04:41:30PM +0200, Zdenek Dvorak wrote:
> > + 	* cfgloop.h (struct loop): New fields parallel_p, and 
> > + 	estimated_nb_iterations.
> 
> we already have field for this -- loop->bounds.  It would be also nice
> to put the related analysis to
> tree-ssa-loop-niter.c:estimate_numbers_of_iterations_loop.
> 

Okay, I will prepare a patch for this.

Here is another minor fix for the swim loop.

Index: ChangeLog.lno
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.lno,v
retrieving revision 1.1.2.262
diff -d -u -p -r1.1.2.262 ChangeLog.lno
--- ChangeLog.lno	2 Sep 2004 15:24:16 -0000	1.1.2.262
+++ ChangeLog.lno	2 Sep 2004 15:55:19 -0000
@@ -1,5 +1,11 @@
 2004-09-02  Sebastian Pop  <pop@cri.ensmp.fr>
 
+	* tree-data-ref.c (analyze_array_indexes): Determine the estimation 
+	of number of iteration also when the number_of_iterations_in_loop 
+	contains undetermined elements.
+
+2004-09-02  Sebastian Pop  <pop@cri.ensmp.fr>
+
 	* tree-loop-linear.c (gather_interchange_stats): Add more comments.
 	Gather also strides of accessed data.  Pass in the data references 
 	array.
Index: tree-data-ref.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-data-ref.c,v
retrieving revision 1.1.2.36
diff -d -u -p -r1.1.2.36 tree-data-ref.c
--- tree-data-ref.c	2 Sep 2004 00:09:35 -0000	1.1.2.36
+++ tree-data-ref.c	2 Sep 2004 15:55:19 -0000
@@ -511,7 +511,7 @@ analyze_array_indexes (struct loop *loop
 		       tree ref)
 {
   tree opnd0, opnd1;
-  tree access_fn;
+  tree access_fn, niter;
   
   opnd0 = TREE_OPERAND (ref, 0);
   opnd1 = TREE_OPERAND (ref, 1);
@@ -523,7 +523,9 @@ analyze_array_indexes (struct loop *loop
   access_fn = instantiate_parameters 
     (loop, analyze_scalar_evolution (loop, opnd1));
 
-  if (chrec_contains_symbols (number_of_iterations_in_loop (loop)))
+  niter = number_of_iterations_in_loop (loop);
+  if (chrec_contains_symbols (niter)
+      || chrec_contains_undetermined (niter))
     estimate_niter_from_size_of_data (loop, opnd0, access_fn);
   
   VARRAY_PUSH_TREE (*access_fns, access_fn);



More information about the Gcc-patches mailing list