isl_schedule_get_map: handle trees with divergent filter node parameters
Most operations on schedule trees result in equal parameters
for the filter children of a set or sequence node.
However, the isl_schedule_node_gist performed by
isl_schedule_intersect_domain refrains from modifying
subtrees with a domain that is a subset of the context.
This may result in different parameters if some children
of a set/sequence node are modified and some are not.
isl_schedule_get_map picks the space of a single filter child node and
assumes it is valid for all children.
In particular, it calls isl_union_pw_multi_aff_multi_val_on_domain
on different children with the same second argument, while
this function assumes its arguments to have the same parameters.
Arguably, isl_union_pw_multi_aff_multi_val_on_domain should be changed
to align the parameters, but as a minimal fix, make sure it gets
called on arguments with the same parameters from isl_schedule_get_map.
An alternative would be to make sure that isl_schedule_intersect_domain
changes the filters in a uniform way, but it is not clear if this
is the only way divergence is introduced.
Of course, there is also no guarantee that there are no other places
that assume the parameters are the same.
Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>