From: Sven Verdoolaege Date: Tue, 23 Sep 2008 10:16:57 +0000 (+0200) Subject: isl_basic_map_is_empty: don't compute sample for rational sets X-Git-Tag: isl-0.01~387 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60b1d3692ad7271c1adb9aded5412f8acf43b167;p=platform%2Fupstream%2Fisl.git isl_basic_map_is_empty: don't compute sample for rational sets --- diff --git a/isl_map.c b/isl_map.c index 94d490f..c9eea41 100644 --- a/isl_map.c +++ b/isl_map.c @@ -1440,8 +1440,9 @@ void isl_basic_set_dump(struct isl_basic_set *bset, FILE *out, int indent) } fprintf(out, "%*s", indent, ""); - fprintf(out, "ref: %d, nparam: %d, dim: %d, extra: %d\n", - bset->ref, bset->nparam, bset->dim, bset->extra); + fprintf(out, "ref: %d, nparam: %d, dim: %d, extra: %d, flags: %x\n", + bset->ref, bset->nparam, bset->dim, bset->extra, + bset->flags); dump((struct isl_basic_map *)bset, out, indent); } @@ -3209,6 +3210,14 @@ int isl_basic_map_is_empty(struct isl_basic_map *bmap) if (F_ISSET(bmap, ISL_BASIC_MAP_EMPTY)) return 1; + if (F_ISSET(bmap, ISL_BASIC_MAP_RATIONAL)) { + struct isl_basic_map *copy = isl_basic_map_copy(bmap); + copy = isl_basic_map_convex_hull(copy); + empty = F_ISSET(copy, ISL_BASIC_MAP_EMPTY); + isl_basic_map_free(copy); + return empty; + } + total = 1 + bmap->nparam + bmap->n_in + bmap->n_out + bmap->n_div; if (bmap->sample && bmap->sample->size == total) { int contains = basic_map_contains(bmap, bmap->sample);