isl_tab_basic_map_partial_lexopt: improve detection of equal partial solutions
commit808cbfc9ac33d6d37d614c89fbdfe05ce1cc110b
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 4 Jul 2016 13:54:44 +0000 (4 15:54 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 6 Jan 2017 14:09:14 +0000 (6 15:09 +0100)
tree6dd239adb01dfa41d7409a25cfd20cc75740a7ab
parent0502d5c0c02c8ffa95e46ee4fa2d11582aaf273e
isl_tab_basic_map_partial_lexopt: improve detection of equal partial solutions

The partial solution stack introduced in 4fff507 (isl_tab_pip: keep cache of
partial solutions, Fri Oct 16 14:46:28 2009 +0200) allows identical
partial solutions to be combined on their parent domain.
There are however cases where the partial solutions are not identical
but still equal to each other on one of the partial domains.
In this case the solution on the other partial domain is valid for both
partial domains and can also be used on the parent domain.

The test for such equal solutions is a bit more expensive than
the one that checks for identical solutions, but it should be
easier to detect opportunities for combining partial solutions
at this stage than it would be to detect them afterwards.

By combining partial solutions in this way, the result of
isl_pw_multi_aff_from_map can be improved in some cases,
as, e.g., in the new AST generation test case, derived from
a feature request by Tobias Grosser.

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