isl_ast_build_ast_from_schedule: improve handling of unroll options
commite09f2759b93625fd5cdd21816996adff73785edf
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 20 Jul 2013 10:44:27 +0000 (20 12:44 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 6 Aug 2013 12:34:11 +0000 (6 14:34 +0200)
treeec5b378368c4fcee1ee01505b5b27190d0f469ac
parente57d7e7572823ac022c0409064839014d0c026f8
isl_ast_build_ast_from_schedule: improve handling of unroll 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.  As in the case of atomic domains, the unroll domais may
actually be larger than those specified by the user because some
constraints may be simplified away.  In combination with separation
classes, this may result in the unroll domains in one class overlapping
with the unroll domains in another class.

We therefore now compute the unroll domains earlier and we intersect
them with the class domain again to ensure that the result does not
overlap with other classes.  We also update the class domain to
reflect the atomic and unroll domains so that these would not overlap
with other domains within the same class domain.

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