Update to isl-0.17.1-314-g3106e8d
authorMichael Kruse <llvm@meinersbur.de>
Tue, 6 Dec 2016 14:37:39 +0000 (14:37 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 6 Dec 2016 14:37:39 +0000 (14:37 +0000)
This version includes an update for imath (isl-0.17.1-49-g2f1c129). It fixes
the compilation under windows, which does not know ssize_t.

In addition, isl-0.17.1-288-g0500299 changed the way isl_test finds the source
directory. It now generates a file isl_srcdir.c at configure-time, containing
the source path, to not require setting the environment variable "srcdir" at
test-time. The cmake build system had to be modified to also generate that file.

llvm-svn: 288811

25 files changed:
polly/lib/External/CMakeLists.txt
polly/lib/External/isl/GIT_HEAD_ID
polly/lib/External/isl/Makefile.in
polly/lib/External/isl/bound_test.sh.in
polly/lib/External/isl/config.guess
polly/lib/External/isl/config.sub
polly/lib/External/isl/configure
polly/lib/External/isl/configure.ac
polly/lib/External/isl/doc/manual.pdf
polly/lib/External/isl/imath/gmp_compat.c
polly/lib/External/isl/include/isl/aff_type.h
polly/lib/External/isl/include/isl/map.h
polly/lib/External/isl/isl_map.c
polly/lib/External/isl/isl_map_private.h
polly/lib/External/isl/isl_mat.c
polly/lib/External/isl/isl_mat_private.h
polly/lib/External/isl/isl_polynomial.c
polly/lib/External/isl/isl_polynomial_private.h
polly/lib/External/isl/isl_srcdir.c.in [new file with mode: 0644]
polly/lib/External/isl/isl_test.c
polly/lib/External/isl/isl_vertices.c
polly/lib/External/isl/ltmain.sh
polly/lib/External/isl/m4/libtool.m4
polly/lib/External/isl/pip_test.sh.in
polly/lib/External/isl_srcdir.c.cmake [new file with mode: 0644]

index 4309929..a89c7ad 100644 (file)
@@ -165,6 +165,7 @@ configure_file("${ISL_BINARY_DIR}/include/isl/stdint.h.tmp"
                "${ISL_BINARY_DIR}/include/isl/stdint.h" COPYONLY)
 
 configure_file("isl_config.h.cmake" "${ISL_BINARY_DIR}/isl_config.h")
+configure_file("isl_srcdir.c.cmake" "${ISL_BINARY_DIR}/isl_srcdir.c")
 
 include_directories(BEFORE
   ${ISL_BINARY_DIR}
index bfe2020..7ec4914 100644 (file)
@@ -1 +1 @@
-isl-0.17.1-284-gbb38638
+isl-0.17.1-314-g3106e8d
index 7172201..342203d 100644 (file)
@@ -134,7 +134,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = isl_config.h
-CONFIG_CLEAN_FILES = bound_test.sh codegen_test.sh pip_test.sh
+CONFIG_CLEAN_FILES = isl_srcdir.c bound_test.sh codegen_test.sh \
+       pip_test.sh
 CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -622,9 +623,9 @@ TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
        $(TEST_LOG_FLAGS)
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/bound_test.sh.in \
        $(srcdir)/codegen_test.sh.in $(srcdir)/isl_config.h.in \
-       $(srcdir)/pip_test.sh.in AUTHORS ChangeLog README compile \
-       config.guess config.sub depcomp install-sh ltmain.sh missing \
-       test-driver
+       $(srcdir)/isl_srcdir.c.in $(srcdir)/pip_test.sh.in AUTHORS \
+       ChangeLog README compile config.guess config.sub depcomp \
+       install-sh ltmain.sh missing test-driver
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -1215,6 +1216,8 @@ $(srcdir)/isl_config.h.in:  $(am__configure_deps)
 
 distclean-hdr:
        -rm -f isl_config.h stamp-h1
+isl_srcdir.c: $(top_builddir)/config.status $(srcdir)/isl_srcdir.c.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
 bound_test.sh: $(top_builddir)/config.status $(srcdir)/bound_test.sh.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 codegen_test.sh: $(top_builddir)/config.status $(srcdir)/codegen_test.sh.in
index e3fc037..8f2f1ff 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 EXEEXT=@EXEEXT@
+srcdir=@srcdir@
 
 BOUND_TESTS="\
        basicLinear2.pwqp \
index 0967f2a..1659250 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2016-04-02'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ timestamp='2016-04-02'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
 # Please send patches to <config-patches@gnu.org>.
 
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -237,10 +237,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
        exit ;;
-    *:LibertyBSD:*:*)
-       UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
-       exit ;;
     *:ekkoBSD:*:*)
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
        exit ;;
@@ -272,42 +268,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
        case "$ALPHA_CPU_TYPE" in
            "EV4 (21064)")
-               UNAME_MACHINE=alpha ;;
+               UNAME_MACHINE="alpha" ;;
            "EV4.5 (21064)")
-               UNAME_MACHINE=alpha ;;
+               UNAME_MACHINE="alpha" ;;
            "LCA4 (21066/21068)")
-               UNAME_MACHINE=alpha ;;
+               UNAME_MACHINE="alpha" ;;
            "EV5 (21164)")
-               UNAME_MACHINE=alphaev5 ;;
+               UNAME_MACHINE="alphaev5" ;;
            "EV5.6 (21164A)")
-               UNAME_MACHINE=alphaev56 ;;
+               UNAME_MACHINE="alphaev56" ;;
            "EV5.6 (21164PC)")
-               UNAME_MACHINE=alphapca56 ;;
+               UNAME_MACHINE="alphapca56" ;;
            "EV5.7 (21164PC)")
-               UNAME_MACHINE=alphapca57 ;;
+               UNAME_MACHINE="alphapca57" ;;
            "EV6 (21264)")
-               UNAME_MACHINE=alphaev6 ;;
+               UNAME_MACHINE="alphaev6" ;;
            "EV6.7 (21264A)")
