isl_basic_map_lexmin: turn off equality detection on non-parametric problems
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 20 Mar 2011 15:40:41 +0000 (16:40 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 11 Apr 2011 19:31:41 +0000 (21:31 +0200)
Detecting equalities can be quite expensive and has mostly been shown
effective on parametric problems.  For non-parametric problems, we
are effectively computing several solutions as a preprocessing step
to computing a single solution, albeit a special one.
Until we obtain more evidence that this is useful,
it seems prudent to turn off this equality detection on non-parametric
problems.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_tab_pip.c

index b63d3b7..22ab3dd 100644 (file)
@@ -4432,6 +4432,9 @@ struct isl_map *isl_tab_basic_map_partial_lexopt(
        isl_assert(bmap->ctx,
            isl_basic_map_compatible_domain(bmap, dom), goto error);
 
+       if (isl_basic_set_dim(dom, isl_dim_all) == 0)
+               return basic_map_partial_lexopt(bmap, dom, empty, max);
+
        bmap = isl_basic_map_intersect_domain(bmap, isl_basic_set_copy(dom));
        bmap = isl_basic_map_detect_equalities(bmap);
        bmap = isl_basic_map_remove_redundancies(bmap);