public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 2/2] [graphite] update required isl versions
  2015-12-10 17:05 [PATCH 1/2] [graphite] document minimal required version for isl Sebastian Pop
@ 2015-12-10 17:05 ` Sebastian Pop
  2015-12-11  9:42   ` Richard Biener
  2015-12-11  9:30 ` [PATCH 1/2] [graphite] document minimal required version for isl Richard Biener
  1 sibling, 1 reply; 5+ messages in thread
From: Sebastian Pop @ 2015-12-10 17:05 UTC (permalink / raw)
  To: sebpop; +Cc: richard.guenther, gcc-patches, hiraditya, Sebastian Pop

we now check the isl version, as there are no real differences in existing files
in between isl 0.14 and isl 0.15.
---
 config/isl.m4 |  41 +++++++++++++++------
 configure     | 112 ++++++++++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 123 insertions(+), 30 deletions(-)

diff --git a/config/isl.m4 b/config/isl.m4
index 459fac1..886b0e4 100644
--- a/config/isl.m4
+++ b/config/isl.m4
@@ -19,23 +19,23 @@
 
 # ISL_INIT_FLAGS ()
 # -------------------------
-# Provide configure switches for ISL support.
+# Provide configure switches for isl support.
 # Initialize isllibs/islinc according to the user input.
 AC_DEFUN([ISL_INIT_FLAGS],
 [
   AC_ARG_WITH([isl-include],
     [AS_HELP_STRING(
       [--with-isl-include=PATH],
-      [Specify directory for installed ISL include files])])
+      [Specify directory for installed isl include files])])
   AC_ARG_WITH([isl-lib],
     [AS_HELP_STRING(
       [--with-isl-lib=PATH],
-      [Specify the directory for the installed ISL library])])
+      [Specify the directory for the installed isl library])])
 
   AC_ARG_ENABLE(isl-version-check,
     [AS_HELP_STRING(
       [--disable-isl-version-check],
-      [disable check for ISL version])],
+      [disable check for isl version])],
     ENABLE_ISL_CHECK=$enableval,
     ENABLE_ISL_CHECK=yes)
   
@@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS],
   if test "x${with_isl_lib}" != x; then
     isllibs="-L$with_isl_lib"
   fi
-  dnl If no --with-isl flag was specified and there is in-tree ISL
+  dnl If no --with-isl flag was specified and there is in-tree isl
   dnl source, set up flags to use that and skip any version tests
-  dnl as we cannot run them before building ISL.
+  dnl as we cannot run them before building isl.
   if test "x${islinc}" = x && test "x${isllibs}" = x \
      && test -d ${srcdir}/isl; then
     isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
     islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
     ENABLE_ISL_CHECK=no
-    AC_MSG_WARN([using in-tree ISL, disabling version check])
+    AC_MSG_WARN([using in-tree isl, disabling version check])
   fi
 
   isllibs="${isllibs} -lisl"
@@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS],
 
 # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
 # ----------------------------------------------------
-# Provide actions for failed ISL detection.
+# Provide actions for failed isl detection.
 AC_DEFUN([ISL_REQUESTED],
 [
   AC_REQUIRE([ISL_INIT_FLAGS])
@@ -106,12 +106,31 @@ AC_DEFUN([ISL_CHECK_VERSION],
     LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
     LIBS="${_isl_saved_LIBS} -lisl"
 
-    AC_MSG_CHECKING([for compatible ISL])
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])],
+    AC_MSG_CHECKING([for recommended isl 0.15])
+    AC_TRY_RUN([#include <isl/stdint.h>
+                #include <string.h>
+                int main() {
+                  if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8))
+                    return 1;
+                  return 0;
+                }],
 	[gcc_cv_isl=yes],
-	[gcc_cv_isl=no])
+	[gcc_cv_isl=no], [gcc_cv_isl=no])
     AC_MSG_RESULT([$gcc_cv_isl])
 
+    if test "${gcc_cv_isl}" = no ; then
+       AC_MSG_CHECKING([for deprecated isl 0.14])
+       AC_TRY_RUN([#include <isl/stdint.h>
+                   #include <string.h>
+                   int main() {
+                     if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8))
+                       return 1;
+                     return 0;
+                   }],
+	[gcc_cv_isl=yes],
+	[gcc_cv_isl=no], [gcc_cv_isl=no])
+        AC_MSG_RESULT([$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated])
+    fi
     CFLAGS=$_isl_saved_CFLAGS
     LDFLAGS=$_isl_saved_LDFLAGS
     LIBS=$_isl_saved_LIBS
diff --git a/configure b/configure
index 090615f..4284ba7 100755
--- a/configure
+++ b/configure
@@ -1492,7 +1492,7 @@ Optional Features:
                           build static libjava [default=no]
   --enable-bootstrap      enable bootstrapping [yes if native build]
   --disable-isl-version-check
-                          disable check for ISL version
+                          disable check for isl version
   --enable-lto            enable link time optimization support
   --enable-linker-plugin-configure-flags=FLAGS
                           additional flags for configuring linker plugins
@@ -1553,8 +1553,8 @@ Optional Packages:
                           package. Equivalent to
                           --with-isl-include=PATH/include plus
                           --with-isl-lib=PATH/lib
-  --with-isl-include=PATH Specify directory for installed ISL include files
-  --with-isl-lib=PATH     Specify the directory for the installed ISL library
+  --with-isl-include=PATH Specify directory for installed isl include files
+  --with-isl-lib=PATH     Specify the directory for the installed isl library
   --with-build-sysroot=SYSROOT
                           use sysroot as the system root during the build
   --with-debug-prefix-map='A=B C=D ...'
@@ -1879,6 +1879,48 @@ fi
   return $ac_retval
 
 } # ac_fn_c_try_link
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  return $ac_retval
+
+} # ac_fn_c_try_run
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -6003,8 +6045,8 @@ fi
     isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
     islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
     ENABLE_ISL_CHECK=no
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5
-$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5
+$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
   fi
 
   isllibs="${isllibs} -lisl"
@@ -6020,29 +6062,61 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
     LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
     LIBS="${_isl_saved_LIBS} -lisl"
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5
-$as_echo_n "checking for compatible ISL... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recommended isl 0.15" >&5
+$as_echo_n "checking for recommended isl 0.15... " >&6; }
+    if test "$cross_compiling" = yes; then :
+  gcc_cv_isl=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <isl/val.h>
-int
-main ()
-{
-;
-  ;
-  return 0;
-}
+#include <isl/stdint.h>
+                #include <string.h>
+                int main() {
+                  if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8))
+                    return 1;
+                  return 0;
+                }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_run "$LINENO"; then :
   gcc_cv_isl=yes
 else
   gcc_cv_isl=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
 $as_echo "$gcc_cv_isl" >&6; }
 
+    if test "${gcc_cv_isl}" = no ; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated isl 0.14" >&5
+$as_echo_n "checking for deprecated isl 0.14... " >&6; }
+       if test "$cross_compiling" = yes; then :
+  gcc_cv_isl=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <isl/stdint.h>
+                   #include <string.h>
+                   int main() {
+                     if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8))
+                       return 1;
+                     return 0;
+                   }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gcc_cv_isl=yes
+else
+  gcc_cv_isl=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&5
+$as_echo "$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; }
+    fi
     CFLAGS=$_isl_saved_CFLAGS
     LDFLAGS=$_isl_saved_LDFLAGS
     LIBS=$_isl_saved_LIBS
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] [graphite] document minimal required version for isl
@ 2015-12-10 17:05 Sebastian Pop
  2015-12-10 17:05 ` [PATCH 2/2] [graphite] update required isl versions Sebastian Pop
  2015-12-11  9:30 ` [PATCH 1/2] [graphite] document minimal required version for isl Richard Biener
  0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Pop @ 2015-12-10 17:05 UTC (permalink / raw)
  To: sebpop; +Cc: richard.guenther, gcc-patches, hiraditya, Sebastian Pop

also update ISL to isl as requested by its author Sven Verdoolaege.
---
 gcc/doc/install.texi | 9 +++++----
 gcc/doc/invoke.texi  | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 0b71bef..b43a3ec 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -383,14 +383,15 @@ installed but it is not in your default library search path, the
 @option{--with-mpc} configure option should be used.  See also
 @option{--with-mpc-lib} and @option{--with-mpc-include}.
 
-@item ISL Library version 0.15 or 0.14.
+@item isl Library version 0.15 or 0.14.
 
+Minimal isl version supported is 0.14 and it is highly recommended to use 0.15.
 Necessary to build GCC with the Graphite loop optimizations.
 It can be downloaded from @uref{ftp://gcc.gnu.org/pub/gcc/infrastructure/}.
-If an ISL source distribution is found
+If an isl source distribution is found
 in a subdirectory of your GCC sources named @file{isl}, it will be
 built together with GCC.  Alternatively, the @option{--with-isl} configure
-option should be used if ISL is not installed in your default library
+option should be used if isl is not installed in your default library
 search path.
 
 @end table
@@ -1850,7 +1851,7 @@ a cross compiler, they will not be used to configure target libraries.
 @item --with-isl=@var{pathname}
 @itemx --with-isl-include=@var{pathname}
 @itemx --with-isl-lib=@var{pathname}
-If you do not have the ISL library installed in a standard location and you
+If you do not have the isl library installed in a standard location and you
 want to build GCC, you can explicitly specify the directory where it is
 installed (@samp{--with-isl=@/@var{islinstalldir}}). The
 @option{--with-isl=@/@var{islinstalldir}} option is shorthand for
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5256031..7ae0849 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -8939,12 +8939,12 @@ Enable the identity transformation for graphite.  For every SCoP we generate
 the polyhedral representation and transform it back to gimple.  Using
 @option{-fgraphite-identity} we can check the costs or benefits of the
 GIMPLE -> GRAPHITE -> GIMPLE transformation.  Some minimal optimizations
-are also performed by the code generator ISL, like index splitting and
+are also performed by the code generator isl, like index splitting and
 dead code elimination in loops.
 
 @item -floop-nest-optimize
 @opindex floop-nest-optimize
-Enable the ISL based loop nest optimizer.  This is a generic loop nest
+Enable the isl based loop nest optimizer.  This is a generic loop nest
 optimizer based on the Pluto optimization algorithms.  It calculates a loop
 structure optimized for data-locality and parallelism.  This option
 is experimental.
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] [graphite] document minimal required version for isl
  2015-12-10 17:05 [PATCH 1/2] [graphite] document minimal required version for isl Sebastian Pop
  2015-12-10 17:05 ` [PATCH 2/2] [graphite] update required isl versions Sebastian Pop