-               UNAME_MACHINE=alphaev67 ;;
+               UNAME_MACHINE="alphaev67" ;;
            "EV6.8CB (21264C)")
-               UNAME_MACHINE=alphaev68 ;;
+               UNAME_MACHINE="alphaev68" ;;
            "EV6.8AL (21264B)")
-               UNAME_MACHINE=alphaev68 ;;
+               UNAME_MACHINE="alphaev68" ;;
            "EV6.8CX (21264D)")
-               UNAME_MACHINE=alphaev68 ;;
+               UNAME_MACHINE="alphaev68" ;;
            "EV6.9A (21264/EV69A)")
-               UNAME_MACHINE=alphaev69 ;;
+               UNAME_MACHINE="alphaev69" ;;
            "EV7 (21364)")
-               UNAME_MACHINE=alphaev7 ;;
+               UNAME_MACHINE="alphaev7" ;;
            "EV7.9 (21364A)")
-               UNAME_MACHINE=alphaev79 ;;
+               UNAME_MACHINE="alphaev79" ;;
        esac
        # A Pn.n version is a patched version.
        # A Vn.n version is a released version.
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
        exitcode=$?
        trap '' 0
@@ -380,16 +376,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
        eval $set_cc_for_build
-       SUN_ARCH=i386
+       SUN_ARCH="i386"
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
        # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
            then
-               SUN_ARCH=x86_64
+               SUN_ARCH="x86_64"
            fi
        fi
        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -414,7 +410,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        exit ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
        case "`/bin/arch`" in
            sun3)
                echo m68k-sun-sunos${UNAME_RELEASE}
@@ -639,13 +635,13 @@ EOF
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "${sc_cpu_version}" in
-                     523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
-                     528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+                     523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                     528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
                        case "${sc_kernel_bits}" in
-                         32) HP_ARCH=hppa2.0n ;;
-                         64) HP_ARCH=hppa2.0w ;;
-                         '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+                         32) HP_ARCH="hppa2.0n" ;;
+                         64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
                        esac ;;
                    esac
                fi
@@ -684,11 +680,11 @@ EOF
                    exit (0);
                }
 EOF
-                   (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ ${HP_ARCH} = hppa2.0w ]
+       if [ ${HP_ARCH} = "hppa2.0w" ]
        then
            eval $set_cc_for_build
 
@@ -701,12 +697,12 @@ EOF
            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
            # => hppa64-hp-hpux11.23
 
-           if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
                grep -q __LP64__
            then
-               HP_ARCH=hppa2.0w
+               HP_ARCH="hppa2.0w"
            else
-               HP_ARCH=hppa64
+               HP_ARCH="hppa64"
            fi
        fi
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -811,14 +807,14 @@ EOF
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-       FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
-       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     5000:UNIX_System_V:4.*:*)
-       FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+       FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -900,7 +896,7 @@ EOF
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
        exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
@@ -923,7 +919,7 @@ EOF
          EV68*) UNAME_MACHINE=alphaev68 ;;
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
-       if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+       if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
@@ -969,9 +965,6 @@ EOF
     ia64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
-    k1om:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-       exit ;;
     m32r*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
@@ -1127,7 +1120,7 @@ EOF
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
        # the processor, so we play safe by assuming i586.
        # Note: whatever this is, it MUST be the same as what config.sub
-       # prints for the "djgpp" host, or else GDB configure will decide that
+       # prints for the "djgpp" host, or else GDB configury will decide that
        # this is a cross-build.
        echo i586-pc-msdosdjgpp
        exit ;;
@@ -1276,9 +1269,6 @@ EOF
     SX-8R:SUPER-UX:*:*)
        echo sx8r-nec-superux${UNAME_RELEASE}
        exit ;;
-    SX-ACE:SUPER-UX:*:*)
-       echo sxace-nec-superux${UNAME_RELEASE}
-       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
        exit ;;
@@ -1292,9 +1282,9 @@ EOF
            UNAME_PROCESSOR=powerpc
        fi
        if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-           if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
                    grep IS_64BIT_ARCH >/dev/null
                then
                    case $UNAME_PROCESSOR in
@@ -1316,7 +1306,7 @@ EOF
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
-       if test "$UNAME_PROCESSOR" = x86; then
+       if test "$UNAME_PROCESSOR" = "x86"; then
                UNAME_PROCESSOR=i386
                UNAME_MACHINE=pc
        fi
@@ -1347,7 +1337,7 @@ EOF
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
        # operating systems.
-       if test "$cputype" = 386; then
+       if test "$cputype" = "386"; then
            UNAME_MACHINE=i386
        else
            UNAME_MACHINE="$cputype"
@@ -1389,7 +1379,7 @@ EOF
        echo i386-pc-xenix
        exit ;;
     i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
        exit ;;
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
@@ -1400,9 +1390,6 @@ EOF
     x86_64:VMkernel:*:*)
        echo ${UNAME_MACHINE}-unknown-esx
        exit ;;
-    amd64:Isilon\ OneFS:*:*)
-       echo x86_64-unknown-onefs
-       exit ;;
 esac
 
 cat >&2 <<EOF
@@ -1412,9 +1399,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index 8d39c4b..1acc966 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2016-03-30'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ timestamp='2016-03-30'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,7 +53,8 @@ timestamp='2016-03-30'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
 
 Canonicalize a configuration name.
 
@@ -67,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2015 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -520,7 +521,7 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-aros
                ;;
-       asmjs)
+        asmjs)
                basic_machine=asmjs-unknown
                ;;
        aux)
@@ -1382,7 +1383,7 @@ case $os in
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-             | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+             | -bitrig* | -openbsd* | -solidbsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
@@ -1398,8 +1399,7 @@ case $os in
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-             | -onefs* | -tirtos*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1531,8 +1531,6 @@ case $os in
                ;;
        -nacl*)
                ;;
