isl_map_from_pw_multi_aff: preserve rational flag
commit6c45aad8e9bbbfd3aeabd00d30570edd931dee82
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 7 Jul 2016 09:34:14 +0000 (7 11:34 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 4 Sep 2016 20:05:46 +0000 (4 22:05 +0200)
tree7003b4578e131d9009565ad0d87f387f25cfab20
parenta4fc179a566f08c0bd2a1540af2c5b0763631df0
isl_map_from_pw_multi_aff: preserve rational flag

In particular, if the domain of the input is rational, then the result
should be rational as well.

This fixes the computation of rational lexicographic optima,
which was (sort of) broken by 4757a6d (isl_map_partial_lexopt_aligned:
compute result as isl_pw_multi_aff first, Tue Mar 15 16:16:49 2016 +0100).
In particular, for the input

{ rat: [i] : 1 <= 2i <= 9 or i >= 10 }

the partial results would get converted to integer maps,
but since the minimum is a rational value (1/2), the result
would be considered to be empty.  By preserving the rational
flag in isl_map_from_pw_multi_aff, the rational solution is preserved.

Note that the result was not exactly correct before the above-mentioned
commit either.  In particular, before that commit, the result produced
was

{ rat: [i] : 2i = 1; rat: [10] }

rather than the correct

{ rat: [i] : 2i = 1 }.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_aff.c
isl_test.c