bound.c: remove unused variable
[platform/upstream/isl.git] / isl_map_subtract.c
index bde4c44..1cdd68e 100644 (file)
@@ -7,10 +7,10 @@
  * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
  */
 
+#include <isl_map_private.h>
 #include <isl/seq.h>
 #include <isl/set.h>
 #include <isl/map.h>
-#include "isl_map_private.h"
 #include "isl_tab.h"
 #include <isl_point_private.h>
 
@@ -249,7 +249,7 @@ struct isl_diff_collector {
  * a negative value is treated as an error, but the calling
  * function can interpret the results based on the state of dc.
  *
- * Assumes that both bmap and map have known divs.
+ * Assumes that map has known divs.
  *
  * The difference is computed by a backtracking algorithm.
  * Each level corresponds to a basic map in "map".
@@ -560,7 +560,7 @@ static int basic_map_diff_is_empty(__isl_keep isl_basic_map *bmap,
        int r;
        struct isl_is_empty_diff_collector edc;
 
-       r = isl_basic_map_fast_is_empty(bmap);
+       r = isl_basic_map_plain_is_empty(bmap);
        if (r)
                return r;
 
@@ -596,7 +596,7 @@ static int map_diff_is_empty(__isl_keep isl_map *map1, __isl_keep isl_map *map2)
 
 /* Return 1 if "bmap" contains a single element.
  */
-int isl_basic_map_is_singleton(__isl_keep isl_basic_map *bmap)
+int isl_basic_map_plain_is_singleton(__isl_keep isl_basic_map *bmap)
 {
        if (!bmap)
                return -1;
@@ -609,14 +609,14 @@ int isl_basic_map_is_singleton(__isl_keep isl_basic_map *bmap)
 
 /* Return 1 if "map" contains a single element.
  */
-int isl_map_is_singleton(__isl_keep isl_map *map)
+int isl_map_plain_is_singleton(__isl_keep isl_map *map)
 {
        if (!map)
                return -1;
        if (map->n != 1)
                return 0;
 
-       return isl_basic_map_is_singleton(map->p[0]);
+       return isl_basic_map_plain_is_singleton(map->p[0]);
 }
 
 /* Given a singleton basic map, extract the single element
@@ -675,6 +675,7 @@ error:
 
 /* Return 1 is the singleton map "map1" is a subset of "map2",
  * i.e., if the single element of "map1" is also an element of "map2".
+ * Assumes "map2" has known divs.
  */
 static int map_is_singleton_subset(__isl_keep isl_map *map1,
        __isl_keep isl_map *map2)
@@ -716,19 +717,16 @@ int isl_map_is_subset(struct isl_map *map1, struct isl_map *map2)
        if (isl_map_is_empty(map2))
                return 0;
 
-       if (isl_map_fast_is_universe(map2))
+       if (isl_map_plain_is_universe(map2))
                return 1;
 
-       map1 = isl_map_compute_divs(isl_map_copy(map1));
        map2 = isl_map_compute_divs(isl_map_copy(map2));
-       if (isl_map_is_singleton(map1)) {
+       if (isl_map_plain_is_singleton(map1)) {
                is_subset = map_is_singleton_subset(map1, map2);
-               isl_map_free(map1);
                isl_map_free(map2);
                return is_subset;
        }
        is_subset = map_diff_is_empty(map1, map2);
-       isl_map_free(map1);
        isl_map_free(map2);
 
        return is_subset;