* "M" describes the solution in terms of the dimensions of "dom".
* The number of columns of "M" is one more than the total number
* of dimensions of "dom".
+ *
+ * If "M" is NULL, then there is no solution on "dom".
*/
struct isl_partial_sol {
int level;
isl_basic_set_free(partial->next->dom);
partial->next->dom = bset;
M = partial->next->M;
- M = isl_mat_drop_cols(M, M->n_col - n, n);
- partial->next->M = M;
+ if (M) {
+ M = isl_mat_drop_cols(M, M->n_col - n, n);
+ partial->next->M = M;
+ if (!M)
+ goto error;
+ }
partial->next->level = sol->level;
- if (!bset || !M)
+ if (!bset)
goto error;
sol->partial = partial->next;
static int use_shifted(struct isl_context_gbr *cgbr)
{
+ if (!cgbr->tab)
+ return 0;
return cgbr->tab->bmap->n_eq == 0 && cgbr->tab->bmap->n_div == 0;
}
struct isl_context_gbr *cgbr = (struct isl_context_gbr *)context;
struct isl_gbr_tab_undo *snap;
+ if (!cgbr->tab)
+ return NULL;
+
snap = isl_alloc_type(cgbr->tab->mat->ctx, struct isl_gbr_tab_undo);
if (!snap)
return NULL;