diff mbox

Fix broken Canadian when checking isl library support

Message ID 20140825210748.GA19958@instance-1.c.bardezibar.internal
State New
Headers show

Commit Message

Sebastian Pop Aug. 25, 2014, 9:07 p.m. UTC
Sebastian Pop wrote:
> Richard Biener wrote:
> > I think it would be better to identify a set of features we rely on that
> > are not present in earlier versions and make the test a link
> > test unconditionally.
> > 
> > Tobias, are there include files / types / functions we require
> > that are not available in earlier versions?
> 
> The version 0.12 of ISL has an include file isl/val.h that is not present in
> previous versions of ISL.
> 
> There also was a patch from Mircea a few weeks ago that was missing the
> configure bits to check that the isl version contained isl/val.h.
> I will update both patches and submit for review.

I see that Mircea's patch has been committed:

commit c5ec3cc336c7d42d9ad2995395d430b99a9a34cc
Author: mircea <mircea@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Aug 11 15:05:48 2014 +0000

    Replacement of isl_int by isl_val
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213816 138bc75d-0d04-0410-961f-82ee72b054a4

Attached a patch to check for isl/val.h instead of ISL's release number.

Bootstrapping on x86-64. Ok to commit?

Thanks,
Sebastian

Comments

Richard Biener Aug. 26, 2014, 8:46 a.m. UTC | #1
On Mon, Aug 25, 2014 at 11:07 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> Sebastian Pop wrote:
>> Richard Biener wrote:
>> > I think it would be better to identify a set of features we rely on that
>> > are not present in earlier versions and make the test a link
>> > test unconditionally.
>> >
>> > Tobias, are there include files / types / functions we require
>> > that are not available in earlier versions?
>>
>> The version 0.12 of ISL has an include file isl/val.h that is not present in
>> previous versions of ISL.
>>
>> There also was a patch from Mircea a few weeks ago that was missing the
>> configure bits to check that the isl version contained isl/val.h.
>> I will update both patches and submit for review.
>
> I see that Mircea's patch has been committed:
>
> commit c5ec3cc336c7d42d9ad2995395d430b99a9a34cc
> Author: mircea <mircea@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date:   Mon Aug 11 15:05:48 2014 +0000
>
>     Replacement of isl_int by isl_val
>
>     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213816 138bc75d-0d04-0410-961f-82ee72b054a4
>
> Attached a patch to check for isl/val.h instead of ISL's release number.
>
> Bootstrapping on x86-64. Ok to commit?

Ok.  I suppose the "checking for version 0.12 of ISL" is now slightly
misleading - maybe change it to "checking for compatible ISL"?

Thanks,
Richard.

> Thanks,
> Sebastian
Bin.Cheng Aug. 26, 2014, 8:59 a.m. UTC | #2
On Tue, Aug 26, 2014 at 4:46 PM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Mon, Aug 25, 2014 at 11:07 PM, Sebastian Pop <sebpop@gmail.com> wrote:
>> Sebastian Pop wrote:
>>> Richard Biener wrote:
>>> > I think it would be better to identify a set of features we rely on that
>>> > are not present in earlier versions and make the test a link
>>> > test unconditionally.
>>> >
>>> > Tobias, are there include files / types / functions we require
>>> > that are not available in earlier versions?
>>>
>>> The version 0.12 of ISL has an include file isl/val.h that is not present in
>>> previous versions of ISL.
>>>
>>> There also was a patch from Mircea a few weeks ago that was missing the
>>> configure bits to check that the isl version contained isl/val.h.
>>> I will update both patches and submit for review.
>>
>> I see that Mircea's patch has been committed:
>>
>> commit c5ec3cc336c7d42d9ad2995395d430b99a9a34cc
>> Author: mircea <mircea@138bc75d-0d04-0410-961f-82ee72b054a4>
>> Date:   Mon Aug 11 15:05:48 2014 +0000
>>
>>     Replacement of isl_int by isl_val
>>
>>     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213816 138bc75d-0d04-0410-961f-82ee72b054a4
>>
>> Attached a patch to check for isl/val.h instead of ISL's release number.
>>
>> Bootstrapping on x86-64. Ok to commit?
>
> Ok.  I suppose the "checking for version 0.12 of ISL" is now slightly
> misleading - maybe change it to "checking for compatible ISL"?

Is the interface between isl/gcc stable enough?  If it's not, the work
"compatible" is definitely confusing for users who don't know isl like
me.  If it is stable, it won't be a problem.

Thanks,
bin
>
> Thanks,
> Richard.
>
>> Thanks,
>> Sebastian
Sebastian Pop Aug. 28, 2014, 4:46 p.m. UTC | #3
Richard Biener wrote:
> On Mon, Aug 25, 2014 at 11:07 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> > Sebastian Pop wrote:
> >> Richard Biener wrote:
> >> > I think it would be better to identify a set of features we rely on that
> >> > are not present in earlier versions and make the test a link
> >> > test unconditionally.
> >> >
> >> > Tobias, are there include files / types / functions we require
> >> > that are not available in earlier versions?
> >>
> >> The version 0.12 of ISL has an include file isl/val.h that is not present in
> >> previous versions of ISL.
> >>
> >> There also was a patch from Mircea a few weeks ago that was missing the
> >> configure bits to check that the isl version contained isl/val.h.
> >> I will update both patches and submit for review.
> >
> > I see that Mircea's patch has been committed:
> >
> > commit c5ec3cc336c7d42d9ad2995395d430b99a9a34cc
> > Author: mircea <mircea@138bc75d-0d04-0410-961f-82ee72b054a4>
> > Date:   Mon Aug 11 15:05:48 2014 +0000
> >
> >     Replacement of isl_int by isl_val
> >
> >     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213816 138bc75d-0d04-0410-961f-82ee72b054a4
> >
> > Attached a patch to check for isl/val.h instead of ISL's release number.
> >
> > Bootstrapping on x86-64. Ok to commit?
> 
> Ok.  I suppose the "checking for version 0.12 of ISL" is now slightly
> misleading - maybe change it to "checking for compatible ISL"?

