[patch] Loop distribution for single nested loops

Zdenek Dvorak rakdver@kam.mff.cuni.cz
Wed Sep 12 19:52:00 GMT 2007


Hello,

> 	(slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
> 	tree_duplicate_loop_to_edge_cfg.  Flush the PENDING_STMT of
> 	redirected edges.

I think tree_duplicate_loop_to_edge_cfg needs to be rewritten, as
some parts of it duplicate functionality existing elsewhere; but I can
take care of that when the patch is in mainline.

> 	* tree-data-ref.c (debug_data_dependence_relations): New.
> 	(dump_data_dependence_relation): Call dump_data_reference.
> 	(dr_may_alias_p, compute_all_dependences): Use DR_IS_WRITE.

It is not clear why you need to rename !DR_IS_READ to DR_IS_WRITE?

> +static void
> +generate_loops_for_partition (struct loop *loop, bitmap partition, bool copy_p)
> +{
> +  unsigned i, x = 0;
> +  block_stmt_iterator bsi;
> +  basic_block *bbs;
> +
> +  if (copy_p)
> +    {
> +      struct loop *res;
> +      edge preheader = loop_preheader_edge (loop);
> +
> +      initialize_original_copy_tables ();
> +      res = tree_duplicate_loop_to_edge_cfg (loop, preheader);
> +      free_original_copy_tables ();
> +
> +      if (!res)
> +	return;
> +
> +      ldist_update_phis_for_duplicate_loop (loop, res);
> +      rename_variables_in_loop (res);

I do not understand this -- why do you need to rename the variables?

> +      loop = res;
> +    }

I have just went over the patch quickly, but otherwise it seems fine to
me.

Zdenek



More information about the Gcc-patches mailing list