From 5d65392c3b1ec2e44f3c568fd473bf6a048e2ef7 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 25 Jul 2010 14:05:00 +0200 Subject: [PATCH] isl_map_fast_is_universe: also detect redundant representations of the universe During printing, we don't want to print any constraints if the given map contains the universe. Signed-off-by: Sven Verdoolaege --- isl_map.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/isl_map.c b/isl_map.c index e8edde5..6a21a87 100644 --- a/isl_map.c +++ b/isl_map.c @@ -5280,10 +5280,18 @@ int isl_basic_set_is_universe(struct isl_basic_set *bset) int isl_map_fast_is_universe(__isl_keep isl_map *map) { + int i; + if (!map) return -1; - return map->n == 1 && isl_basic_map_is_universe(map->p[0]); + for (i = 0; i < map->n; ++i) { + int r = isl_basic_map_is_universe(map->p[i]); + if (r < 0 || r) + return r; + } + + return 0; } int isl_set_fast_is_universe(__isl_keep isl_set *set) -- 2.7.4