isl_ast_codegen.c: generate_domain: avoid infinite recursion
commit076a978c4331b27eee3260851b3aaa27ea4e469a
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 19 Feb 2013 15:46:33 +0000 (19 16:46 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 19 Feb 2013 15:46:33 +0000 (19 16:46 +0100)
treeebba0f33afb7edf8f12d30c2fbc5bb92e5d3228e
parent2dfc0ea07f3c979fd7bcd0459f8d0927afe73665
isl_ast_codegen.c: generate_domain: avoid infinite recursion

generate_domain checks if the inverse schedule is single-valued
so that the inverse schedule can be extended if needed.
Since this check is performed on the gisted inverse schedule,
it may fail even in a recursive call on an inverse schedule
that has been extended to ensure that it is single valued.
We may then end up in an infinite recursion.

To avoid this problem, we keep track of the fact that we have
already extended the inverse schedule to not be single-valued.
In such cases, we revert to the ungisted inverse schedule
if the gisted inverse schedule turns out not to be single-valued.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_build.c
isl_ast_build_private.h
isl_ast_codegen.c
test_inputs/codegen/single_valued.c [new file with mode: 0644]
test_inputs/codegen/single_valued.in [new file with mode: 0644]