http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53852



--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-13 
12:59:45 UTC ---

Sven suggests sth like:



Index: gcc/graphite-dependences.c

===================================================================

--- gcc/graphite-dependences.c  (revision 194472)

+++ gcc/graphite-dependences.c  (working copy)

@@ -461,13 +461,16 @@ compute_deps (scop_p scop, vec<poly_bb_p

   isl_union_map *reads = scop_get_reads (scop, pbbs);

   isl_union_map *must_writes = scop_get_must_writes (scop, pbbs);

   isl_union_map *may_writes = scop_get_may_writes (scop, pbbs);

-  isl_union_map *all_writes = isl_union_map_union

-    (isl_union_map_copy (must_writes), isl_union_map_copy (may_writes));

-  isl_space *space = isl_union_map_get_space (all_writes);

-  isl_union_map *empty = isl_union_map_empty (space);

   isl_union_map *original = scop_get_original_schedule (scop, pbbs);

   int res;



+  reads = isl_union_map_coalesce (reads);

+  must_writes = isl_union_map_coalesce (must_writes);

+  may_writes = isl_union_map_coalesce (may_writes);

+  isl_union_map *all_writes = isl_union_map_union

+    (isl_union_map_copy (must_writes), isl_union_map_copy (may_writes));

+  all_writes = isl_union_map_coalesce (all_writes);

+  original = isl_union_map_coalesce (original);

   res = isl_union_map_compute_flow (isl_union_map_copy (reads),

                                    isl_union_map_copy (must_writes),

                                    isl_union_map_copy (may_writes),

@@ -475,6 +478,8 @@ compute_deps (scop_p scop, vec<poly_bb_p

                                    must_raw, may_raw, must_raw_no_source,

                                    may_raw_no_source);

   gcc_assert (res == 0);

+  isl_space *space = isl_union_map_get_space (all_writes);

+  isl_union_map *empty = isl_union_map_empty (space);

   res = isl_union_map_compute_flow (isl_union_map_copy (all_writes),

                                    reads, empty,

                                    isl_union_map_copy (original),



which for me only shaves a small bit of compile-time from the reduced testcase

(around 10%).

Reply via email to