From 60b1d3692ad7271c1adb9aded5412f8acf43b167 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 23 Sep 2008 12:16:57 +0200 Subject: [PATCH] isl_basic_map_is_empty: don't compute sample for rational sets --- isl_map.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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); -- 2.7.4