remove WARN_UNUSED from public header

WARN_UNUSED is only meant to be used internally (it does not even
start with ISL_) and should therefore not appear in a public header.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Merge branch 'maint'
drop isl_tab_extend in favor of isl_tab_extend_cons

Since an isl_tab is not reference counted, there may be no way for
callers of isl_tab_extend their callers that the isl_tab has already
been freed, possible resulting in double frees on errors.
isl_tab_extend is just a wrapper around isl_tab_extend_cons turning
the appropriate interface of returning -1 on error into a bad interface
of freeing the isl_tab and returning NULL.
Move the single remaining call to isl_tab_extend to a call
to isl_tab_extend_cons.  This does not solve any problems in itself
but should avoid future problems with isl_tab_extend.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Avoid uninitialized memory warning in valgrind when compiled with gcc-4.7

We initialize a variable with zero to avoid valgrind warnings about
uninitialized memory when isl is compiled with gcc-4.7. The memory is
never used uninitialized and neither clang nor gcc-4.6 compiled code
shows these warnings. We initialize it anyway to reduce the valgrind
noise.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_flow.c: all_sources: fix memory management annotation

The wrong annotation has been used since this function was introduced
in 0eacaaa (isl_access_info_compute_flow: handle may accesses,
Wed May 26 20:51:25 2010 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Merge branch 'maint'
isl_map_union_disjoint: check spaces before handling special cases

isl_map_union_disjoint checks for special cases such as inputs
that are empty before verifying that the two inputs live in the same space.
A result could therefore be produced even in some cases where the inputs
are invalid.
Check for equal spaces first and refuse to give a result if the input
spaces do not match.

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

Recent versions of automake complain about the use of a variable
called INCLUDES.  Rename it to includes and add that to
extract_interface_CPPFLAGS.

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

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
remove spurious include of isl/config.h

Commit 6340a4f (remove WARN_UNUSED from public header, Thu Apr 17 12:55:06
2014 +0200) removed the generation of this file, but failed to remove
the include from the include/isl/ctx.h header file.

Reported-by: Michael Kruse <meinersbur@googlemail.com>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Merge branch 'maint'
document isl_{set,map}_set_tuple_name

Reported-by: Uday R Bondhugula <uday@csa.iisc.ernet.in>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_gmp.c: remove spurious include

The include appears to have been introduced by mistake in 0a83197
(try and avoid depending on mpz_gcdext internals,
Wed Jun 19 11:22:18 2013 +0200).

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_val_gcdext: revert to open-coded version of isl_int_gcdext

In 10a7f8a (isl_ast_build.c: use isl_int_gcdext instead of open-coded version,
Wed Apr 17 17:51:55 2013 +0200), the open-coded version was replaced
by a call to the isl_int_gcdext macro introduced in e191579
(add isl_int_gcdext, Wed Apr 17 17:51:28 2013 +0200).
In 0a83197 (try and avoid depending on mpz_gcdext internals,
Wed Jun 19 11:22:18 2013 +0200), we introduced a isl_gmp_gcdext
to try and mask differences in the outcomes of the underlying
mpz_gcdext over different versions of GMP.

However, there is no guarantee that we caught all the differences.
Furthermore, we will be introducing an alternative to GMP soon and
the differences across libraries are likely to be even greater than
those between different versions of the same library.

We therefore revert back to our (slightly modified) original implementation.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
configure.ac: move gmp detection to a separate file

Move the code to detect the GMP lib to a separate file to simplify
the next commit.

Signed-off-by: Sebastian Pop <spop@codeaurora.org>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
optionally use imath for arbitrary precision integers

Some projects such as LLVM and Polly prefer not to use any
LGPL licensed libraries such as GMP.  The optional use of
the MIT licensed IMath library allows them to avoid this.

IMath is included as a submodule to ensure that a single
version of IMath is used for any given version of isl.
The public symbols are prefixed with isl_ to avoid conflicts
with other copies of IMath that may independently be used by
the users of isl.

The deprecated isl_int functions are not supported when IMath is used
since they depend on GMP.  We rename them when IMath is used to ensure
that any attempt to use them in an IMath enabled isl results in
a linker error.

The subdir-objects automake option is turned on since this is the
first time we use source files in subdirectories and since this
option will become the default in future versions of automake.

Signed-off-by: David Peixotto <dpeixott@codeaurora.org>
Signed-off-by: Sebastian Pop <spop@codeaurora.org>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Merge branch 'maint'
README: urge bug reporters to always mention the isl version

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_map.c: fix whitespace

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_schedule.c: fix whitespace

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