isl_ast_build_node_from_schedule: improve component detection
commitc58f2033806e232244d9616de5c1693204513eae
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Sun, 11 Feb 2018 20:53:05 +0000 (11 21:53 +0100)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 5 Apr 2018 07:11:06 +0000 (5 09:11 +0200)
treef6c9e9743f0f4f457b62669067b88081e4667798
parentbd000b32bfbfd780228bd906c16028d4cbb649e7
isl_ast_build_node_from_schedule: improve component detection

In particular, when checking whether instances of a statement
may be executed after instances of another statement, check
for values of the loop iterator that actually correspond
to statement instances.
The original test would solve an LP problem and could
therefore pick up a solution that does not correspond
to integer values.
Consider an ILP problem instead to avoid these spurious solutions.
In fact, perform (at most) two ILP feasibility tests
instead of one LP optimization, the assumption being that
in most cases the second ILP problem is trivially empty
or has a solution that was already found when solving
the first ILP problem.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_map.c
test_inputs/codegen/component7.c [new file with mode: 0644]
test_inputs/codegen/component7.st [new file with mode: 0644]
test_inputs/codegen/shift2.c
test_inputs/codegen/stride7.c