@ 2015-12-11  9:30 ` Richard Biener
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Biener @ 2015-12-11  9:30 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: Sebastian Pop, GCC Patches, hiraditya

On Thu, Dec 10, 2015 at 6:05 PM, Sebastian Pop <s.pop@samsung.com> wrote:
> also update ISL to isl as requested by its author Sven Verdoolaege.

Ok.  Please always post ChangeLog entries as well.

Richard.

> ---
>  gcc/doc/install.texi | 9 +++++----
>  gcc/doc/invoke.texi  | 4 ++--
>  2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
> index 0b71bef..b43a3ec 100644
> --- a/gcc/doc/install.texi
> +++ b/gcc/doc/install.texi
> @@ -383,14 +383,15 @@ installed but it is not in your default library search path, the
>  @option{--with-mpc} configure option should be used.  See also
>  @option{--with-mpc-lib} and @option{--with-mpc-include}.
>
> -@item ISL Library version 0.15 or 0.14.
> +@item isl Library version 0.15 or 0.14.
>
> +Minimal isl version supported is 0.14 and it is highly recommended to use 0.15.
>  Necessary to build GCC with the Graphite loop optimizations.
>  It can be downloaded from @uref{ftp://gcc.gnu.org/pub/gcc/infrastructure/}.
> -If an ISL source distribution is found
> +If an isl source distribution is found
>  in a subdirectory of your GCC sources named @file{isl}, it will be
>  built together with GCC.  Alternatively, the @option{--with-isl} configure
> -option should be used if ISL is not installed in your default library
> +option should be used if isl is not installed in your default library
>  search path.
>
>  @end table
> @@ -1850,7 +1851,7 @@ a cross compiler, they will not be used to configure target libraries.
>  @item --with-isl=@var{pathname}
>  @itemx --with-isl-include=@var{pathname}
>  @itemx --with-isl-lib=@var{pathname}
> -If you do not have the ISL library installed in a standard location and you
> +If you do not have the isl library installed in a standard location and you
>  want to build GCC, you can explicitly specify the directory where it is
>  installed (@samp{--with-isl=@/@var{islinstalldir}}). The
>  @option{--with-isl=@/@var{islinstalldir}} option is shorthand for
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 5256031..7ae0849 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -8939,12 +8939,12 @@ Enable the identity transformation for graphite.  For every SCoP we generate
>  the polyhedral representation and transform it back to gimple.  Using
>  @option{-fgraphite-identity} we can check the costs or benefits of the
>  GIMPLE -> GRAPHITE -> GIMPLE transformation.  Some minimal optimizations
> -are also performed by the code generator ISL, like index splitting and
> +are also performed by the code generator isl, like index splitting and
>  dead code elimination in loops.
>
>  @item -floop-nest-optimize
>  @opindex floop-nest-optimize
> -Enable the ISL based loop nest optimizer.  This is a generic loop nest
> +Enable the isl based loop nest optimizer.  This is a generic loop nest
>  optimizer based on the Pluto optimization algorithms.  It calculates a loop
>  structure optimized for data-locality and parallelism.  This option
>  is experimental.
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] [graphite] update required isl versions
  2015-12-10 17:05 ` [PATCH 2/2] [graphite] update required isl versions Sebastian Pop
