From: Sven Verdoolaege Date: Thu, 20 Jan 2011 14:30:52 +0000 (+0100) Subject: isl_transitive_closure.c: more anonymize input map during incremental computation X-Git-Tag: isl-0.06~23^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a6ff9e4a83e5c15f249f22cbff73cc7a61fedec;p=platform%2Fupstream%2Fisl.git isl_transitive_closure.c: more anonymize input map during incremental computation 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 --- diff --git a/isl_test.c b/isl_test.c index 04623a4..08deb2a 100644 --- a/isl_test.c +++ b/isl_test.c @@ -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) diff --git a/isl_transitive_closure.c b/isl_transitive_closure.c index 4ca369a..5bc8c3a 100644 --- a/isl_transitive_closure.c +++ b/isl_transitive_closure.c @@ -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);