summaryrefslogtreecommitdiff
path: root/isl_tab_pip.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2009-09-18 09:02:40 +0200
committerSven Verdoolaege <skimo@kotnet.org>2009-10-10 13:16:33 +0200
commit18933fc04fa4fb91a2aac1875c040c9bb14049fd (patch)
tree8e5cbabf07124910dff58ceddfc794a75361166e /isl_tab_pip.c
parentcfb1ea42e2574be5c6e66847bd3656dda990b0da (diff)
downloadisl-18933fc04fa4fb91a2aac1875c040c9bb14049fd.tar.gz
isl-18933fc04fa4fb91a2aac1875c040c9bb14049fd.tar.bz2
isl-18933fc04fa4fb91a2aac1875c040c9bb14049fd.zip
isl_tab_pip: use generalized basis reduction based context by default
Diffstat (limited to 'isl_tab_pip.c')
-rw-r--r--isl_tab_pip.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/isl_tab_pip.c b/isl_tab_pip.c
index 8595ebae..003197e5 100644
--- a/isl_tab_pip.c
+++ b/isl_tab_pip.c
@@ -2563,6 +2563,17 @@ error:
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.
@@ -2587,7 +2598,7 @@ static struct isl_sol_map *sol_map_init(struct isl_basic_map *bmap,
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;
@@ -3405,7 +3416,7 @@ static struct isl_sol_for *sol_for_init(struct isl_basic_map *bmap, int max,
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;