isl_basic_map_simplify: avoid infinite loop on empty input
[platform/upstream/isl.git] / isl_fold.c
index 8d01054..ba93a69 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2010      INRIA Saclay
  *
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
  *
  * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
  * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
@@ -611,6 +611,15 @@ error:
        return NULL;
 }
 
+__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params(
+       __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context)
+{
+       isl_space *space = isl_qpolynomial_fold_get_domain_space(fold);
+       isl_set *dom_context = isl_set_universe(space);
+       dom_context = isl_set_intersect_params(dom_context, context);
+       return isl_qpolynomial_fold_gist(fold, dom_context);
+}
+
 #define HAS_TYPE
 
 #undef PW
@@ -629,6 +638,7 @@ error:
 #define DEFAULT_IS_ZERO 1
 
 #define NO_NEG
+#define NO_PULLBACK
 
 #include <isl_pw_templ.c>