From: Sven Verdoolaege Date: Wed, 1 Feb 2012 17:01:31 +0000 (+0100) Subject: isl_basic_set_full_compression: detect equalities in input first X-Git-Tag: isl-0.10~8^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88afaf1679d903ab9c5133264001937f3c5d6a20;p=platform%2Fupstream%2Fisl.git isl_basic_set_full_compression: detect equalities in input first Without this explicit detection of equalities, some equalities may be discovered in the middle of the computation, possibly leading to the introduction of existentially quantified variables, while callers of isl_basic_set_full_compression typically do not want such variables. Since the detection of equalities can in some cases be fairly expensive, we may have to find a better way of dealing with this problem at some point. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_morph.c b/isl_morph.c index a888f4c..b4f984a 100644 --- a/isl_morph.c +++ b/isl_morph.c @@ -784,12 +784,20 @@ __isl_give isl_morph *isl_morph_inverse(__isl_take isl_morph *morph) return morph; } +/* We detect all the equalities first to avoid implicit equalties + * being discovered during the computations. In particular, + * the compression on the variables could expose additional stride + * constraints on the parameters. This would result in existentially + * quantified variables after applying the resulting morph, which + * in turn could break invariants of the calling functions. + */ __isl_give isl_morph *isl_basic_set_full_compression( __isl_keep isl_basic_set *bset) { isl_morph *morph, *morph2; bset = isl_basic_set_copy(bset); + bset = isl_basic_set_detect_equalities(bset); morph = isl_basic_set_variable_compression(bset, isl_dim_param); bset = isl_morph_basic_set(isl_morph_copy(morph), bset);