From: Sven Verdoolaege Date: Fri, 13 Apr 2012 11:29:57 +0000 (+0200) Subject: Merge branch 'maint' X-Git-Tag: isl-0.10~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=747237f4a946ad88d45822eb281dc70665b81a76;hp=fa2d3e52a658aaaea849657d289820d37b642af8;p=platform%2Fupstream%2Fisl.git Merge branch 'maint' --- diff --git a/isl_coalesce.c b/isl_coalesce.c index 0694ade..1a71661 100644 --- a/isl_coalesce.c +++ b/isl_coalesce.c @@ -394,6 +394,9 @@ static int is_extension(struct isl_map *map, int i, int j, int k, struct isl_tab_undo *snap, *snap2; unsigned n_eq = map->p[i]->n_eq; + if (isl_tab_is_equality(tabs[i], n_eq + k)) + return 0; + snap = isl_tab_snap(tabs[i]); tabs[i] = isl_tab_relax(tabs[i], n_eq + k); snap2 = isl_tab_snap(tabs[i]); diff --git a/isl_map.c b/isl_map.c index 58ac0ff..8023814 100644 --- a/isl_map.c +++ b/isl_map.c @@ -7066,7 +7066,7 @@ struct isl_map *isl_basic_map_union( { struct isl_map *map; if (!bmap1 || !bmap2) - return NULL; + goto error; isl_assert(bmap1->ctx, isl_space_is_equal(bmap1->dim, bmap2->dim), goto error); diff --git a/isl_polynomial.c b/isl_polynomial.c index 132986e..6bccfba 100644 --- a/isl_polynomial.c +++ b/isl_polynomial.c @@ -3482,7 +3482,7 @@ __isl_give isl_term *isl_term_dup(__isl_keep isl_term *term) isl_term *dup; unsigned total; - if (term) + if (!term) return NULL; total = isl_space_dim(term->dim, isl_dim_all) + term->div->n_row; diff --git a/isl_tab.c b/isl_tab.c index 097b335..a5e55b0 100644 --- a/isl_tab.c +++ b/isl_tab.c @@ -2556,6 +2556,13 @@ struct isl_tab *isl_tab_relax(struct isl_tab *tab, int con) var = &tab->con[con]; + if (var->is_row && (var->index < 0 || var->index < tab->n_redundant)) + isl_die(tab->mat->ctx, isl_error_invalid, + "cannot relax redundant constraint", goto error); + if (!var->is_row && (var->index < 0 || var->index < tab->n_dead)) + isl_die(tab->mat->ctx, isl_error_invalid, + "cannot relax dead constraint", goto error); + if (!var->is_row && !max_is_manifestly_unbounded(tab, var)) if (to_row(tab, var, 1) < 0) goto error; diff --git a/isl_test.c b/isl_test.c index 4fda4d8..f523a8e 100644 --- a/isl_test.c +++ b/isl_test.c @@ -1106,6 +1106,12 @@ int test_coalesce(struct isl_ctx *ctx) if (test_coalesce_set(ctx, "{ [a, b] : exists e : 2e = a and " "a >= 0 and (a <= 3 or (b <= 0 and b >= -4 + a)) }", 0) < 0) return -1; + if (test_coalesce_set(ctx, + "{ [i, j, i', j'] : i <= 2 and j <= 2 and " + "j' >= -1 + 2i + j - 2i' and i' <= -1 + i and " + "j >= 1 and j' <= i + j - i' and i >= 1; " + "[1, 1, 1, 1] }", 0) < 0) + return -1; return 0; }