isl_tab_pip.c: sol_add: skip empty contexts
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 31 Jan 2012 14:09:12 +0000 (15:09 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 1 Feb 2012 21:34:49 +0000 (22:34 +0100)
If the context becomes non-empty inside find_solutions, we stop
looking for solutions since a89841a (isl_tab_pip.c: find_solutions: break
when context becomes empty, Sun Jan 31 18:29:12 2010 +0100), but
we still call sol_add.  We need to return from sol_add early in
such cases because there is nothing to do and, more importantly,
when a basic set is marked empty, its existentials are removed,
resulting in a mismatch in the number of dimensions.  In particular,
the basic set returned by sol_domain may not satisfy all assumptions
made by the remainder of sol_add.

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

index d94e51f..1a9f003 100644 (file)
@@ -431,6 +431,8 @@ static void sol_add(struct isl_sol *sol, struct isl_tab *tab)
 
        if (tab->empty && !sol->add_empty)
                return;
+       if (sol->context->op->is_empty(sol->context))
+               return;
 
        bset = sol_domain(sol);