isl_map_is_disjoint: maps with non-matching tuples may still intersect

isl_map_is_disjoint first calls isl_map_plain_is_disjoint to handle
some obvious cases, but if the parameters of the input maps have
not been aligned, then isl_map_plain_is_disjoint may come to the wrong
conclusion.  In particular, if the maps involve nested spaces, then
isl_space_match will return false, whereas isl_map_plain_is_disjoint
expects the function to return true.

We may have to reconsider isl_space_match at some point, but for now
we simply make sure that the parameters are the same before calling
isl_space_match on the input and output tuples.

Reported-by: Michael Kruse <meinersbur@googlemail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_set_min_val: compute minimum of minima

If the input consists of multiple basic sets, then the original
implementation would mistakenly compute the maximum of the minima.

Reported-by: Sven Wuytack <sven.wuytack@retarget.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_hash_table_find: don't use user specified comparison function to grow table

When isl_hash_table_find needs to grow the hash table, it would
reuse the user specified comparison function to compare entries
against each other.  However, this may lead to undefined behavior
as the comparison function is only meant to be used to compare
entries to the "val" argument.  Moreover, there is no need to
use any comparison function while growing the table since all
entries in the original table are supposed to be distinct already.

Reported-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_union_*_mul_isl_int: pass address of isl_int to callback

isl_hash_table_foreach expects a user pointer and our callback function
also dereferences the user pointer. Consequently, we pass in a pointer
to the integer value, not its value.

Note that this commit does not have any effect in practice
because of the way isl_int (i.e., mpz_t) is defined.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_basic_set_from_point: handle NULL input

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_union_*_align_params: handle inputs that are not parameter spaces

isl_parameter_alignment_reordering expects its input to be a parameter
space, but no such requirement is specified for the *_align_params functions.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_pw_*_pullback_pw_multi_aff: properly handle empty input

In particular, make sure the result lives in the correct space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Makefile.am: avoid use of INCLUDES variable

Recent versions of automake complain about the use of a variable
called INCLUDES.  In particular, replace the tool specific
*_CPPFLAGS variables by a generic AM_CPPFLAGS.
Originally, some of these variables were different because
only some tools depended on piplib.  Since support for piplib
was removed, all these variables have the same value.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_space_drop_dims: take into account overflow when checking indices

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
allow the user to impose a bound on the number of low-level operations

This should allow the user to deterministically limit the effort
spent on a computation.

Requested-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Merge branch 'maint'