ctx->lp_solver = ISL_LP_TAB;
ctx->ilp_solver = ISL_ILP_GBR;
ctx->pip = ISL_PIP_TAB;
+ ctx->context = ISL_CONTEXT_GBR;
ctx->gbr = ISL_GBR_ONCE;
ctx->gbr_only_first = 0;
return NULL;
}
+static struct isl_context *isl_context_alloc(struct isl_basic_set *dom)
+{
+ if (!dom)
+ return NULL;
+
+ if (dom->ctx->context == ISL_CONTEXT_LEXMIN)
+ return isl_context_lex_alloc(dom);
+ else
+ return isl_context_gbr_alloc(dom);
+}
+
/* Construct an isl_sol_map structure for accumulating the solution.
* If track_empty is set, then we also keep track of the parts
* of the context where there is no solution.
if (!sol_map->map)
goto error;
- sol_map->sol.context = isl_context_lex_alloc(dom);
+ sol_map->sol.context = isl_context_alloc(dom);
if (!sol_map->sol.context)
goto error;
sol_for->sol.add = &sol_for_add_wrap;
sol_for->sol.free = &sol_for_free_wrap;
- sol_for->sol.context = isl_context_lex_alloc(dom);
+ sol_for->sol.context = isl_context_alloc(dom);
if (!sol_for->sol.context)
goto error;