clear ISL_BASIC_MAP_REDUCED_COEFFICIENTS when needed
commite2f596c4d38074b5461205f0f3c93627f182fccc
authorSven Verdoolaege <sven@cerebras.net>
Mon, 22 Jun 2020 12:55:39 +0000 (22 14:55 +0200)
committerSven Verdoolaege <sven@cerebras.net>
Sat, 3 Feb 2024 10:05:39 +0000 (3 11:05 +0100)
treeee13a4ff3bc9edd7e77e383682c8f337539f994f
parent0ca71420c1d59653962b38acf888327935077169
clear ISL_BASIC_MAP_REDUCED_COEFFICIENTS when needed

That is, clear the flag when the coefficients (other than
the constant term) of an inequality constraint may get modified or
when a new inequality constraint is added.
Do so instead of clearing the flag every time the basic map
is changed in any way or when some progress is made during simplification.

This should more accurately reflect when the coefficients
may no longer be reduced and is more in line with how
the other flags are handled.

One case that was missed before in particular was the call
to isl_basic_map_gauss from within isl_basic_map_reduce_coefficients
itself.  It this call takes place, then the coefficients
may very well no longer be reduced, as evidenced by an upcoming commit.

Note that accurately keeping track of this flag is not all that important.
Since isl_basic_map_reduce_coefficients may leave the output
in an inconsistent state, it always needs to be followed
by a call to isl_basic_map_gauss, which would typically remove the flag.
The chance that the flag is still set on the next call
to isl_basic_map_reduce_coefficients is therefore very small.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
isl_map.c
isl_map_simplify.c
isl_mat.c