isl_ast_build_ast_from_schedule: improve handling of overlapping options
commit3ed65234b1f4cffc3a0801e98dc815b5b2908298
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 20 Jul 2013 10:44:27 +0000 (20 12:44 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 21 Jul 2013 07:14:48 +0000 (21 09:14 +0200)
tree61d3bd7d1415345e75055f63a6226dc249e3e3d7
parent148bd2eeccb79b4d19da17a74111ff7049fbced4
isl_ast_build_ast_from_schedule: improve handling of overlapping options

The core algorithm assumes that the result of compute_domains consists
of disjoint domains and may end up in an infinite recursion if they
overlap.  If the atomic domain conflicts and/or overlaps with other
option domains, then this invariant could be violated.
In particular, the atomic domain is typically overapproximated
because we want to represent it using a single basic set.
The result could then overlap with the option domains handled before
or with other separation classes.

We therefore now compute the atomic domain first and we intersect
it with the class domain again to ensure that the result does not
overlap with other classes.  This intersection may result in the
single basic set being broken up into several basic sets.

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