isl_ilp.c: set_opt: perform intersection up front
commit554066dafe13a8145963a52f24eeadf4edf32ec8
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 28 Jun 2018 09:56:57 +0000 (28 11:56 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Thu, 28 Jun 2018 12:13:55 +0000 (28 14:13 +0200)
treedcd6e8570edc9671e427ff4cba4b4de8ee05a9c7
parentf9edf7f1ff9b291405debe27ede7b2d91d3fb488
isl_ilp.c: set_opt: perform intersection up front

The original implementation postpones the intersection until
each piece in the piecewise affine expression is examined,
while the new implementation does it up front, avoiding
the need to carry around the extra domain.
The actual intersections performed in both cases are the same.
The only difference is that the results of the intersections need
to be stored throughout the isl_pw_aff_opt_val call
in the new implementation.
However, it is not clear if this would ever be an issue in practice,
especially since there do not appear to be any calls
to isl_union_set_min_multi_union_pw_aff (the only publicly
exported caller of set_opt) in the wild.

The upside is that isl_pw_aff_opt_val can be reused in the next
commit to extract out an isl_union_pw_aff_opt_val, which in turn
will be used to implement isl_union_pw_aff_{min,max}_val, which
don't need the internal intersection.

Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_ilp.c