isl_transitive_closure.c: more anonymize input map during incremental computation
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 20 Jan 2011 14:30:52 +0000 (15:30 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 21 Jan 2011 21:07:54 +0000 (22:07 +0100)
This instance was missed in 5292e00 (isl_transitive_closure.c: anonymize
input map during incremental computation, Mon Aug 2 11:57:07 2010 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_test.c
isl_transitive_closure.c

index 04623a4..08deb2a 100644 (file)
@@ -1100,6 +1100,31 @@ void test_closure(struct isl_ctx *ctx)
        assert(isl_map_is_equal(map, map2));
        isl_map_free(map);
        isl_map_free(map2);
+
+       str = "[n] -> { [[i0, i1, 1, 0, i0] -> [i5, 1]] -> "
+           "[[i0, -1 + i1, 2, 0, i0] -> [-1 + i5, 2]] : "
+           "exists (e0 = [(3 - n)/3]: i5 >= 2 and i1 >= 2 and "
+           "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and "
+           "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); "
+           "[[i0, i1, 2, 0, i0] -> [i5, 1]] -> "
+           "[[i0, i1, 1, 0, i0] -> [-1 + i5, 2]] : "
+           "exists (e0 = [(3 - n)/3]: i5 >= 2 and i1 >= 1 and "
+           "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and "
+           "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); "
+           "[[i0, i1, 1, 0, i0] -> [i5, 2]] -> "
+           "[[i0, -1 + i1, 2, 0, i0] -> [i5, 1]] : "
+           "exists (e0 = [(3 - n)/3]: i1 >= 2 and i5 >= 1 and "
+           "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and "
+           "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n); "
+           "[[i0, i1, 2, 0, i0] -> [i5, 2]] -> "
+           "[[i0, i1, 1, 0, i0] -> [i5, 1]] : "
+           "exists (e0 = [(3 - n)/3]: i5 >= 1 and i1 >= 1 and "
+           "3i0 <= -1 + n and i1 <= -1 + n and i5 <= -1 + n and "
+           "3e0 >= 1 - n and 3e0 <= 2 - n and 3i0 >= -2 + n) }";
+       map = isl_map_read_from_str(ctx, str, -1);
+       map = isl_map_transitive_closure(map, NULL);
+       assert(map);
+       isl_map_free(map);
 }
 
 void test_lex(struct isl_ctx *ctx)
index 4ca369a..5bc8c3a 100644 (file)
@@ -1974,6 +1974,7 @@ static __isl_give isl_map *construct_power_components(__isl_take isl_dim *dim,
                }
                path_comp = floyd_warshall(isl_dim_copy(dim),
                                                comp, exact, project);
+               path_comp = anonymize(path_comp);
                path_comb = isl_map_apply_range(isl_map_copy(path),
                                                isl_map_copy(path_comp));
                path = isl_map_union(path, path_comp);