isl_basic_map_drop_constraints_not_involving_dims: fix result of special case

In particular, if we are removing the constraints that do not involve
an empty sequence of dimensions, then we are removing all constraints
and the result should be the universe set rather than the empty set.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_build_detect_strides: store result of isl_val_gcd in correct variable

Since isl_val_gcd tends to update the first argument in-place if possible,
the result would typically (or even always) happen to be correct.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_convex_hull.c: add_bound: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
privately export isl_basic_map_remove_duplicate_constraints

This will be useful for isl_basic_map_add_known_div_constraints,
introduced in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_basic_map_overlying_set: extract out isl_basic_map_add_known_div_constraints

We will be able to reuse this function in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_basic_map_drop_constraints{_not,}_involving: add back div constraints

The div constraints are assumed to always be expressed by the constraints
of a basic map.  They may however get removed if they turn out to be
redundant with respect to some other constraints.  When we are removing
constraints in these two functions, we may be removing constraints
that helped to make the div constraints redundant, leaving the
div constraints unexpressed.  Add back all div constraints to make
sure that they are all expressed by the basic map.

Reported-by: Roman Gareev <gareevroman@gmail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_codegen.c: generate_components: fix error handling

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>