@ 2015-12-11  9:42   ` Richard Biener
  2015-12-11 16:42     ` Sebastian Paul Pop
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2015-12-11  9:42 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: Sebastian Pop, GCC Patches, hiraditya

On Thu, Dec 10, 2015 at 6:05 PM, Sebastian Pop <s.pop@samsung.com> wrote:
> we now check the isl version, as there are no real differences in existing files
> in between isl 0.14 and isl 0.15.

I thought ISL 0.15 has some new features you could check?  Also using a run test
is bad for cross compiling.

I'd simply change the "compatible" test to check for isl_ctx_get_max_operations
or whatever is needed to implement the compute bound and not worry about
warning about using a deprecated ISL during configure.

Maybe add the ISL version to the list of dependency versions we print in
toplev.c:print_version.

Richard.

> ---
>  config/isl.m4 |  41 +++++++++++++++------
>  configure     | 112 ++++++++++++++++++++++++++++++++++++++++++++++++----------
>  2 files changed, 123 insertions(+), 30 deletions(-)
>
> diff --git a/config/isl.m4 b/config/isl.m4
> index 459fac1..886b0e4 100644
> --- a/config/isl.m4
> +++ b/config/isl.m4
> @@ -19,23 +19,23 @@
>
>  # ISL_INIT_FLAGS ()
>  # -------------------------
> -# Provide configure switches for ISL support.
> +# Provide configure switches for isl support.
>  # Initialize isllibs/islinc according to the user input.
>  AC_DEFUN([ISL_INIT_FLAGS],
>  [
>    AC_ARG_WITH([isl-include],
>      [AS_HELP_STRING(
>        [--with-isl-include=PATH],
> -      [Specify directory for installed ISL include files])])
> +      [Specify directory for installed isl include files])])
>    AC_ARG_WITH([isl-lib],
>      [AS_HELP_STRING(
>        [--with-isl-lib=PATH],
> -      [Specify the directory for the installed ISL library])])
> +      [Specify the directory for the installed isl library])])
>
>    AC_ARG_ENABLE(isl-version-check,
>      [AS_HELP_STRING(
>        [--disable-isl-version-check],
> -      [disable check for ISL version])],
> +      [disable check for isl version])],
>      ENABLE_ISL_CHECK=$enableval,
>      ENABLE_ISL_CHECK=yes)
>
> @@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS],
>    if test "x${with_isl_lib}" != x; then
>      isllibs="-L$with_isl_lib"
>    fi
> -  dnl If no --with-isl flag was specified and there is in-tree ISL
> +  dnl If no --with-isl flag was specified and there is in-tree isl
>    dnl source, set up flags to use that and skip any version tests
> -  dnl as we cannot run them before building ISL.
> +  dnl as we cannot run them before building isl.
>    if test "x${islinc}" = x && test "x${isllibs}" = x \
>       && test -d ${srcdir}/isl; then
>      isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
>      islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
>      ENABLE_ISL_CHECK=no
> -    AC_MSG_WARN([using in-tree ISL, disabling version check])
> +    AC_MSG_WARN([using in-tree isl, disabling version check])
>    fi
>
>    isllibs="${isllibs} -lisl"
> @@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS],
>
>  # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
>  # ----------------------------------------------------
> -# Provide actions for failed ISL detection.
> +# Provide actions for failed isl detection.
>  AC_DEFUN([ISL_REQUESTED],
>  [
>    AC_REQUIRE([ISL_INIT_FLAGS])
> @@ -106,12 +106,31 @@ AC_DEFUN([ISL_CHECK_VERSION],
>      LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
>      LIBS="${_isl_saved_LIBS} -lisl"
>
> -    AC_MSG_CHECKING([for compatible ISL])
> -    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])],
> +    AC_MSG_CHECKING([for recommended isl 0.15])
> +    AC_TRY_RUN([#include <isl/stdint.h>
> +                #include <string.h>
> +                int main() {
> +                  if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8))
> +                    return 1;
> +                  return 0;
> +                }],
>         [gcc_cv_isl=yes],
> -       [gcc_cv_isl=no])
> +       [gcc_cv_isl=no], [gcc_cv_isl=no])
>      AC_MSG_RESULT([$gcc_cv_isl])
>
> +    if test "${gcc_cv_isl}" = no ; then
> +       AC_MSG_CHECKING([for deprecated isl 0.14])
> +       AC_TRY_RUN([#include <isl/stdint.h>
> +                   #include <string.h>
> +                   int main() {
> +                     if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8))
> +                       return 1;
> +                     return 0;
> +                   }],
> +       [gcc_cv_isl=yes],
> +       [gcc_cv_isl=no], [gcc_cv_isl=no])
> +        AC_MSG_RESULT([$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated])
> +    fi
>      CFLAGS=$_isl_saved_CFLAGS
>      LDFLAGS=$_isl_saved_LDFLAGS
>      LIBS=$_isl_saved_LIBS
> diff --git a/configure b/configure
> index 090615f..4284ba7 100755
> --- a/configure
> +++ b/configure
> @@ -1492,7 +1492,7 @@ Optional Features:
>                            build static libjava [default=no]
>    --enable-bootstrap      enable bootstrapping [yes if native build]
>    --disable-isl-version-check
> -                          disable check for ISL version
> +                          disable check for isl version
>    --enable-lto            enable link time optimization support
>    --enable-linker-plugin-configure-flags=FLAGS
>                            additional flags for configuring linker plugins
> @@ -1553,8 +1553,8 @@ Optional Packages:
>                            package. Equivalent to
>                            --with-isl-include=PATH/include plus
>                            --with-isl-lib=PATH/lib
> -  --with-isl-include=PATH Specify directory for installed ISL include files
> -  --with-isl-lib=PATH     Specify the directory for the installed ISL library
> +  --with-isl-include=PATH Specify directory for installed isl include files
> +  --with-isl-lib=PATH     Specify the directory for the installed isl library
>    --with-build-sysroot=SYSROOT
>                            use sysroot as the system root during the build
>    --with-debug-prefix-map='A=B C=D ...'
> @@ -1879,6 +1879,48 @@ fi
>    return $ac_retval
>
>  } # ac_fn_c_try_link
> +
> +# ac_fn_c_try_run LINENO
> +# ----------------------
> +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
> +# that executables *can* be run.
> +ac_fn_c_try_run ()
> +{
> +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
> +  if { { ac_try="$ac_link"
> +case "(($ac_try" in
> +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
> +  *) ac_try_echo=$ac_try;;
> +esac
> +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
> +$as_echo "$ac_try_echo"; } >&5
> +  (eval "$ac_link") 2>&5
> +  ac_status=$?
> +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
> +  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
> +  { { case "(($ac_try" in
> +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
> +  *) ac_try_echo=$ac_try;;
> +esac
> +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
> +$as_echo "$ac_try_echo"; } >&5
> +  (eval "$ac_try") 2>&5
> +  ac_status=$?
> +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
> +  test $ac_status = 0; }; }; then :
> +  ac_retval=0
> +else
> +  $as_echo "$as_me: program exited with status $ac_status" >&5
> +       $as_echo "$as_me: failed program was:" >&5
> +sed 's/^/| /' conftest.$ac_ext >&5
> +
> +       ac_retval=$ac_status
> +fi
> +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
> +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
> +  return $ac_retval
> +
> +} # ac_fn_c_try_run
>  cat >config.log <<_ACEOF
>  This file contains any messages produced by compilers while
>  running configure, to aid debugging if configure makes a mistake.
> @@ -6003,8 +6045,8 @@ fi
>      isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
>      islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
>      ENABLE_ISL_CHECK=no
> -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5
> -$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5
> +$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
>    fi
>
>    isllibs="${isllibs} -lisl"
> @@ -6020,29 +6062,61 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
>      LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
>      LIBS="${_isl_saved_LIBS} -lisl"
>
> -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5
> -$as_echo_n "checking for compatible ISL... " >&6; }
> -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recommended isl 0.15" >&5
> +$as_echo_n "checking for recommended isl 0.15... " >&6; }
> +    if test "$cross_compiling" = yes; then :
> +  gcc_cv_isl=no
> +else
> +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
> -#include <isl/val.h>
> -int
> -main ()
> -{
> -;
> -  ;
> -  return 0;
> -}
> +#include <isl/stdint.h>
> +                #include <string.h>
> +                int main() {
> +                  if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8))
> +                    return 1;
> +                  return 0;
> +                }
>  _ACEOF
> -if ac_fn_c_try_link "$LINENO"; then :
> +if ac_fn_c_try_run "$LINENO"; then :
>    gcc_cv_isl=yes
>  else
>    gcc_cv_isl=no
>  fi
> -rm -f core conftest.err conftest.$ac_objext \
> -    conftest$ac_exeext conftest.$ac_ext
> +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
> +  conftest.$ac_objext conftest.beam conftest.$ac_ext
> +fi
> +
>      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
>  $as_echo "$gcc_cv_isl" >&6; }
>
> +    if test "${gcc_cv_isl}" = no ; then
> +       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated isl 0.14" >&5
> +$as_echo_n "checking for deprecated isl 0.14... " >&6; }
> +       if test "$cross_compiling" = yes; then :
> +  gcc_cv_isl=no
> +else
> +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +/* end confdefs.h.  */
> +#include <isl/stdint.h>
> +                   #include <string.h>
> +                   int main() {
> +                     if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8))
> +                       return 1;
> +                     return 0;
> +                   }
> +_ACEOF
> +if ac_fn_c_try_run "$LINENO"; then :
> +  gcc_cv_isl=yes
> +else
> +  gcc_cv_isl=no
> +fi
> +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
> +  conftest.$ac_objext conftest.beam conftest.$ac_ext
> +fi
> +
> +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&5
> +$as_echo "$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; }
> +    fi
>      CFLAGS=$_isl_saved_CFLAGS
>      LDFLAGS=$_isl_saved_LDFLAGS
>      LIBS=$_isl_saved_LIBS
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 2/2] [graphite] update required isl versions
  2015-12-11  9:42   ` Richard Biener
@ 2015-12-11 16:42     ` Sebastian Paul Pop
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Paul Pop @ 2015-12-11 16:42 UTC (permalink / raw)
  To: 'Richard Biener'
  Cc: 'Sebastian Pop', 'GCC Patches', hiraditya

