isl_union_map.c: gen_bin_op: unify callbacks
Aside from the actual isl_map function that gets applied
to combine the maps from the two inputs, the callers of gen_bin_op
only differ in how they determine which map in the second input
corresponds to a given map in the first input and in how they
react when this second map is missing. In particular, in case
of "subtract" operations, the map from the first input is copied
to the output, while in the other operations, the map is ignored.
Replace these callbacks by a single callback that performs
these operations based on input set by the caller of gen_bin_op,
in particular, whether the operation is a "subtract" operation,
a function to derive the space of the matching map in the second union map
and the function that should be applied to the matching maps
to produce a map in the output.
This removes some code duplication and makes it easier
to add additional binary operations on union maps.
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>