[patch] Fix for automatic parallelization
Sebastian Pop
sebpop@gmail.com
Thu Jan 10 19:41:00 GMT 2008
On Jan 10, 2008 5:11 AM, Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote:
> > + type = TREE_TYPE (nit);
> > bsi = bsi_last (loop->latch);
> > create_iv (build_int_cst_type (type, 0), build_int_cst (type, 1), NULL_TREE,
> > loop, &bsi, true, &var_before, NULL);
>
> this fix looks weird, let me please have a look first what's going on
> there.
>
>From what I understood there is a type precision mismatch for the new
created iv.
> > @@ -1695,6 +1685,9 @@ gen_parallel_loop (struct loop *loop, ht
> > create_call_for_reduction (loop, reduction_list, &clsn_data);
> >
> > scev_reset ();
> > + free_numbers_of_iterations_estimates_loop (parallel_head->loop_father);
> > + if (loop_outer (parallel_head->loop_father))
> > + free_numbers_of_iterations_estimates_loop (loop_outer (parallel_head->loop_father));
>
> you need to release the estimates for all loops, not just
> these two.
>
What about the following fix?
Index: tree-parloops.c
===================================================================
--- tree-parloops.c (revision 131430)
+++ tree-parloops.c (working copy)
@@ -1700,6 +1700,11 @@ gen_parallel_loop (struct loop *loop, ht
expander to do it). */
cancel_loop_tree (loop);
+ /* Free loop bound estimations that could contain references to
+ removed statements. */
+ FOR_EACH_LOOP (li, loop, 0)
+ free_numbers_of_iterations_estimates_loop (loop);
+
/* Expand the parallel constructs. We do it directly here instead of running
a separate expand_omp pass, since it is more efficient, and less likely to
cause troubles with further analyses not being able to deal with the
More information about the Gcc-patches
mailing list