Good points.
I will send an updated patch following all your recommendations.

Sebastian

-----Original Message-----
From: Richard Biener [mailto:richard.guenther@gmail.com] 
Sent: Friday, December 11, 2015 3:42 AM
To: Sebastian Pop
Cc: Sebastian Pop; GCC Patches; hiraditya@msn.com
Subject: Re: [PATCH 2/2] [graphite] update required isl versions

On Thu, Dec 10, 2015 at 6:05 PM, Sebastian Pop <s.pop@samsung.com> wrote:
> we now check the isl version, as there are no real differences in existing files
> in between isl 0.14 and isl 0.15.

I thought ISL 0.15 has some new features you could check?  Also using a run test
is bad for cross compiling.

I'd simply change the "compatible" test to check for isl_ctx_get_max_operations
or whatever is needed to implement the compute bound and not worry about
warning about using a deprecated ISL during configure.

Maybe add the ISL version to the list of dependency versions we print in
toplev.c:print_version.

Richard.

> ---
>  config/isl.m4 |  41 +++++++++++++++------
>  configure     | 112 ++++++++++++++++++++++++++++++++++++++++++++++++----------
>  2 files changed, 123 insertions(+), 30 deletions(-)
>
> diff --git a/config/isl.m4 b/config/isl.m4
> index 459fac1..886b0e4 100644
> --- a/config/isl.m4
> +++ b/config/isl.m4
> @@ -19,23 +19,23 @@
>
>  # ISL_INIT_FLAGS ()
>  # -------------------------
> -# Provide configure switches for ISL support.
> +# Provide configure switches for isl support.
>  # Initialize isllibs/islinc according to the user input.
>  AC_DEFUN([ISL_INIT_FLAGS],
>  [
>    AC_ARG_WITH([isl-include],
>      [AS_HELP_STRING(
>        [--with-isl-include=PATH],
> -      [Specify directory for installed ISL include files])])
> +      [Specify directory for installed isl include files])])
>    AC_ARG_WITH([isl-lib],
>      [AS_HELP_STRING(
>        [--with-isl-lib=PATH],
> -      [Specify the directory for the installed ISL library])])
> +      [Specify the directory for the installed isl library])])
>
>    AC_ARG_ENABLE(isl-version-check,
>      [AS_HELP_STRING(
>        [--disable-isl-version-check],
> -      [disable check for ISL version])],
> +      [disable check for isl version])],
>      ENABLE_ISL_CHECK=$enableval,
>      ENABLE_ISL_CHECK=yes)
>
> @@ -58,15 +58,15 @@ AC_DEFUN([ISL_INIT_FLAGS],
>    if test "x${with_isl_lib}" != x; then
>      isllibs="-L$with_isl_lib"
>    fi
> -  dnl If no --with-isl flag was specified and there is in-tree ISL
> +  dnl If no --with-isl flag was specified and there is in-tree isl
>    dnl source, set up flags to use that and skip any version tests
> -  dnl as we cannot run them before building ISL.
> +  dnl as we cannot run them before building isl.
>    if test "x${islinc}" = x && test "x${isllibs}" = x \
>       && test -d ${srcdir}/isl; then
>      isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
>      islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
>      ENABLE_ISL_CHECK=no
> -    AC_MSG_WARN([using in-tree ISL, disabling version check])
> +    AC_MSG_WARN([using in-tree isl, disabling version check])
>    fi
>
>    isllibs="${isllibs} -lisl"
> @@ -75,7 +75,7 @@ AC_DEFUN([ISL_INIT_FLAGS],
>
>  # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT)
>  # ----------------------------------------------------
> -# Provide actions for failed ISL detection.
> +# Provide actions for failed isl detection.
>  AC_DEFUN([ISL_REQUESTED],
>  [
>    AC_REQUIRE([ISL_INIT_FLAGS])
> @@ -106,12 +106,31 @@ AC_DEFUN([ISL_CHECK_VERSION],
>      LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
>      LIBS="${_isl_saved_LIBS} -lisl"
>
> -    AC_MSG_CHECKING([for compatible ISL])
> -    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])],
> +    AC_MSG_CHECKING([for recommended isl 0.15])
> +    AC_TRY_RUN([#include <isl/stdint.h>
> +                #include <string.h>
> +                int main() {
> +                  if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8))
> +                    return 1;
> +                  return 0;
> +                }],
>         [gcc_cv_isl=yes],
> -       [gcc_cv_isl=no])
> +       [gcc_cv_isl=no], [gcc_cv_isl=no])
>      AC_MSG_RESULT([$gcc_cv_isl])
>
> +    if test "${gcc_cv_isl}" = no ; then
> +       AC_MSG_CHECKING([for deprecated isl 0.14])
> +       AC_TRY_RUN([#include <isl/stdint.h>
> +                   #include <string.h>
> +                   int main() {
> +                     if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8))
> +                       return 1;
> +                     return 0;
> +                   }],
> +       [gcc_cv_isl=yes],
> +       [gcc_cv_isl=no], [gcc_cv_isl=no])
> +        AC_MSG_RESULT([$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated])
> +    fi
>      CFLAGS=$_isl_saved_CFLAGS
>      LDFLAGS=$_isl_saved_LDFLAGS
>      LIBS=$_isl_saved_LIBS
> diff --git a/configure b/configure
> index 090615f..4284ba7 100755
> --- a/configure
> +++ b/configure
> @@ -1492,7 +1492,7 @@ Optional Features:
>                            build static libjava [default=no]
>    --enable-bootstrap      enable bootstrapping [yes if native build]
>    --disable-isl-version-check
> -                          disable check for ISL version
> +                          disable check for isl version
>    --enable-lto            enable link time optimization support
>    --enable-linker-plugin-configure-flags=FLAGS
>                            additional flags for configuring linker plugins
> @@ -1553,8 +1553,8 @@ Optional Packages:
>                            package. Equivalent to
>                            --with-isl-include=PATH/include plus
>                            --with-isl-lib=PATH/lib
> -  --with-isl-include=PATH Specify directory for installed ISL include files
> -  --with-isl-lib=PATH     Specify the directory for the installed ISL library
> +  --with-isl-include=PATH Specify directory for installed isl include files
> +  --with-isl-lib=PATH     Specify the directory for the installed isl library
>    --with-build-sysroot=SYSROOT
>                            use sysroot as the system root during the build
>    --with-debug-prefix-map='A=B C=D ...'
> @@ -1879,6 +1879,48 @@ fi
>    return $ac_retval
>
>  } # ac_fn_c_try_link
> +
> +# ac_fn_c_try_run LINENO
> +# ----------------------
> +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
> +# that executables *can* be run.
> +ac_fn_c_try_run ()
> +{
> +  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
> +  if { { ac_try="$ac_link"
> +case "(($ac_try" in
> +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
> +  *) ac_try_echo=$ac_try;;
> +esac
> +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
> +$as_echo "$ac_try_echo"; } >&5
> +  (eval "$ac_link") 2>&5
> +  ac_status=$?
> +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
> +  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
> +  { { case "(($ac_try" in
> +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
> +  *) ac_try_echo=$ac_try;;
> +esac
> +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
> +$as_echo "$ac_try_echo"; } >&5
> +  (eval "$ac_try") 2>&5
> +  ac_status=$?
> +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
> +  test $ac_status = 0; }; }; then :
> +  ac_retval=0
> +else
> +  $as_echo "$as_me: program exited with status $ac_status" >&5
> +       $as_echo "$as_me: failed program was:" >&5
> +sed 's/^/| /' conftest.$ac_ext >&5
> +
> +       ac_retval=$ac_status
> +fi
> +  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
> +  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
> +  return $ac_retval
> +
> +} # ac_fn_c_try_run
>  cat >config.log <<_ACEOF
>  This file contains any messages produced by compilers while
>  running configure, to aid debugging if configure makes a mistake.
> @@ -6003,8 +6045,8 @@ fi
>      isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' '
>      islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include'
>      ENABLE_ISL_CHECK=no
> -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree ISL, disabling version check" >&5
> -$as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using in-tree isl, disabling version check" >&5
> +$as_echo "$as_me: WARNING: using in-tree isl, disabling version check" >&2;}
>    fi
>
>    isllibs="${isllibs} -lisl"
> @@ -6020,29 +6062,61 @@ $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
>      LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
>      LIBS="${_isl_saved_LIBS} -lisl"
>
> -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible ISL" >&5
> -$as_echo_n "checking for compatible ISL... " >&6; }
> -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recommended isl 0.15" >&5
> +$as_echo_n "checking for recommended isl 0.15... " >&6; }
> +    if test "$cross_compiling" = yes; then :
> +  gcc_cv_isl=no
> +else
> +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
> -#include <isl/val.h>
> -int
> -main ()
> -{
> -;
> -  ;
> -  return 0;
> -}
> +#include <isl/stdint.h>
> +                #include <string.h>
> +                int main() {
> +                  if (strncmp (_GENERATED_STDINT_H, "isl 0.15", 8))
> +                    return 1;
> +                  return 0;
> +                }
>  _ACEOF
> -if ac_fn_c_try_link "$LINENO"; then :
> +if ac_fn_c_try_run "$LINENO"; then :
>    gcc_cv_isl=yes
>  else
>    gcc_cv_isl=no
>  fi
> -rm -f core conftest.err conftest.$ac_objext \
> -    conftest$ac_exeext conftest.$ac_ext
> +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
> +  conftest.$ac_objext conftest.beam conftest.$ac_ext
> +fi
> +
>      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl" >&5
>  $as_echo "$gcc_cv_isl" >&6; }
>
> +    if test "${gcc_cv_isl}" = no ; then
> +       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deprecated isl 0.14" >&5
> +$as_echo_n "checking for deprecated isl 0.14... " >&6; }
> +       if test "$cross_compiling" = yes; then :
> +  gcc_cv_isl=no
> +else
> +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +/* end confdefs.h.  */
> +#include <isl/stdint.h>
> +                   #include <string.h>
> +                   int main() {
> +                     if (strncmp (_GENERATED_STDINT_H, "isl 0.14", 8))
> +                       return 1;
> +                     return 0;
> +                   }
> +_ACEOF
> +if ac_fn_c_try_run "$LINENO"; then :
> +  gcc_cv_isl=yes
> +else
> +  gcc_cv_isl=no
> +fi
> +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
> +  conftest.$ac_objext conftest.beam conftest.$ac_ext
> +fi
> +
> +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&5
> +$as_echo "$gcc_cv_isl, recommended isl version is 0.15, minimum required isl version 0.14 is deprecated" >&6; }
> +    fi
>      CFLAGS=$_isl_saved_CFLAGS
>      LDFLAGS=$_isl_saved_LDFLAGS
>      LIBS=$_isl_saved_LIBS
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-11 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 17:05 [PATCH 1/2] [graphite] document minimal required version for isl Sebastian Pop
2015-12-10 17:05 ` [PATCH 2/2] [graphite] update required isl versions Sebastian Pop
2015-12-11  9:42   ` Richard Biener
2015-12-11 16:42     ` Sebastian Paul Pop
2015-12-11  9:30 ` [PATCH 1/2] [graphite] document minimal required version for isl Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).