isl_basic_map_is_empty: don't compute sample for rational sets
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 23 Sep 2008 10:16:57 +0000 (12:16 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 13 Oct 2008 10:33:09 +0000 (12:33 +0200)
isl_map.c

index 94d490f..c9eea41 100644 (file)
--- 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);