From 55a53a788fd542fda2610a42c89e9f856da5d27d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 24 Dec 2008 15:54:07 +0100 Subject: [PATCH] isl_map_gist: ensure divs of map are known We assume that the divs of the context are known, because we currently only support gisting in the context of a basic map and computing the divs of a basic map may result in a union of basic maps. --- isl_map.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/isl_map.c b/isl_map.c index ebe4e39..281a92b 100644 --- a/isl_map.c +++ b/isl_map.c @@ -5005,6 +5005,9 @@ error: return NULL; } +/* + * Assumes context has no implicit divs. + */ struct isl_map *isl_map_gist(struct isl_map *map, struct isl_basic_map *context) { int i; @@ -5013,6 +5016,7 @@ struct isl_map *isl_map_gist(struct isl_map *map, struct isl_basic_map *context) if (!map || !context) return NULL; isl_assert(map->ctx, isl_dim_equal(map->dim, context->dim), goto error); + map = isl_map_compute_divs(map); for (i = 0; i < map->n; ++i) context = isl_basic_map_align_divs(context, map->p[i]); for (i = 0; i < map->n; ++i) { -- 2.7.4