isl_ast_build_expr_from_pw_aff: combine pieces with equal affine functions
In particular, combine two pieces if their affine functions are equal
to each other on either of the two domains. This can happen if one
of the affine functions is a special case of the other. For example,
in { [0] -> [0]; [x] -> [x] : x >= 1 }, 0 is equal to x on the domain
of 0, i.e., { [0] }. Ideally, such cases should already be discovered
at the level of isl_pw_aff_coalesce, but that currently only combines
pieces with identical expressions.
The mechanism implemented by this commit does not catch all cases.
In particular, it only considers pairs of adjacent pieces.
Requested-by: Tobias Grosser <tobias.grosser@inf.ethz.ch>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>