-       -ios)
-               ;;
        -none)
                ;;
        *)
index e683f87..41f71de 100755 (executable)
@@ -19276,6 +19276,8 @@ ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate"
 
 ac_config_headers="$ac_config_headers isl_config.h"
 
+ac_config_files="$ac_config_files isl_srcdir.c"
+
 ac_config_files="$ac_config_files Makefile"
 
 ac_config_files="$ac_config_files doc/Makefile"
@@ -20474,6 +20476,7 @@ do
     "$ac_stdint_h") CONFIG_COMMANDS="$CONFIG_COMMANDS $ac_stdint_h" ;;
     "$ax_create_pkgconfig_generate") CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;;
     "isl_config.h") CONFIG_HEADERS="$CONFIG_HEADERS isl_config.h" ;;
+    "isl_srcdir.c") CONFIG_FILES="$CONFIG_FILES isl_srcdir.c" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
     "interface/Makefile") CONFIG_FILES="$CONFIG_FILES interface/Makefile" ;;
@@ -21183,6 +21186,7 @@ $as_echo X"$file" |
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
 # Generated automatically by $as_me ($PACKAGE) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
 # Provide generalized library-building support services.
index d948790..b6da64d 100644 (file)
@@ -274,6 +274,7 @@ AX_DETECT_GIT_HEAD
 
 AH_BOTTOM([#include <isl_config_post.h>])
 AC_CONFIG_HEADERS(isl_config.h)
+AC_CONFIG_FILES(isl_srcdir.c)
 AC_CONFIG_FILES(Makefile)
 AC_CONFIG_FILES(doc/Makefile)
 if test $with_clang = system; then
index eb6e077..fb5e043 100644 (file)
Binary files a/polly/lib/External/isl/doc/manual.pdf and b/polly/lib/External/isl/doc/manual.pdf differ
index 2c45cbc..e00ac26 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
+#if defined(_MSC_VER)
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+#endif
+
 #ifdef  NDEBUG
 #define CHECK(res) (res)
 #else
index 9a618d6..6cffa18 100644 (file)
@@ -12,7 +12,7 @@ typedef struct isl_aff isl_aff;
 
 ISL_DECLARE_LIST(aff)
 
-struct __isl_subclass(isl_pw_multi_aff) __isl_subclass(isl_multi_pw_aff)
+struct __isl_subclass(isl_multi_pw_aff) __isl_subclass(isl_pw_multi_aff)
        __isl_subclass(isl_union_pw_aff) isl_pw_aff;
 typedef struct isl_pw_aff isl_pw_aff;
 
@@ -24,11 +24,11 @@ typedef struct isl_union_pw_aff isl_union_pw_aff;
 
 ISL_DECLARE_LIST_TYPE(union_pw_aff)
 
-struct __isl_subclass(isl_pw_multi_aff) __isl_subclass(isl_multi_pw_aff)
+struct __isl_subclass(isl_multi_pw_aff) __isl_subclass(isl_pw_multi_aff)
        isl_multi_aff;
 typedef struct isl_multi_aff isl_multi_aff;
 
-struct __isl_subclass(isl_union_pw_multi_aff) __isl_subclass(isl_multi_pw_aff)
+struct __isl_subclass(isl_multi_pw_aff) __isl_subclass(isl_union_pw_multi_aff)
        isl_pw_multi_aff;
 typedef struct isl_pw_multi_aff isl_pw_multi_aff;
 
index 1598a14..9082a37 100644 (file)
@@ -629,6 +629,7 @@ __isl_export
 isl_stat isl_map_foreach_basic_map(__isl_keep isl_map *map,
        isl_stat (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user);
 
+ISL_DEPRECATED
 __isl_give isl_map *isl_set_lifting(__isl_take isl_set *set);
 
 __isl_give isl_map *isl_map_fixed_power_val(__isl_take isl_map *map,
index afc6fcd..27eff8e 100644 (file)
@@ -13174,3 +13174,69 @@ __isl_give isl_set *isl_set_preimage_multi_pw_aff(__isl_take isl_set *set,
 {
        return isl_map_preimage_multi_pw_aff(set, isl_dim_set, mpa);
 }
+
+/* Is the point "inner" internal to inequality constraint "ineq"
+ * of "bset"?
+ * The point is considered to be internal to the inequality constraint,
+ * if it strictly lies on the positive side of the inequality constraint,
+ * or if it lies on the constraint and the constraint is lexico-positive.
+ */
+static isl_bool is_internal(__isl_keep isl_vec *inner,
+       __isl_keep isl_basic_set *bset, int ineq)
+{
+       isl_ctx *ctx;
+       int pos;
+       unsigned total;
+
+       if (!inner || !bset)
+               return isl_bool_error;
+
+       ctx = isl_basic_set_get_ctx(bset);
+       isl_seq_inner_product(inner->el, bset->ineq[ineq], inner->size,
+                               &ctx->normalize_gcd);
+       if (!isl_int_is_zero(ctx->normalize_gcd))
+               return isl_int_is_nonneg(ctx->normalize_gcd);
+
+       total = isl_basic_set_dim(bset, isl_dim_all);
+       pos = isl_seq_first_non_zero(bset->ineq[ineq] + 1, total);
+       return isl_int_is_pos(bset->ineq[ineq][1 + pos]);
+}
+
+/* Tighten the inequality constraints of "bset" that are outward with respect
+ * to the point "vec".
+ * That is, tighten the constraints that are not satisfied by "vec".
+ *
+ * "vec" is a point internal to some superset S of "bset" that is used
+ * to make the subsets of S disjoint, by tightening one half of the constraints
+ * that separate two subsets.  In particular, the constraints of S
+ * are all satisfied by "vec" and should not be tightened.
+ * Of the internal constraints, those that have "vec" on the outside
+ * are tightened.  The shared facet is included in the adjacent subset
+ * with the opposite constraint.
+ * For constraints that saturate "vec", this criterion cannot be used
+ * to determine which of the two sides should be tightened.
+ * Instead, the sign of the first non-zero coefficient is used
+ * to make this choice.  Note that this second criterion is never used
+ * on the constraints of S since "vec" is interior to "S".
+ */
+__isl_give isl_basic_set *isl_basic_set_tighten_outward(
+       __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec)
+{
+       int j;
+
+       bset = isl_basic_set_cow(bset);
+       if (!bset)
+               return NULL;
+       for (j = 0; j < bset->n_ineq; ++j) {
+               isl_bool internal;
+
+               internal = is_internal(vec, bset, j);
+               if (internal < 0)
+                       return isl_basic_set_free(bset);
+               if (internal)
+                       continue;
+               isl_int_sub_ui(bset->ineq[j][0], bset->ineq[j][0], 1);
+       }
+
+       return bset;
+}
index 5b6b8d6..882faa4 100644 (file)
@@ -253,6 +253,9 @@ __isl_give isl_basic_set *isl_basic_set_add_ineq(__isl_take isl_basic_set *bset,
 __isl_give isl_basic_map *isl_basic_map_add_ineq(__isl_take isl_basic_map *bmap,
        isl_int *ineq);
 
+__isl_give isl_basic_set *isl_basic_set_tighten_outward(
+       __isl_take isl_basic_set *bset, __isl_keep isl_vec *vec);
+
 int isl_inequality_negate(struct isl_basic_map *bmap, unsigned pos);
 
 struct isl_basic_set *isl_basic_set_cow(struct isl_basic_set *bset);
index 1182ab0..f8bbe17 100644 (file)
@@ -259,6 +259,18 @@ int isl_mat_cols(__isl_keep isl_mat *mat)
        return mat ? mat->n_col : -1;
 }
 
+/* Check that "col" is a valid column position for "mat".
+ */
+static isl_stat check_col(__isl_keep isl_mat *mat, int col)
+{
+       if (!mat)
+               return isl_stat_error;
+       if (col < 0 || col >= mat->n_col)
+               isl_die(isl_mat_get_ctx(mat), isl_error_invalid,
+                       "column out of range", return isl_stat_error);
+       return isl_stat_ok;
+}
+
 int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v)
 {
        if (!mat)
@@ -266,9 +278,8 @@ int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v)
        if (row < 0 || row >= mat->n_row)
                isl_die(mat->ctx, isl_error_invalid, "row out of range",
                        return -1);
-       if (col < 0 || col >= mat->n_col)
-               isl_die(mat->ctx, isl_error_invalid, "column out of range",
-                       return -1);
+       if (check_col(mat, col) < 0)
+               return -1;
        isl_int_set(*v, mat->row[row][col]);
        return 0;
 }
@@ -286,9 +297,8 @@ __isl_give isl_val *isl_mat_get_element_val(__isl_keep isl_mat *mat,
        if (row < 0 || row >= mat->n_row)
                isl_die(ctx, isl_error_invalid, "row out of range",
                        return NULL);
-       if (col < 0 || col >= mat->n_col)
-               isl_die(ctx, isl_error_invalid, "column out of range",
-                       return NULL);
+       if (check_col(mat, col) < 0)
+               return NULL;
        return isl_val_int_from_isl_int(ctx, mat->row[row][col]);
 }
 
@@ -301,9 +311,8 @@ __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat,
        if (row < 0 || row >= mat->n_row)
                isl_die(mat->ctx, isl_error_invalid, "row out of range",
                        goto error);
-       if (col < 0 || col >= mat->n_col)
-               isl_die(mat->ctx, isl_error_invalid, "column out of range",
-                       goto error);
+       if (check_col(mat, col) < 0)
+               return isl_mat_free(mat);
        isl_int_set(mat->row[row][col], v);
        return mat;
 error:
@@ -320,9 +329,8 @@ __isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat,
        if (row < 0 || row >= mat->n_row)
                isl_die(mat->ctx, isl_error_invalid, "row out of range",
                        goto error);
-       if (col < 0 || col >= mat->n_col)
-               isl_die(mat->ctx, isl_error_invalid, "column out of range",
-                       goto error);
+       if (check_col(mat, col) < 0)
+               return isl_mat_free(mat);
        isl_int_set_si(mat->row[row][col], v);
        return mat;
 error:
@@ -365,6 +373,22 @@ __isl_give isl_mat *isl_mat_diag(isl_ctx *ctx, unsigned n_row, isl_int d)
        return mat;
 }
 
+/* Create an "n_row" by "n_col" matrix with zero elements.
+ */
+__isl_give isl_mat *isl_mat_zero(isl_ctx *ctx, unsigned n_row, unsigned n_col)
+{
+       int i;
+       isl_mat *mat;
+
+       mat = isl_mat_alloc(ctx, n_row, n_col);
+       if (!mat)
+               return NULL;
+       for (i = 0; i < n_row; ++i)
+               isl_seq_clr(mat->row[i], n_col);
+
+       return mat;
+}
+
 __isl_give isl_mat *isl_mat_identity(isl_ctx *ctx, unsigned n_row)
 {
        if (!ctx)
@@ -1522,6 +1546,50 @@ void isl_mat_col_mul(struct isl_mat *mat, int dst_col, isl_int f, int src_col)
                isl_int_mul(mat->row[i][dst_col], f, mat->row[i][src_col]);
 }
 
+/* Add "f" times column "src_col" to column "dst_col" of "mat" and
+ * return the result.
+ */
+__isl_give isl_mat *isl_mat_col_addmul(__isl_take isl_mat *mat, int dst_col,
+       isl_int f, int src_col)
+{
+       int i;
+
+       if (check_col(mat, dst_col) < 0 || check_col(mat, src_col) < 0)
+               return isl_mat_free(mat);
+
+       for (i = 0; i < mat->n_row; ++i) {
+               if (isl_int_is_zero(mat->row[i][src_col]))
+                       continue;
+               mat = isl_mat_cow(mat);
+               if (!mat)
+                       return NULL;
+               isl_int_addmul(mat->row[i][dst_col], f, mat->row[i][src_col]);
+       }
+
+       return mat;
+}
+
+/* Negate column "col" of "mat" and return the result.
+ */
+__isl_give isl_mat *isl_mat_col_neg(__isl_take isl_mat *mat, int col)
+{
+       int i;
+
+       if (check_col(mat, col) < 0)
+               return isl_mat_free(mat);
+
+       for (i = 0; i < mat->n_row; ++i) {
+               if (isl_int_is_zero(mat->row[i][col]))
+                       continue;
+               mat = isl_mat_cow(mat);
+               if (!mat)
+                       return NULL;
+               isl_int_neg(mat->row[i][col], mat->row[i][col]);
+       }
+
+       return mat;
+}
+
 struct isl_mat *isl_mat_unimodular_complete(struct isl_mat *M, int row)
 {
        int r;
index 197106f..d2dcc9e 100644 (file)
@@ -22,6 +22,7 @@ struct isl_mat {
 
 uint32_t isl_mat_get_hash(__isl_keep isl_mat *mat);
 
+__isl_give isl_mat *isl_mat_zero(isl_ctx *ctx, unsigned n_row, unsigned n_col);
 __isl_give isl_mat *isl_mat_sub_alloc(__isl_keep isl_mat *mat,
        unsigned first_row, unsigned n_row, unsigned first_col, unsigned n_col);
 __isl_give isl_mat *isl_mat_sub_alloc6(isl_ctx *ctx, isl_int **row,
@@ -45,6 +46,9 @@ isl_stat isl_mat_row_gcd(__isl_keep isl_mat *mat, int row, isl_int *gcd);
 void isl_mat_col_mul(struct isl_mat *mat, int dst_col, isl_int f, int src_col);
 void isl_mat_col_submul(struct isl_mat *mat,
                        int dst_col, isl_int f, int src_col);
+__isl_give isl_mat *isl_mat_col_addmul(__isl_take isl_mat *mat, int dst_col,
+       isl_int f, int src_col);
+__isl_give isl_mat *isl_mat_col_neg(__isl_take isl_mat *mat, int col);
 
 int isl_mat_get_element(__isl_keep isl_mat *mat, int row, int col, isl_int *v);
 __isl_give isl_mat *isl_mat_set_element(__isl_take isl_mat *mat,
index 3772abf..6bf19b5 100644 (file)
@@ -449,6 +449,21 @@ __isl_give isl_space *isl_qpolynomial_get_space(__isl_keep isl_qpolynomial *qp)
        return space;
 }
 
+/* Return the number of variables of the given type in the domain of "qp".
+ */
+unsigned isl_qpolynomial_domain_dim(__isl_keep isl_qpolynomial *qp,
+       enum isl_dim_type type)
+{
+       if (!qp)
+               return 0;
+       if (type == isl_dim_div)
+               return qp->div->n_row;
+       if (type == isl_dim_all)
+               return isl_space_dim(qp->dim, isl_dim_all) +
+                                   isl_qpolynomial_domain_dim(qp, isl_dim_div);
+       return isl_space_dim(qp->dim, type);
+}
+
 /* Externally, an isl_qpolynomial has a map space, but internally, the
  * ls field corresponds to the domain of that space.
  */
@@ -461,7 +476,28 @@ unsigned isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp,
                return 1;
        if (type == isl_dim_in)
                type = isl_dim_set;
-       return isl_space_dim(qp->dim, type);
+       return isl_qpolynomial_domain_dim(qp, type);
+}
+
+/* Return the offset of the first coefficient of type "type" in
+ * the domain of "qp".
+ */
+unsigned isl_qpolynomial_domain_offset(__isl_keep isl_qpolynomial *qp,
+       enum isl_dim_type type)
+{
+       if (!qp)
+               return 0;
+       switch (type) {
+       case isl_dim_cst:
+               return 0;
+       case isl_dim_param:
+       case isl_dim_set:
+               return 1 + isl_space_offset(qp->dim, type);
+       case isl_dim_div:
+               return 1 + isl_space_dim(qp->dim, isl_dim_all);
+       default:
+               return 0;
+       }
 }
 
 isl_bool isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp)
@@ -2238,11 +2274,11 @@ static __isl_give isl_qpolynomial *substitute_non_divs(
  * inside the division, so we need to add floor(e/d) * x outside.
  * That is, we replace q by q' + floor(e/d) * x and we therefore need
  * to adjust the coefficient of x in each later div that depends on the
- * current div "div" and also in the affine expression "aff"
- * (if it too depends on "div").
+ * current div "div" and also in the affine expressions in the rows of "mat"
+ * (if they too depend on "div").
  */
 static void reduce_div(__isl_keep isl_qpolynomial *qp, int div,
-       __isl_keep isl_vec *aff)
+       __isl_keep isl_mat **mat)
 {
        int i, j;
        isl_int v;
@@ -2256,8 +2292,7 @@ static void reduce_div(__isl_keep isl_qpolynomial *qp, int div,
                isl_int_fdiv_q(v, qp->div->row[div][1 + i], qp->div->row[div][0]);
                isl_int_fdiv_r(qp->div->row[div][1 + i],
                                qp->div->row[div][1 + i], qp->div->row[div][0]);
-               if (!isl_int_is_zero(aff->el[1 + total + div]))
-                       isl_int_addmul(aff->el[i], v, aff->el[1 + total + div]);
+               *mat = isl_mat_col_addmul(*mat, i, v, 1 + total + div);
                for (j = div + 1; j < qp->div->n_row; ++j) {
                        if (isl_int_is_zero(qp->div->row[j][2 + total + div]))
                                continue;
@@ -2297,11 +2332,11 @@ static int needs_invert(__isl_keep isl_mat *div, int row)
 
 /* Replace div "div" q = [e/d] by -[(-e+(d-1))/d].
  * We only invert the coefficients of e (and the coefficient of q in
- * later divs and in "aff").  After calling this function, the
+ * later divs and in the rows of "mat").  After calling this function, the
  * coefficients of e should be reduced again.
  */
 static void invert_div(__isl_keep isl_qpolynomial *qp, int div,
-       __isl_keep isl_vec *aff)
+       __isl_keep isl_mat **mat)
 {
        unsigned total = qp->div->n_col - qp->div->n_row - 2;
 
@@ -2310,15 +2345,18 @@ static void invert_div(__isl_keep isl_qpolynomial *qp, int div,
        isl_int_sub_ui(qp->div->row[div][1], qp->div->row[div][1], 1);
        isl_int_add(qp->div->row[div][1],
                    qp->div->row[div][1], qp->div->row[div][0]);
-       if (!isl_int_is_zero(aff->el[1 + total + div]))
-               isl_int_neg(aff->el[1 + total + div], aff->el[1 + total + div]);
+       *mat = isl_mat_col_neg(*mat, 1 + total + div);
        isl_mat_col_mul(qp->div, 2 + total + div,
                        qp->div->ctx->negone, 2 + total + div);
 }
 
-/* Assuming "qp" is a monomial, reduce all its divs to have coefficients
+/* Reduce all divs of "qp" to have coefficients
  * in the interval [0, d-1], with d the denominator and such that the
  * last non-zero coefficient that is not equal to d/2 is smaller than d/2.
+ * The modifications to the integer divisions need to be reflected
+ * in the factors of the polynomial that refer to the original
+ * integer divisions.  To this end, the modifications are collected
+ * as a set of affine expressions and then plugged into the polynomial.
  *
  * After the reduction, some divs may have become redundant or identical,
  * so we call substitute_non_divs and sort_divs.  If these functions
@@ -2329,48 +2367,58 @@ static void invert_div(__isl_keep isl_qpolynomial *qp, int div,
 static __isl_give isl_qpolynomial *reduce_divs(__isl_take isl_qpolynomial *qp)
 {
        int i;
-       isl_vec *aff = NULL;
-       struct isl_upoly *s;
-       unsigned n_div;
+       isl_ctx *ctx;
+       isl_mat *mat;
+       struct isl_upoly **s;
+       unsigned o_div, n_div, total;
 
        if (!qp)
                return NULL;
 
-       aff = isl_vec_alloc(qp->div->ctx, qp->div->n_col - 1);
-       aff = isl_vec_clr(aff);
-       if (!aff)
-               goto error;
+       total = isl_qpolynomial_domain_dim(qp, isl_dim_all);
+       n_div = isl_qpolynomial_domain_dim(qp, isl_dim_div);
+       o_div = isl_qpolynomial_domain_offset(qp, isl_dim_div);
+       ctx = isl_qpolynomial_get_ctx(qp);
+       mat = isl_mat_zero(ctx, n_div, 1 + total);
 
-       isl_int_set_si(aff->el[1 + qp->upoly->var], 1);
+       for (i = 0; i < n_div; ++i)
+               mat = isl_mat_set_element_si(mat, i, o_div + i, 1);
 
        for (i = 0; i < qp->div->n_row; ++i) {
                normalize_div(qp, i);
-               reduce_div(qp, i, aff);
+               reduce_div(qp, i, &mat);
                if (needs_invert(qp->div, i)) {
-                       invert_div(qp, i, aff);
-                       reduce_div(qp, i, aff);
+                       invert_div(qp, i, &mat);
+                       reduce_div(qp, i, &mat);
                }
        }
+       if (!mat)
+               goto error;
 
-       s = isl_upoly_from_affine(qp->div->ctx, aff->el,
-                                 qp->div->ctx->one, aff->size);
-       qp->upoly = isl_upoly_subs(qp->upoly, qp->upoly->var, 1, &s);
-       isl_upoly_free(s);
+       s = isl_alloc_array(ctx, struct isl_upoly *, n_div);
+       if (n_div && !s)
+               goto error;
+       for (i = 0; i < n_div; ++i)
+               s[i] = isl_upoly_from_affine(ctx, mat->row[i], ctx->one,
+                                           1 + total);
+       qp->upoly = isl_upoly_subs(qp->upoly, o_div - 1, n_div, s);
+       for (i = 0; i < n_div; ++i)
+               isl_upoly_free(s[i]);
+       free(s);
        if (!qp->upoly)
                goto error;
 
-       isl_vec_free(aff);
+       isl_mat_free(mat);
 
-       n_div = qp->div->n_row;
        qp = substitute_non_divs(qp);
        qp = sort_divs(qp);
-       if (qp && qp->div->n_row < n_div)
+       if (qp && isl_qpolynomial_domain_dim(qp, isl_dim_div) < n_div)
                return reduce_divs(qp);
 
        return qp;
 error:
        isl_qpolynomial_free(qp);
-       isl_vec_free(aff);
+       isl_mat_free(mat);
        return NULL;
 }
 
@@ -2628,6 +2676,12 @@ __isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name(
        qp = isl_qpolynomial_cow(qp);
        if (!qp)
                return NULL;
+       if (type == isl_dim_out)
+               isl_die(isl_qpolynomial_get_ctx(qp), isl_error_invalid,
+                       "cannot set name of output/set dimension",
+                       return isl_qpolynomial_free(qp));
+       if (type == isl_dim_in)
+               type = isl_dim_set;
        qp->dim = isl_space_set_dim_name(qp->dim, type, pos, s);
        if (!qp->dim)
                goto error;
@@ -3031,15 +3085,35 @@ error:
        return NULL;
 }
 
+/* Evaluate "qp" in the void point "pnt".
+ * In particular, return the value NaN.
+ */
+static __isl_give isl_val *eval_void(__isl_take isl_qpolynomial *qp,
+       __isl_take isl_point *pnt)
+{
+       isl_ctx *ctx;
+
+       ctx = isl_point_get_ctx(pnt);
+       isl_qpolynomial_free(qp);
+       isl_point_free(pnt);
+       return isl_val_nan(ctx);
+}
+
 __isl_give isl_val *isl_qpolynomial_eval(__isl_take isl_qpolynomial *qp,
        __isl_take isl_point *pnt)
 {
+       isl_bool is_void;
        isl_vec *ext;
        isl_val *v;
 
        if (!qp || !pnt)
                goto error;
        isl_assert(pnt->dim->ctx, isl_space_is_equal(pnt->dim, qp->dim), goto error);
+       is_void = isl_point_is_void(pnt);
+       if (is_void < 0)
+               goto error;
+       if (is_void)
+               return eval_void(qp, pnt);
 
        if (qp->div->n_row == 0)
                ext = isl_vec_copy(pnt->vec);
index 17b1a2d..24ef7bd 100644 (file)
@@ -134,6 +134,9 @@ int isl_qpolynomial_is_affine(__isl_keep isl_qpolynomial *qp);
 int isl_qpolynomial_is_cst(__isl_keep isl_qpolynomial *qp,
        isl_int *n, isl_int *d);
 
+unsigned isl_qpolynomial_domain_offset(__isl_keep isl_qpolynomial *qp,
+       enum isl_dim_type type);
+
 __isl_give isl_qpolynomial *isl_qpolynomial_add_on_domain(
        __isl_keep isl_set *dom,
        __isl_take isl_qpolynomial *qp1,
diff --git a/polly/lib/External/isl/isl_srcdir.c.in b/polly/lib/External/isl/isl_srcdir.c.in
new file mode 100644 (file)
index 0000000..38e30c5
--- /dev/null
@@ -0,0 +1 @@
+static const char *srcdir = "@srcdir@";
index d02452e..3353c3d 100644 (file)
 #include <isl/schedule.h>
 #include <isl/schedule_node.h>
 #include <isl_options_private.h>
-#include <isl/vertices.h>
+#include <isl_vertices_private.h>
 #include <isl/ast_build.h>
 #include <isl/val.h>
 #include <isl/ilp.h>
 #include <isl_ast_build_expr.h>
 #include <isl/options.h>
 
-#define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array))
+#include "isl_srcdir.c"
 
-static char *srcdir;
+#define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array))
 
 static char *get_filename(isl_ctx *ctx, const char *name, const char *suffix) {
        char *filename;
@@ -4970,7 +4970,7 @@ int test_union_pw(isl_ctx *ctx)
 /* Test that isl_union_pw_qpolynomial_eval picks up the function
  * defined over the correct domain space.
  */
-static int test_eval(isl_ctx *ctx)
+static int test_eval_1(isl_ctx *ctx)
 {
        const char *str;
        isl_point *pnt;
@@ -4996,6 +4996,45 @@ static int test_eval(isl_ctx *ctx)
        return 0;
 }
 
+/* Check that isl_qpolynomial_eval handles getting called on a void point.
+ */
+static int test_eval_2(isl_ctx *ctx)
+{
+       const char *str;
+       isl_point *pnt;
+       isl_set *set;
+       isl_qpolynomial *qp;
+       isl_val *v;
+       isl_bool ok;
+
+       str = "{ A[x] -> [x] }";
+       qp = isl_qpolynomial_from_aff(isl_aff_read_from_str(ctx, str));
+       str = "{ A[x] : false }";
+       set = isl_set_read_from_str(ctx, str);
+       pnt = isl_set_sample_point(set);
+       v = isl_qpolynomial_eval(qp, pnt);
+       ok = isl_val_is_nan(v);
+       isl_val_free(v);
+
+       if (ok < 0)
+               return -1;
+       if (!ok)
+               isl_die(ctx, isl_error_unknown, "expecting NaN", return -1);
+
+       return 0;
+}
+
+/* Perform basic polynomial evaluation tests.
+ */
+static int test_eval(isl_ctx *ctx)
+{
+       if (test_eval_1(ctx) < 0)
+               return -1;
+       if (test_eval_2(ctx) < 0)
+               return -1;
+       return 0;
+}
+
 /* Descriptions of sets that are tested for reparsing after printing.
  */
 const char *output_tests[] = {
@@ -6675,6 +6714,94 @@ static int test_universe(isl_ctx *ctx)
        return 0;
 }
 
+/* Sets for which chambers are computed and checked.
+ */
+const char *chambers_tests[] = {
+       "[A, B, C] -> { [x, y, z] : x >= 0 and y >= 0 and y <= A - x and "
+                               "z >= 0 and z <= C - y and z <= B - x - y }",
+};
+
+/* Add the domain of "cell" to "cells".
+ */
+static int add_cell(__isl_take isl_cell *cell, void *user)
+{
+       isl_basic_set_list **cells = user;
+       isl_basic_set *dom;
+
+       dom = isl_cell_get_domain(cell);
+       isl_cell_free(cell);
+       *cells = isl_basic_set_list_add(*cells, dom);
+
+       return *cells ? 0 : -1;
+}
+
+/* Check that the elements of "list" are pairwise disjoint.
+ */
+static isl_stat check_pairwise_disjoint(__isl_keep isl_basic_set_list *list)
+{
+       int i, j, n;
+
+       if (!list)
+               return isl_stat_error;
+
+       n = isl_basic_set_list_n_basic_set(list);
+       for (i = 0; i < n; ++i) {
+               isl_basic_set *bset_i;
+
+               bset_i = isl_basic_set_list_get_basic_set(list, i);
+               for (j = i + 1; j < n; ++j) {
+                       isl_basic_set *bset_j;
+                       isl_bool disjoint;
+
+                       bset_j = isl_basic_set_list_get_basic_set(list, j);
+                       disjoint = isl_basic_set_is_disjoint(bset_i, bset_j);
+                       isl_basic_set_free(bset_j);
+                       if (!disjoint)
+                               isl_die(isl_basic_set_list_get_ctx(list),
+                                       isl_error_unknown, "not disjoint",
+                                       break);
+                       if (disjoint < 0 || !disjoint)
+                               break;
+               }
+               isl_basic_set_free(bset_i);
+               if (j < n)
+                       return isl_stat_error;
+       }
+
+       return isl_stat_ok;
+}
+
+/* Check that the chambers computed by isl_vertices_foreach_disjoint_cell
+ * are pairwise disjoint.
+ */
+static int test_chambers(isl_ctx *ctx)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(chambers_tests); ++i) {
+               isl_basic_set *bset;
+               isl_vertices *vertices;
+               isl_basic_set_list *cells;
+               isl_stat ok;
+
+               bset = isl_basic_set_read_from_str(ctx, chambers_tests[i]);
+               vertices = isl_basic_set_compute_vertices(bset);
+               cells = isl_basic_set_list_alloc(ctx, 0);
+               if (isl_vertices_foreach_disjoint_cell(vertices, &add_cell,
+                                                       &cells) < 0)
+                       cells = isl_basic_set_list_free(cells);
+               ok = check_pairwise_disjoint(cells);
+               isl_basic_set_list_free(cells);
+               isl_vertices_free(vertices);
+               isl_basic_set_free(bset);
+
+               if (ok < 0)
+                       return -1;
+       }
+
+       return 0;
+}
+
 struct {
        const char *name;
        int (*fn)(isl_ctx *ctx);
@@ -6706,6 +6833,7 @@ struct {
        { "sample", &test_sample },
        { "output", &test_output },
        { "vertices", &test_vertices },
+       { "chambers", &test_chambers },
        { "fixed", &test_fixed },
        { "equal", &test_equal },
        { "disjoint", &test_disjoint },
@@ -6754,9 +6882,6 @@ int main(int argc, char **argv)
        struct isl_ctx *ctx;
        struct isl_options *options;
 
-       srcdir = getenv("srcdir");
-       assert(srcdir);
-
        options = isl_options_new_with_defaults();
        assert(options);
        argc = isl_options_parse(options, argc, argv, ISL_ARG_ALL);
index baf9e28..011cda1 100644 (file)
@@ -1145,7 +1145,7 @@ static struct isl_tab *tab_for_shifted_cone(__isl_keep isl_basic_set *bset)
 
        if (!bset)
                return NULL;
-       tab = isl_tab_alloc(bset->ctx, bset->n_ineq + 1,
+       tab = isl_tab_alloc(bset->ctx, bset->n_eq + bset->n_ineq + 1,
                            1 + isl_basic_set_total_dim(bset), 0);
        if (!tab)
                return NULL;
@@ -1217,13 +1217,15 @@ static __isl_give isl_vec *isl_basic_set_interior_point(
  *
  * We pick an interior point from one of the chambers and then make
  * all constraints that do not satisfy this point strict.
+ * For constraints that saturate the interior point, the sign
+ * of the first non-zero coefficient is used to determine which
+ * of the two (internal) constraints should be tightened.
  */
 int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices,
        int (*fn)(__isl_take isl_cell *cell, void *user), void *user)
 {
-       int i, j;
+       int i;
        isl_vec *vec;
-       isl_int v;
        isl_cell *cell;
 
        if (!vertices)
@@ -1245,21 +1247,11 @@ int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices,
        if (!vec)
                return -1;
 
-       isl_int_init(v);
-
        for (i = 0; i < vertices->n_chambers; ++i) {
                int r;
                isl_basic_set *dom = isl_basic_set_copy(vertices->c[i].dom);
-               dom = isl_basic_set_cow(dom);
-               if (!dom)
-                       goto error;
-               for (j = 0; i && j < dom->n_ineq; ++j) {
-                       isl_seq_inner_product(vec->el, dom->ineq[j], vec->size,
-                                               &v);
-                       if (!isl_int_is_neg(v))
-                               continue;
-                       isl_int_sub_ui(dom->ineq[j][0], dom->ineq[j][0], 1);
-               }
+               if (i)
+                       dom = isl_basic_set_tighten_outward(dom, vec);
                dom = isl_basic_set_set_integral(dom);
                cell = isl_cell_alloc(isl_vertices_copy(vertices), dom, i);
                if (!cell)
@@ -1269,12 +1261,10 @@ int isl_vertices_foreach_disjoint_cell(__isl_keep isl_vertices *vertices,
                        goto error;
        }
 
-       isl_int_clear(v);
        isl_vec_free(vec);
 
        return 0;
 error:
-       isl_int_clear(v);
        isl_vec_free(vec);
        return -1;
 }
index 2ad8be8..147d758 100644 (file)
@@ -31,7 +31,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-1"
+VERSION="2.4.6 Debian-2.4.6-0.1"
 package_revision=2.4.6
 
 
@@ -1977,7 +1977,7 @@ func_version ()
 # End:
 
 # Set a version string.
-scriptversion='(GNU libtool) 2.4.6 Debian-2.4.6-1'
+scriptversion='(GNU libtool) 2.4.6'
 
 
 # func_echo ARG...
@@ -2068,7 +2068,7 @@ include the following information:
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname $scriptversion
+       version:        $progname (GNU libtool) 2.4.6
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
index ee80844..10ab284 100644 (file)
@@ -728,6 +728,7 @@ _LT_CONFIG_SAVE_COMMANDS([
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
 # Generated automatically by $as_me ($PACKAGE) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
 # Provide generalized library-building support services.
index 549a80f..5f36b77 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 EXEEXT=@EXEEXT@
+srcdir=@srcdir@
 
 PIP_TESTS="\
        boulet.pip \
diff --git a/polly/lib/External/isl_srcdir.c.cmake b/polly/lib/External/isl_srcdir.c.cmake
new file mode 100644 (file)
index 0000000..34ef890
--- /dev/null
@@ -0,0 +1 @@
+static const char *srcdir = "@ISL_SOURCE_DIR@";