From e3c63e9a580f7caae14659272f9d5383af958027 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 9 May 2014 15:44:23 +0200 Subject: [PATCH] isl_basic_map_sort_constraints: skip sorting if constraints are sorted already In particular, if the basic map has been normalized, then the constraints have been sorted already. Signed-off-by: Sven Verdoolaege --- isl_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_map.c b/isl_map.c index e3f29293..4c8d3502 100644 --- a/isl_map.c +++ b/isl_map.c @@ -8990,6 +8990,8 @@ static struct isl_basic_map *isl_basic_map_sort_constraints( return NULL; if (bmap->n_ineq == 0) return bmap; + if (ISL_F_ISSET(bmap, ISL_BASIC_MAP_NORMALIZED)) + return bmap; total = isl_basic_map_total_dim(bmap); c = isl_alloc_array(bmap->ctx, struct constraint, bmap->n_ineq); if (!c) -- 2.11.4.GIT