gpu.c: add_bounded_parameters_dynamic: compute simple hull of bounds
The function add_bounded_parameters_dynamic is used to compute
bounds on the block identifiers that can be used to simplify
the AST generated by the AST generator.
The set of possible values (or an overapproximation thereof)
is derived from block size. The block size is typically
an (implicit) max expression. Since isl may not realize
that the size is in fact a max expression, the set of possible
values may end up being described by more than one disjunct.
This in turn may confuse the AST generator, resulting in redundant
conditions in the generated AST. We may be able to improve
the AST generator to not get confused by these disjuncts,
but we might as well replace the set of possible values
by its simple hull. When the size is indeed a max expression,
this simple hull is equal to the original set, but described
using a single disjunct. Otherwise, the result may be
an overapproximation but since the set is only used to simplify
expressions, this overapproximation should not have any adverse effects.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>