From 209b9bd6006ad285b11b81f096ea6384723ca227 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 3 Feb 2013 16:13:19 +0100 Subject: [PATCH] iscc.c: print_code: do not assume isl_union_map_get_space returns params space Although the space of an isl_union_map is only used to keep track of the parameters, we do not enforce that this space is a pure parameter space. We therefore should not assume that it is. Signed-off-by: Sven Verdoolaege --- iscc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iscc.c b/iscc.c index 825cbf1..a0d4f90 100644 --- a/iscc.c +++ b/iscc.c @@ -1819,12 +1819,14 @@ static __isl_give isl_printer *print_code(__isl_take isl_printer *p, __isl_take isl_union_map *schedule, __isl_take isl_union_map *options) { + isl_space *space; isl_set *context; isl_ast_build *build; isl_ast_node *tree; int format; - context = isl_set_universe(isl_union_map_get_space(schedule)); + space = isl_union_map_get_space(schedule); + context = isl_set_universe(isl_space_params(space)); build = isl_ast_build_from_context(context); build = isl_ast_build_set_options(build, options); -- 2.11.4.GIT