From 9079e576b25b8b2bdc1ca2ac540e0e8a003e5223 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 14 Feb 2012 20:02:43 +0100 Subject: [PATCH] isl_basic_map_realign: preserve (most) flags In particular, preserve the ISL_BASIC_MAP_EMPTY flag. Many parts of the code check for this flags so they do not have to deal with the "1 = 0" constraint. Signed-off-by: Sven Verdoolaege --- isl_map.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/isl_map.c b/isl_map.c index 41d5d49..240457a 100644 --- a/isl_map.c +++ b/isl_map.c @@ -9333,14 +9333,21 @@ __isl_give isl_basic_map *isl_basic_map_realign(__isl_take isl_basic_map *bmap, __isl_take isl_space *dim, __isl_take struct isl_dim_map *dim_map) { isl_basic_map *res; + unsigned flags; bmap = isl_basic_map_cow(bmap); if (!bmap || !dim || !dim_map) goto error; + flags = bmap->flags; + ISL_FL_CLR(flags, ISL_BASIC_MAP_FINAL); + ISL_FL_CLR(flags, ISL_BASIC_MAP_NORMALIZED); + ISL_FL_CLR(flags, ISL_BASIC_MAP_NORMALIZED_DIVS); res = isl_basic_map_alloc_space(dim, bmap->n_div, bmap->n_eq, bmap->n_ineq); res = isl_basic_map_add_constraints_dim_map(res, bmap, dim_map); + if (res) + res->flags = flags; res = isl_basic_map_finalize(res); return res; error: -- 2.7.4