Committed r214683 with the suggested change.
Sebastian Pop Aug. 28, 2014, 4:55 p.m. UTC | #4
Bin.Cheng wrote:
> Is the interface between isl/gcc stable enough?  If it's not, the work
> "compatible" is definitely confusing for users who don't know isl like
> me.  If it is stable, it won't be a problem.

The required version of ISL is documented in GCC's doc/install.texi:

----
@item ISL Library version 0.12.2

Necessary to build GCC with the Graphite loop optimizations.
It can be downloaded from @uref{ftp://gcc.gnu.org/pub/gcc/infrastructure/}
as @file{isl-0.12.2.tar.bz2}.
----

The required version of ISL will most likely evolve with time, and will be
updated whenever new ISL functionality will be needed in graphite.

Sebastian
diff mbox

Patch

From 03ca0abce2a8f76aa7e935567d4ce6f1953ed1bf Mon Sep 17 00:00:00 2001
From: Sebastian Pop <sebpop@gmail.com>
Date: Mon, 25 Aug 2014 20:55:09 +0000
Subject: [PATCH] check functionality of isl version 0.12

	* config/isl.m4 (_ISL_CHECK_CT_PROG): Removed.
	(ISL_CHECK_VERSION): Check for functionality added to ISL 0.12 instead
	of checking for version number.
	* configure: Regenerated.
        * configure.ac (ISL_CHECK_VERSION): Do not use ISL version number.
---
 config/isl.m4 |   27 +++++---------------
 configure     |   79 +++------------------------------------------------------
 configure.ac  |    2 +-
 3 files changed, 11 insertions(+), 97 deletions(-)

diff --git a/config/isl.m4 b/config/isl.m4
index 57ae3c5..e940f10 100644
--- a/config/isl.m4
+++ b/config/isl.m4
@@ -93,20 +93,9 @@  AC_DEFUN([ISL_REQUESTED],
 ]
 )
 
-# _ISL_CHECK_CT_PROG(MAJOR, MINOR)
-# --------------------------------------------
-# Helper for verifying ISL compile time version.
-m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM(
-  [#include <isl/version.h>
-   #include <string.h>],
-  [if (strncmp (isl_version (), "isl-$1.$2", strlen ("isl-$1.$2")) != 0)
-     return 1;
-   ])])
-
-# ISL_CHECK_VERSION ISL_CHECK_VERSION (MAJOR, MINOR)
+# ISL_CHECK_VERSION ISL_CHECK_VERSION ()
 # ----------------------------------------------------------------
-# Test the found ISL to be exact of version MAJOR.MINOR and at least
-# REVISION.
+# Test that ISL contains functionality added to the minimum expected version.
 AC_DEFUN([ISL_CHECK_VERSION],
 [
   if test "${ENABLE_ISL_CHECK}" = yes ; then
@@ -118,15 +107,11 @@  AC_DEFUN([ISL_CHECK_VERSION],
     LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}"
     LIBS="${_isl_saved_LIBS} -lisl"
 
-    AC_MSG_CHECKING([for version $1.$2 of ISL])
-    AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
+    AC_MSG_CHECKING([for version 0.12 of ISL])
+    # isl/val.h has first been added to ISL in 0.12.
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <isl/val.h>]], [[;]])],
 	[gcc_cv_isl=yes],
-	[gcc_cv_isl=no],
-	[
-	  AC_LINK_IFELSE([_ISL_CHECK_CT_PROG($1,$2)],
-	      [gcc_cv_isl=yes],
-	      [gcc_cv_isl=no])
-	])
+	[gcc_cv_isl=no])
     AC_MSG_RESULT([$gcc_cv_isl])
 
     CFLAGS=$_isl_saved_CFLAGS
diff --git a/configure b/configure
index c292b09..5941821 100755
--- a/configure
+++ b/configure
@@ -1874,48 +1874,6 @@  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.
@@ -5906,18 +5864,14 @@  $as_echo "$as_me: WARNING: using in-tree ISL, disabling version check" >&2;}
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.12 of ISL" >&5
 $as_echo_n "checking for version 0.12 of ISL... " >&6; }
-    if test "$cross_compiling" = yes; then :
-
-	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    # isl/val.h has first been added to ISL in 0.12.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <isl/version.h>
-   #include <string.h>
+#include <isl/val.h>
 int
 main ()
 {
-if (strncmp (isl_version (), "isl-0.12", strlen ("isl-0.12")) != 0)
-     return 1;
-
+;
   ;
   return 0;
 }
@@ -5929,31 +5883,6 @@  else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <isl/version.h>
-   #include <string.h>
-int
-main ()
-{
-if (strncmp (isl_version (), "isl-0.12", strlen ("isl-0.12")) != 0)
-     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" >&5
 $as_echo "$gcc_cv_isl" >&6; }
 
diff --git a/configure.ac b/configure.ac
index 8f747d6..2dc657f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1652,7 +1652,7 @@  if test "x$with_isl" != "xno"; then
   dnl with user input.
   ISL_INIT_FLAGS
   dnl The versions of ISL that work for Graphite
-  ISL_CHECK_VERSION(0,12)
+  ISL_CHECK_VERSION()
   dnl Only execute fail-action, if ISL has been requested.
   ISL_IF_FAILED([
     AC_MSG_ERROR([Unable to find a usable ISL.  See config.log for details.])])
-- 
1.7.10.4