Patchwork Support official CLooG.org versions.

login
register
mail settings
Submitter Tobias Grosser
Date Nov. 12, 2010, 8:15 p.m.
Message ID <4CDDA07E.4080206@fim.uni-passau.de>
Download mbox | patch
Permalink /patch/71012/
State New
Headers show

Comments

Tobias Grosser - Nov. 12, 2010, 8:15 p.m.
On 11/12/2010 12:06 PM, Paolo Bonzini wrote:
> On 11/12/2010 05:14 PM, Tobias Grosser wrote:
>> CLooG isl will in some cases generate different code. This is why we
>> currently have support for both CLooG versions. Our first tests did not
>> show any new SPEC suite failures, but we still want to run more tests
>> with different optimization flags and on even more platforms. We push
>> that patch upstream, such that people like Jack can test CLooG with
>> CLooG-isl on their platform. (Even if it was not intended they hit such
>> a simple configure bug)
>
> Yes, the bug that Jack found is not a major problem.
>
> The main problem is the different generated code; in particular, it's
> not about failures, _any_ assembly code difference resulting from the
> same configure options is problematic. Can you make a patch to ensure
> that only one backend is sought for, depending on the user's choice
> between --enable-cloog-backend=ppl and --enable-cloog-backend=isl (you
> choose the default)?
>
> To some extent, this is unavoidable when we are delegating optimization
> choices to an external library, but we should minimize the differences.
> It is probably necessary to have the version of cloog (and its
> dependencies whenever applicable) printed as part of the output of "gcc
> --version".
>
> Still, the patch is okay. :)

Thanks Paolo,

I committed this patch and propose two more.

* Use a CLooG header macro to check for the PPL Legacy backend

Without that patch the PPL Legacy backend may be detected, even if only 
includes of CLooG ORG are in the path, but the cloog-ppl library is 
still in the system library directory.

* Addition of --enable-cloog-backend

Implemented as you suggested. Now by default we use
--enable-cloog-backend=ppl-legacy
All other CLooG backends will fail configure. To use another backend 
this has to be defined explicitly by setting --enable-cloog-backend=isl 
or --enable-cloog-backend=ppl

Could you have a look?

Thanks for your help
Tobi
Jack Howarth - Nov. 12, 2010, 8:39 p.m.
On Fri, Nov 12, 2010 at 03:15:58PM -0500, Tobias Grosser wrote:
> On 11/12/2010 12:06 PM, Paolo Bonzini wrote:
>> On 11/12/2010 05:14 PM, Tobias Grosser wrote:
>>> CLooG isl will in some cases generate different code. This is why we
>>> currently have support for both CLooG versions. Our first tests did not
>>> show any new SPEC suite failures, but we still want to run more tests
>>> with different optimization flags and on even more platforms. We push
>>> that patch upstream, such that people like Jack can test CLooG with
>>> CLooG-isl on their platform. (Even if it was not intended they hit such
>>> a simple configure bug)
>>
>> Yes, the bug that Jack found is not a major problem.
>>
>> The main problem is the different generated code; in particular, it's
>> not about failures, _any_ assembly code difference resulting from the
>> same configure options is problematic. Can you make a patch to ensure
>> that only one backend is sought for, depending on the user's choice
>> between --enable-cloog-backend=ppl and --enable-cloog-backend=isl (you
>> choose the default)?
>>
>> To some extent, this is unavoidable when we are delegating optimization
>> choices to an external library, but we should minimize the differences.
>> It is probably necessary to have the version of cloog (and its
>> dependencies whenever applicable) printed as part of the output of "gcc
>> --version".
>>
>> Still, the patch is okay. :)
>
> Thanks Paolo,
>
> I committed this patch and propose two more.
>
> * Use a CLooG header macro to check for the PPL Legacy backend
>
> Without that patch the PPL Legacy backend may be detected, even if only  
> includes of CLooG ORG are in the path, but the cloog-ppl library is  
> still in the system library directory.
>
> * Addition of --enable-cloog-backend
>
> Implemented as you suggested. Now by default we use
> --enable-cloog-backend=ppl-legacy
> All other CLooG backends will fail configure. To use another backend  
> this has to be defined explicitly by setting --enable-cloog-backend=isl  
> or --enable-cloog-backend=ppl
>
> Could you have a look?
>
> Thanks for your help
> Tobi

Tobi,
   I am still a tad concerned about the ABI change between ppl 0.10.x and
0.11. Is it certain that, for the combination of FSF gcc built against ppl 0.11
and cloog-ppl built against ppl 0.10.x, there are no ppl data structures
passed on the cloog calls between graphite and cloog? If not, might there
be issues if the ABI changes in ppl impacted those data structures?
                   Jack


> >From 1d5413fd2ee94d8030bb3e2388c808a7b0dcbfa3 Mon Sep 17 00:00:00 2001
> From: Tobias Grosser <grosser@fim.uni-passau.de>
> Date: Fri, 12 Nov 2010 13:16:56 -0500
> Subject: [PATCH 1/3] * config/cloog.m4: Use CLooG predefined macro to check for CLooG PPL. * configure: regenerate
> 
> ---
>  config/cloog.m4 |   13 +++++++------
>  configure       |   15 ++++++++-------
>  2 files changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/config/cloog.m4 b/config/cloog.m4
> index a44aac4..6ed0f1b 100644
> --- a/config/cloog.m4
> +++ b/config/cloog.m4
> @@ -91,15 +91,17 @@ AC_DEFUN([CLOOG_REQUESTED],
>  # ------------------
>  # Helper for detecting CLooG.org's backend.
>  m4_define([_CLOOG_ORG_PROG],[AC_LANG_PROGRAM(
> -  [#include <cloog/cloog.h>],
> +  [#include "cloog/cloog.h"],
>    [cloog_version ()])])
>  
>  # _CLOOG_PPL_LEGACY_PROG ()
>  # -------------------------
>  # Helper for detecting CLooG-Legacy (CLooG-PPL).
>  m4_define([_CLOOG_PPL_LEGACY_PROG], [AC_LANG_PROGRAM(
> -  [#include <cloog/cloog.h>],
> -  [ppl_version_major ()])])
> +  [#include "cloog/cloog.h"],
> +  [#ifndef CLOOG_PPL_BACKEND
> +    choke me
> +   #endif ])])
>  
>  # CLOOG_FIND_FLAGS ()
>  # ------------------
> @@ -114,12 +116,11 @@ AC_DEFUN([CLOOG_FIND_FLAGS],
>    _cloog_saved_LDFLAGS=$LDFLAGS
>    _cloog_saved_LIBS=$LIBS
>  
> -  _clooglegacyinc="-DCLOOG_PPL_BACKEND"
>    _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
>   
>    dnl clooglibs & clooginc may have been initialized by CLOOG_INIT_FLAGS.
>    CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
> -  CPPFLAGS="${CPPFLAGS} ${_clooglegacyinc} ${_cloogorginc}"
> +  CPPFLAGS="${CPPFLAGS} ${_cloogorginc}"
>    LDFLAGS="${LDFLAGS} ${clooglibs} ${ppllibs}"
>  
>    AC_CACHE_CHECK([for installed CLooG],
> @@ -137,7 +138,7 @@ AC_DEFUN([CLOOG_FIND_FLAGS],
>  
>    case $gcc_cv_cloog_type in
>      "PPL Legacy")
> -      clooginc="${clooginc} ${_clooglegacyinc}"
> +      clooginc="${clooginc}"
>        clooglibs="${clooglibs} -lcloog"
>        cloog_org=no
>        ;;
> diff --git a/configure b/configure
> index dcb582f..0e4f1ed 100755
> --- a/configure
> +++ b/configure
> @@ -5725,11 +5725,10 @@ if test "x$with_cloog" != "xno"; then
>    _cloog_saved_LDFLAGS=$LDFLAGS
>    _cloog_saved_LIBS=$LIBS
>  
> -  _clooglegacyinc="-DCLOOG_PPL_BACKEND"
>    _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
>  
>      CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
> -  CPPFLAGS="${CPPFLAGS} ${_clooglegacyinc} ${_cloogorginc}"
> +  CPPFLAGS="${CPPFLAGS} ${_cloogorginc}"
>    LDFLAGS="${LDFLAGS} ${clooglibs} ${ppllibs}"
>  
>    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG" >&5
> @@ -5740,11 +5739,13 @@ else
>    LIBS="-lcloog ${_cloog_saved_LIBS}"
>       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
> -#include <cloog/cloog.h>
> +#include "cloog/cloog.h"
>  int
>  main ()
>  {
> -ppl_version_major ()
> +#ifndef CLOOG_PPL_BACKEND
> +    choke me
> +   #endif
>    ;
>    return 0;
>  }
> @@ -5755,7 +5756,7 @@ else
>    LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
>         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
> -#include <cloog/cloog.h>
> +#include "cloog/cloog.h"
>  int
>  main ()
>  {
> @@ -5770,7 +5771,7 @@ else
>    LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
>           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
> -#include <cloog/cloog.h>
> +#include "cloog/cloog.h"
>  int
>  main ()
>  {
> @@ -5798,7 +5799,7 @@ $as_echo "$gcc_cv_cloog_type" >&6; }
>  
>    case $gcc_cv_cloog_type in
>      "PPL Legacy")
> -      clooginc="${clooginc} ${_clooglegacyinc}"
> +      clooginc="${clooginc}"
>        clooglibs="${clooglibs} -lcloog"
>        cloog_org=no
>        ;;
> -- 
> 1.7.1
> 

> >From 8b8b33ade1658dc2e0dc660cccd66f6f0aa18e72 Mon Sep 17 00:00:00 2001
> From: Tobias Grosser <grosser@fim.uni-passau.de>
> Date: Fri, 12 Nov 2010 13:08:54 -0500
> Subject: [PATCH 3/3] Add -enable-cloog-backend.
> 
> 	* config/cloog.m4: Add -enable-cloog-backend=(isl|ppl|ppl-legacy) to
> 	define the cloog backend to use. Furthermore, only pass the ppllibs
> 	to the configure checks, if necessary.
> 	*configure: Regenerate.
> ---
>  config/cloog.m4 |   74 +++++++++++++++++++++++++++++++++++-------------
>  configure       |   85 ++++++++++++++++++++++++++++++++++++++++++++-----------
>  2 files changed, 122 insertions(+), 37 deletions(-)
> 
> diff --git a/config/cloog.m4 b/config/cloog.m4
> index 6ed0f1b..4936e8a 100644
> --- a/config/cloog.m4
> +++ b/config/cloog.m4
> @@ -36,7 +36,19 @@ AC_DEFUN([CLOOG_INIT_FLAGS],
>      [AS_HELP_STRING(
>        [--with-cloog-lib=PATH],
>        [Specify the directory for the installed CLooG library])])
> -  
> +
> +  AC_ARG_ENABLE(cloog-backend,
> +    [  --enable-cloog-backend[=backend]
> +				isl: The cloog.org isl backend
> +				ppl-legacy: The legacy ppl backend - default
> +				ppl: The cloog.org ppl backend],
> +    [ if   test "x${enableval}" = "xisl"; then
> +	cloog_backend=isl
> +      elif test "x${enableval}" = "xppl"; then
> +	cloog_backend=ppl
> +      else
> +	cloog_backend=ppl-legacy
> +      fi], cloog_backend=ppl-legacy)
>    AC_ARG_ENABLE(cloog-version-check,
>      [AS_HELP_STRING(
>        [--disable-cloog-version-check],
> @@ -87,11 +99,19 @@ AC_DEFUN([CLOOG_REQUESTED],
>  ]
>  )
>  
> -# _CLOOG_ORG_PROG ()
> +# _CLOOG_ORG_PROG_ISL ()
>  # ------------------
> -# Helper for detecting CLooG.org's backend.
> -m4_define([_CLOOG_ORG_PROG],[AC_LANG_PROGRAM(
> -  [#include "cloog/cloog.h"],
> +# Helper for detecting CLooG.org's ISL backend.
> +m4_define([_CLOOG_ORG_PROG_ISL],[AC_LANG_PROGRAM(
> +  [#include "cloog/cloog.h" ],
> +  [cloog_version ()])])
> +
> +# _CLOOG_ORG_PROG_PPL ()
> +# ------------------
> +# Helper for detecting CLooG.org's PPL backend.
> +m4_define([_CLOOG_ORG_PROG_PPL],[AC_LANG_PROGRAM(
> +  [#include "cloog/cloog.h"
> +   #include "cloog/ppl/cloog.h"],
>    [cloog_version ()])])
>  
>  # _CLOOG_PPL_LEGACY_PROG ()
> @@ -106,7 +126,7 @@ m4_define([_CLOOG_PPL_LEGACY_PROG], [AC_LANG_PROGRAM(
>  # CLOOG_FIND_FLAGS ()
>  # ------------------
>  # Detect the used CLooG-backend and set clooginc/clooglibs/cloog_org.
> -# Preference: CLooG-PPL (Legacy) > CLooG-ISL > CLooG-PPL
> +# Only look for the CLooG backend type specified in --enable-cloog-backend
>  AC_DEFUN([CLOOG_FIND_FLAGS],
>  [
>    AC_REQUIRE([CLOOG_INIT_FLAGS])
> @@ -119,22 +139,36 @@ AC_DEFUN([CLOOG_FIND_FLAGS],
>    _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
>   
>    dnl clooglibs & clooginc may have been initialized by CLOOG_INIT_FLAGS.
> -  CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
> +  CFLAGS="${CFLAGS} ${clooginc} ${gmpinc}"
>    CPPFLAGS="${CPPFLAGS} ${_cloogorginc}"
> -  LDFLAGS="${LDFLAGS} ${clooglibs} ${ppllibs}"
> -
> -  AC_CACHE_CHECK([for installed CLooG],
> -                 [gcc_cv_cloog_type],
> -    [LIBS="-lcloog ${_cloog_saved_LIBS}"
> -     AC_LINK_IFELSE([_CLOOG_PPL_LEGACY_PROG],
> -      [gcc_cv_cloog_type="PPL Legacy"],
> -      [LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
> -       AC_LINK_IFELSE([_CLOOG_ORG_PROG],
> -        [gcc_cv_cloog_type=ISL],
> -        [LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
> -         AC_LINK_IFELSE([_CLOOG_ORG_PROG],
> -          [gcc_cv_cloog_type=PPL],
> -          [gcc_cv_cloog_type=no])])])])
> +  LDFLAGS="${LDFLAGS} ${clooglibs}"
> +
> +  case $cloog_backend in
> +    "ppl-legacy")
> +    CFLAGS="${CFLAGS} ${pplinc}"
> +    LDFLAGS="${LDFLAGS} ${ppllibs}"
> +    AC_CACHE_CHECK([for installed CLooG PPL Legacy], [gcc_cv_cloog_type],
> +      [LIBS="-lcloog ${_cloog_saved_LIBS}"
> +      AC_LINK_IFELSE([_CLOOG_PPL_LEGACY_PROG], [gcc_cv_cloog_type="PPL Legacy"],
> +		     [gcc_cv_cloog_type=no])])
> +    ;;
> +    "isl")
> +    AC_CACHE_CHECK([for installed CLooG ISL], [gcc_cv_cloog_type],
> +      [LIBS="-lcloog-isl ${_cloog_saved_LIBS}"
> +      AC_LINK_IFELSE([_CLOOG_ORG_PROG_ISL], [gcc_cv_cloog_type="ISL"],
> +		     [gcc_cv_cloog_type=no])])
> +    ;;
> +    "ppl")
> +    CFLAGS="${CFLAGS} ${pplinc}"
> +    LDFLAGS="${LDFLAGS} ${ppllibs}"
> +    AC_CACHE_CHECK([for installed CLooG PPL], [gcc_cv_cloog_type],
> +      [LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
> +      AC_LINK_IFELSE([_CLOOG_ORG_PROG_PPL], [gcc_cv_cloog_type="PPL"],
> +		     [gcc_cv_cloog_type=no])])
> +    ;;
> +    *)
> +      gcc_cv_cloog_type=""
> +  esac
>  
>    case $gcc_cv_cloog_type in
>      "PPL Legacy")
> diff --git a/configure b/configure
> index 0e4f1ed..bcc087b 100755
> --- a/configure
> +++ b/configure
> @@ -765,6 +765,7 @@ enable_ppl_version_check
>  with_cloog
>  with_cloog_include
>  with_cloog_lib
> +enable_cloog_backend
>  enable_cloog_version_check
>  enable_lto
>  enable_stage1_languages
> @@ -1451,6 +1452,10 @@ Optional Features:
>    --enable-libssp         build libssp directory
>    --enable-build-with-cxx build with C++ compiler instead of C compiler
>    --disable-ppl-version-check    disable check for PPL version
> +  --enable-cloog-backend=backend
> +				isl: The cloog.org isl backend
> +				ppl-legacy: The legacy ppl backend - default
> +				ppl: The cloog.org ppl backend
>    --disable-cloog-version-check
>                            disable check for CLooG version
>    --enable-lto            enable link time optimization support
> @@ -5676,6 +5681,19 @@ if test "${with_cloog_lib+set}" = set; then :
>  fi
>  
>  
> +  # Check whether --enable-cloog-backend was given.
> +if test "${enable_cloog_backend+set}" = set; then :
> +  enableval=$enable_cloog_backend;  if   test "x${enableval}" = "xisl"; then
> +	cloog_backend=isl
> +      elif test "x${enableval}" = "xppl"; then
> +	cloog_backend=ppl
> +      else
> +	cloog_backend=ppl-legacy
> +      fi
> +else
> +  cloog_backend=ppl-legacy
> +fi
> +
>    # Check whether --enable-cloog-version-check was given.
>  if test "${enable_cloog_version_check+set}" = set; then :
>    enableval=$enable_cloog_version_check; ENABLE_CLOOG_CHECK=$enableval
> @@ -5727,17 +5745,21 @@ if test "x$with_cloog" != "xno"; then
>  
>    _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
>  
> -    CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
> +    CFLAGS="${CFLAGS} ${clooginc} ${gmpinc}"
>    CPPFLAGS="${CPPFLAGS} ${_cloogorginc}"
> -  LDFLAGS="${LDFLAGS} ${clooglibs} ${ppllibs}"
> -
> -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG" >&5
> -$as_echo_n "checking for installed CLooG... " >&6; }
> +  LDFLAGS="${LDFLAGS} ${clooglibs}"
> +
> +  case $cloog_backend in
> +    "ppl-legacy")
> +    CFLAGS="${CFLAGS} ${pplinc}"
> +    LDFLAGS="${LDFLAGS} ${ppllibs}"
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG PPL Legacy" >&5
> +$as_echo_n "checking for installed CLooG PPL Legacy... " >&6; }
>  if test "${gcc_cv_cloog_type+set}" = set; then :
>    $as_echo_n "(cached) " >&6
>  else
>    LIBS="-lcloog ${_cloog_saved_LIBS}"
> -     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
>  #include "cloog/cloog.h"
>  int
> @@ -5753,8 +5775,22 @@ _ACEOF
>  if ac_fn_c_try_link "$LINENO"; then :
>    gcc_cv_cloog_type="PPL Legacy"
>  else
> -  LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
> -       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +  gcc_cv_cloog_type=no
> +fi
> +rm -f core conftest.err conftest.$ac_objext \
> +    conftest$ac_exeext conftest.$ac_ext
> +fi
> +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
> +$as_echo "$gcc_cv_cloog_type" >&6; }
> +    ;;
> +    "isl")
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG ISL" >&5
> +$as_echo_n "checking for installed CLooG ISL... " >&6; }
> +if test "${gcc_cv_cloog_type+set}" = set; then :
> +  $as_echo_n "(cached) " >&6
> +else
> +  LIBS="-lcloog-isl ${_cloog_saved_LIBS}"
> +      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
>  #include "cloog/cloog.h"
>  int
> @@ -5766,12 +5802,29 @@ cloog_version ()
>  }
>  _ACEOF
>  if ac_fn_c_try_link "$LINENO"; then :
> -  gcc_cv_cloog_type=ISL
> +  gcc_cv_cloog_type="ISL"
> +else
> +  gcc_cv_cloog_type=no
> +fi
> +rm -f core conftest.err conftest.$ac_objext \
> +    conftest$ac_exeext conftest.$ac_ext
> +fi
> +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
> +$as_echo "$gcc_cv_cloog_type" >&6; }
> +    ;;
> +    "ppl")
> +    CFLAGS="${CFLAGS} ${pplinc}"
> +    LDFLAGS="${LDFLAGS} ${ppllibs}"
> +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG PPL" >&5
> +$as_echo_n "checking for installed CLooG PPL... " >&6; }
> +if test "${gcc_cv_cloog_type+set}" = set; then :
> +  $as_echo_n "(cached) " >&6
>  else
>    LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
> -         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
> +      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>  /* end confdefs.h.  */
>  #include "cloog/cloog.h"
> +   #include "cloog/ppl/cloog.h"
>  int
>  main ()
>  {
> @@ -5781,21 +5834,19 @@ cloog_version ()
>  }
>  _ACEOF
>  if ac_fn_c_try_link "$LINENO"; then :
> -  gcc_cv_cloog_type=PPL
> +  gcc_cv_cloog_type="PPL"
>  else
>    gcc_cv_cloog_type=no
>  fi
>  rm -f core conftest.err conftest.$ac_objext \
>      conftest$ac_exeext conftest.$ac_ext
>  fi
> -rm -f core conftest.err conftest.$ac_objext \
> -    conftest$ac_exeext conftest.$ac_ext
> -fi
> -rm -f core conftest.err conftest.$ac_objext \
> -    conftest$ac_exeext conftest.$ac_ext
> -fi
>  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
>  $as_echo "$gcc_cv_cloog_type" >&6; }
> +    ;;
> +    *)
> +      gcc_cv_cloog_type=""
> +  esac
>  
>    case $gcc_cv_cloog_type in
>      "PPL Legacy")
> -- 
> 1.7.1
>
Paolo Bonzini - Nov. 12, 2010, 8:40 p.m.
On 11/12/2010 09:15 PM, Tobias Grosser wrote:
>
>
> I committed this patch and propose two more.
>
> * Use a CLooG header macro to check for the PPL Legacy backend
>
> Without that patch the PPL Legacy backend may be detected, even if only
> includes of CLooG ORG are in the path, but the cloog-ppl library is
> still in the system library directory.

Nice, thanks.

> * Addition of --enable-cloog-backend
>
> Implemented as you suggested. Now by default we use
> --enable-cloog-backend=ppl-legacy
> All other CLooG backends will fail configure. To use another backend
> this has to be defined explicitly by setting --enable-cloog-backend=isl
> or --enable-cloog-backend=ppl
>
> Could you have a look?

This is okay assuming you tested the patches with all three backends, 
and all had the correct outcome (if failing to compile GCC is one of 
those outcomes that's fine, but I'd like to know).

I understand you plan to drop ppl-legacy support code from the compiler, 
do you plan to support both isl and ppl in the future?

In any case --enable-cloog-backend is needed for the transition, so the 
patch is okay even if it will disappear before 4.6.  It is also okay, if 
you want, to commit it with isl default.

Paolo
Paolo Bonzini - Nov. 12, 2010, 8:42 p.m.
On 11/12/2010 09:39 PM, Jack Howarth wrote:
> Tobi,
>     I am still a tad concerned about the ABI change between ppl 0.10.x and
> 0.11. Is it certain that, for the combination of FSF gcc built against ppl 0.11
> and cloog-ppl built against ppl 0.10.x, there are no ppl data structures
> passed on the cloog calls between graphite and cloog? If not, might there
> be issues if the ABI changes in ppl impacted those data structures?

Hopefully that would fail to link due to multiply-defined names?  Maybe 
not on Mac OS X due to two-level namespacing, in any case if somebody 
wants to experiment with this scenario that's welcome.

Paolo
Jack Howarth - Nov. 12, 2010, 9:04 p.m.
On Fri, Nov 12, 2010 at 09:42:38PM +0100, Paolo Bonzini wrote:
> On 11/12/2010 09:39 PM, Jack Howarth wrote:
>> Tobi,
>>     I am still a tad concerned about the ABI change between ppl 0.10.x and
>> 0.11. Is it certain that, for the combination of FSF gcc built against ppl 0.11
>> and cloog-ppl built against ppl 0.10.x, there are no ppl data structures
>> passed on the cloog calls between graphite and cloog? If not, might there
>> be issues if the ABI changes in ppl impacted those data structures?
>
> Hopefully that would fail to link due to multiply-defined names?  Maybe  
> not on Mac OS X due to two-level namespacing, in any case if somebody  
> wants to experiment with this scenario that's welcome.
>
> Paolo

Paolo,
   Well originally I had proposed that this issue be avoided by having
legacy cloog-ppl only build against ppl 0.10.x and FSF gcc 4.6 require
ppl 0.11.

http://gcc.gnu.org/ml/gcc-patches/2010-08/msg01033.html

Unfortunately cloog-ppl 0.15.10 apparently added support for ppl 0.11
(although I can't get that release to build due to autogeneration problems).
            Jack
Jack Howarth - Nov. 12, 2010, 10:08 p.m.
On Fri, Nov 12, 2010 at 09:42:38PM +0100, Paolo Bonzini wrote:
> On 11/12/2010 09:39 PM, Jack Howarth wrote:
>> Tobi,
>>     I am still a tad concerned about the ABI change between ppl 0.10.x and
>> 0.11. Is it certain that, for the combination of FSF gcc built against ppl 0.11
>> and cloog-ppl built against ppl 0.10.x, there are no ppl data structures
>> passed on the cloog calls between graphite and cloog? If not, might there
>> be issues if the ABI changes in ppl impacted those data structures?
>
> Hopefully that would fail to link due to multiply-defined names?  Maybe  
> not on Mac OS X due to two-level namespacing, in any case if somebody  
> wants to experiment with this scenario that's welcome.
>
> Paolo

Paolo,
    I did a quick test build of gcc trunk against ppl 0.11 and a legacy cloog-ppl
built against ppl 0.10.2 on x86_64-apple-darwin10. This produced binaries with
linkages of...

[MacPro:gcc/x86_64-apple-darwin10.5.0/4.6.0] howarth% otool -L cc1
cc1:
	/sw/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)
	/sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/sw/lib/libcloog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/sw/lib/libppl_c.4.dylib (compatibility version 5.0.0, current version 5.0.0)
	/sw/lib/libppl.9.dylib (compatibility version 10.0.0, current version 10.0.0)
	/sw/lib/libgmpxx.4.dylib (compatibility version 6.0.0, current version 6.2.0)
	/sw/lib/libmpc.2.dylib (compatibility version 3.0.0, current version 3.0.0)
	/sw/lib/libmpfr.1.dylib (compatibility version 4.0.0, current version 4.2.0)
	/sw/lib/libgmp.3.dylib (compatibility version 9.0.0, current version 9.2.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
	/sw/lib/gcc4.6/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)

and

[MacPro:gcc/x86_64-apple-darwin10.5.0/4.6.0] howarth% otool -L /sw/lib/libcloog.0.dylib
/sw/lib/libcloog.0.dylib:
	/sw/lib/libcloog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/sw/lib/libgmp.3.dylib (compatibility version 9.0.0, current version 9.2.0)
	/sw/lib/libppl_c.2.dylib (compatibility version 4.0.0, current version 4.0.0)
	/sw/lib/libppl.7.dylib (compatibility version 9.0.0, current version 9.0.0)
	/sw/lib/libgmpxx.4.dylib (compatibility version 6.0.0, current version 6.2.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)

Executing...

make -k check RUNTESTFLAGS="graphite.exp --target_board=unix'{-m32,-m64}'"

showed no regressions. So either the cloog calls aren't passing ppl data structures
or those haven't changed with the ABI changes.
        Jack
Tobias Grosser - Nov. 12, 2010, 10:10 p.m.
On 11/12/2010 05:08 PM, Jack Howarth wrote:
> On Fri, Nov 12, 2010 at 09:42:38PM +0100, Paolo Bonzini wrote:
>> On 11/12/2010 09:39 PM, Jack Howarth wrote:
>>> Tobi,
>>>      I am still a tad concerned about the ABI change between ppl 0.10.x and
>>> 0.11. Is it certain that, for the combination of FSF gcc built against ppl 0.11
>>> and cloog-ppl built against ppl 0.10.x, there are no ppl data structures
>>> passed on the cloog calls between graphite and cloog? If not, might there
>>> be issues if the ABI changes in ppl impacted those data structures?
>>
>> Hopefully that would fail to link due to multiply-defined names?  Maybe
>> not on Mac OS X due to two-level namespacing, in any case if somebody
>> wants to experiment with this scenario that's welcome.
>>
>> Paolo
>
> Paolo,
>      I did a quick test build of gcc trunk against ppl 0.11 and a legacy cloog-ppl
> built against ppl 0.10.2 on x86_64-apple-darwin10. This produced binaries with
> linkages of...
>
> [MacPro:gcc/x86_64-apple-darwin10.5.0/4.6.0] howarth% otool -L cc1
> cc1:
> 	/sw/lib/libintl.8.dylib (compatibility version 9.0.0, current version 9.2.0)
> 	/sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
> 	/sw/lib/libcloog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
> 	/sw/lib/libppl_c.4.dylib (compatibility version 5.0.0, current version 5.0.0)
> 	/sw/lib/libppl.9.dylib (compatibility version 10.0.0, current version 10.0.0)
> 	/sw/lib/libgmpxx.4.dylib (compatibility version 6.0.0, current version 6.2.0)
> 	/sw/lib/libmpc.2.dylib (compatibility version 3.0.0, current version 3.0.0)
> 	/sw/lib/libmpfr.1.dylib (compatibility version 4.0.0, current version 4.2.0)
> 	/sw/lib/libgmp.3.dylib (compatibility version 9.0.0, current version 9.2.0)
> 	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
> 	/sw/lib/gcc4.6/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1)
>
> and
>
> [MacPro:gcc/x86_64-apple-darwin10.5.0/4.6.0] howarth% otool -L /sw/lib/libcloog.0.dylib
> /sw/lib/libcloog.0.dylib:
> 	/sw/lib/libcloog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
> 	/sw/lib/libgmp.3.dylib (compatibility version 9.0.0, current version 9.2.0)
> 	/sw/lib/libppl_c.2.dylib (compatibility version 4.0.0, current version 4.0.0)
> 	/sw/lib/libppl.7.dylib (compatibility version 9.0.0, current version 9.0.0)
> 	/sw/lib/libgmpxx.4.dylib (compatibility version 6.0.0, current version 6.2.0)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
>
> Executing...
>
> make -k check RUNTESTFLAGS="graphite.exp --target_board=unix'{-m32,-m64}'"
>
> showed no regressions. So either the cloog calls aren't passing ppl data structures
> or those haven't changed with the ABI changes.

We do not pass any ppl data structures. So there should not be any 
problem, right?

Cheers

Tobi
Andreas Schwab - Nov. 15, 2010, 3:45 p.m.
Tobias Grosser <grosser@fim.uni-passau.de> writes:

> diff --git a/config/cloog.m4 b/config/cloog.m4
> index 6ed0f1b..4936e8a 100644
> --- a/config/cloog.m4
> +++ b/config/cloog.m4
> @@ -36,7 +36,19 @@ AC_DEFUN([CLOOG_INIT_FLAGS],
>      [AS_HELP_STRING(
>        [--with-cloog-lib=PATH],
>        [Specify the directory for the installed CLooG library])])
> -  
> +
> +  AC_ARG_ENABLE(cloog-backend,
> +    [  --enable-cloog-backend[=backend]
> +				isl: The cloog.org isl backend
> +				ppl-legacy: The legacy ppl backend - default
> +				ppl: The cloog.org ppl backend],

Please use AS_HELP_STRING.

Andreas.
Andreas Schwab - Nov. 15, 2010, 3:54 p.m.
Tobias Grosser <grosser@fim.uni-passau.de> writes:

> diff --git a/config/cloog.m4 b/config/cloog.m4
> index 6ed0f1b..4936e8a 100644
> --- a/config/cloog.m4
> +++ b/config/cloog.m4
> @@ -36,7 +36,19 @@ AC_DEFUN([CLOOG_INIT_FLAGS],
>      [AS_HELP_STRING(
>        [--with-cloog-lib=PATH],
>        [Specify the directory for the installed CLooG library])])
> -  
> +
> +  AC_ARG_ENABLE(cloog-backend,
> +    [  --enable-cloog-backend[=backend]
> +				isl: The cloog.org isl backend
> +				ppl-legacy: The legacy ppl backend - default
> +				ppl: The cloog.org ppl backend],

The help string should explain what the option does, referring to the
option argument (which should be written in upper case).

Andreas.

Patch

From 8b8b33ade1658dc2e0dc660cccd66f6f0aa18e72 Mon Sep 17 00:00:00 2001
From: Tobias Grosser <grosser@fim.uni-passau.de>
Date: Fri, 12 Nov 2010 13:08:54 -0500
Subject: [PATCH 3/3] Add -enable-cloog-backend.

	* config/cloog.m4: Add -enable-cloog-backend=(isl|ppl|ppl-legacy) to
	define the cloog backend to use. Furthermore, only pass the ppllibs
	to the configure checks, if necessary.
	*configure: Regenerate.
---
 config/cloog.m4 |   74 +++++++++++++++++++++++++++++++++++-------------
 configure       |   85 ++++++++++++++++++++++++++++++++++++++++++++-----------
 2 files changed, 122 insertions(+), 37 deletions(-)

diff --git a/config/cloog.m4 b/config/cloog.m4
index 6ed0f1b..4936e8a 100644
--- a/config/cloog.m4
+++ b/config/cloog.m4
@@ -36,7 +36,19 @@  AC_DEFUN([CLOOG_INIT_FLAGS],
     [AS_HELP_STRING(
       [--with-cloog-lib=PATH],
       [Specify the directory for the installed CLooG library])])
-  
+
+  AC_ARG_ENABLE(cloog-backend,
+    [  --enable-cloog-backend[=backend]
+				isl: The cloog.org isl backend
+				ppl-legacy: The legacy ppl backend - default
+				ppl: The cloog.org ppl backend],
+    [ if   test "x${enableval}" = "xisl"; then
+	cloog_backend=isl
+      elif test "x${enableval}" = "xppl"; then
+	cloog_backend=ppl
+      else
+	cloog_backend=ppl-legacy
+      fi], cloog_backend=ppl-legacy)
   AC_ARG_ENABLE(cloog-version-check,
     [AS_HELP_STRING(
       [--disable-cloog-version-check],
@@ -87,11 +99,19 @@  AC_DEFUN([CLOOG_REQUESTED],
 ]
 )
 
-# _CLOOG_ORG_PROG ()
+# _CLOOG_ORG_PROG_ISL ()
 # ------------------
-# Helper for detecting CLooG.org's backend.
-m4_define([_CLOOG_ORG_PROG],[AC_LANG_PROGRAM(
-  [#include "cloog/cloog.h"],
+# Helper for detecting CLooG.org's ISL backend.
+m4_define([_CLOOG_ORG_PROG_ISL],[AC_LANG_PROGRAM(
+  [#include "cloog/cloog.h" ],
+  [cloog_version ()])])
+
+# _CLOOG_ORG_PROG_PPL ()
+# ------------------
+# Helper for detecting CLooG.org's PPL backend.
+m4_define([_CLOOG_ORG_PROG_PPL],[AC_LANG_PROGRAM(
+  [#include "cloog/cloog.h"
+   #include "cloog/ppl/cloog.h"],
   [cloog_version ()])])
 
 # _CLOOG_PPL_LEGACY_PROG ()
@@ -106,7 +126,7 @@  m4_define([_CLOOG_PPL_LEGACY_PROG], [AC_LANG_PROGRAM(
 # CLOOG_FIND_FLAGS ()
 # ------------------
 # Detect the used CLooG-backend and set clooginc/clooglibs/cloog_org.
-# Preference: CLooG-PPL (Legacy) > CLooG-ISL > CLooG-PPL
+# Only look for the CLooG backend type specified in --enable-cloog-backend
 AC_DEFUN([CLOOG_FIND_FLAGS],
 [
   AC_REQUIRE([CLOOG_INIT_FLAGS])
@@ -119,22 +139,36 @@  AC_DEFUN([CLOOG_FIND_FLAGS],
   _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
  
   dnl clooglibs & clooginc may have been initialized by CLOOG_INIT_FLAGS.
-  CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
+  CFLAGS="${CFLAGS} ${clooginc} ${gmpinc}"
   CPPFLAGS="${CPPFLAGS} ${_cloogorginc}"
-  LDFLAGS="${LDFLAGS} ${clooglibs} ${ppllibs}"
-
-  AC_CACHE_CHECK([for installed CLooG],
-                 [gcc_cv_cloog_type],
-    [LIBS="-lcloog ${_cloog_saved_LIBS}"
-     AC_LINK_IFELSE([_CLOOG_PPL_LEGACY_PROG],
-      [gcc_cv_cloog_type="PPL Legacy"],
-      [LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
-       AC_LINK_IFELSE([_CLOOG_ORG_PROG],
-        [gcc_cv_cloog_type=ISL],
-        [LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
-         AC_LINK_IFELSE([_CLOOG_ORG_PROG],
-          [gcc_cv_cloog_type=PPL],
-          [gcc_cv_cloog_type=no])])])])
+  LDFLAGS="${LDFLAGS} ${clooglibs}"
+
+  case $cloog_backend in
+    "ppl-legacy")
+    CFLAGS="${CFLAGS} ${pplinc}"
+    LDFLAGS="${LDFLAGS} ${ppllibs}"
+    AC_CACHE_CHECK([for installed CLooG PPL Legacy], [gcc_cv_cloog_type],
+      [LIBS="-lcloog ${_cloog_saved_LIBS}"
+      AC_LINK_IFELSE([_CLOOG_PPL_LEGACY_PROG], [gcc_cv_cloog_type="PPL Legacy"],
+		     [gcc_cv_cloog_type=no])])
+    ;;
+    "isl")
+    AC_CACHE_CHECK([for installed CLooG ISL], [gcc_cv_cloog_type],
+      [LIBS="-lcloog-isl ${_cloog_saved_LIBS}"
+      AC_LINK_IFELSE([_CLOOG_ORG_PROG_ISL], [gcc_cv_cloog_type="ISL"],
+		     [gcc_cv_cloog_type=no])])
+    ;;
+    "ppl")
+    CFLAGS="${CFLAGS} ${pplinc}"
+    LDFLAGS="${LDFLAGS} ${ppllibs}"
+    AC_CACHE_CHECK([for installed CLooG PPL], [gcc_cv_cloog_type],
+      [LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
+      AC_LINK_IFELSE([_CLOOG_ORG_PROG_PPL], [gcc_cv_cloog_type="PPL"],
+		     [gcc_cv_cloog_type=no])])
+    ;;
+    *)
+      gcc_cv_cloog_type=""
+  esac
 
   case $gcc_cv_cloog_type in
     "PPL Legacy")
diff --git a/configure b/configure
index 0e4f1ed..bcc087b 100755
--- a/configure
+++ b/configure
@@ -765,6 +765,7 @@  enable_ppl_version_check
 with_cloog
 with_cloog_include
 with_cloog_lib
+enable_cloog_backend
 enable_cloog_version_check
 enable_lto
 enable_stage1_languages
@@ -1451,6 +1452,10 @@  Optional Features:
   --enable-libssp         build libssp directory
   --enable-build-with-cxx build with C++ compiler instead of C compiler
   --disable-ppl-version-check    disable check for PPL version
+  --enable-cloog-backend=backend
+				isl: The cloog.org isl backend
+				ppl-legacy: The legacy ppl backend - default
+				ppl: The cloog.org ppl backend
   --disable-cloog-version-check
                           disable check for CLooG version
   --enable-lto            enable link time optimization support
@@ -5676,6 +5681,19 @@  if test "${with_cloog_lib+set}" = set; then :
 fi
 
 
+  # Check whether --enable-cloog-backend was given.
+if test "${enable_cloog_backend+set}" = set; then :
+  enableval=$enable_cloog_backend;  if   test "x${enableval}" = "xisl"; then
+	cloog_backend=isl
+      elif test "x${enableval}" = "xppl"; then
+	cloog_backend=ppl
+      else
+	cloog_backend=ppl-legacy
+      fi
+else
+  cloog_backend=ppl-legacy
+fi
+
   # Check whether --enable-cloog-version-check was given.
 if test "${enable_cloog_version_check+set}" = set; then :
   enableval=$enable_cloog_version_check; ENABLE_CLOOG_CHECK=$enableval
@@ -5727,17 +5745,21 @@  if test "x$with_cloog" != "xno"; then
 
   _cloogorginc="-DCLOOG_INT_GMP -DCLOOG_ORG"
 
-    CFLAGS="${CFLAGS} ${clooginc} ${pplinc} ${gmpinc}"
+    CFLAGS="${CFLAGS} ${clooginc} ${gmpinc}"
   CPPFLAGS="${CPPFLAGS} ${_cloogorginc}"
-  LDFLAGS="${LDFLAGS} ${clooglibs} ${ppllibs}"
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG" >&5
-$as_echo_n "checking for installed CLooG... " >&6; }
+  LDFLAGS="${LDFLAGS} ${clooglibs}"
+
+  case $cloog_backend in
+    "ppl-legacy")
+    CFLAGS="${CFLAGS} ${pplinc}"
+    LDFLAGS="${LDFLAGS} ${ppllibs}"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG PPL Legacy" >&5
+$as_echo_n "checking for installed CLooG PPL Legacy... " >&6; }
 if test "${gcc_cv_cloog_type+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   LIBS="-lcloog ${_cloog_saved_LIBS}"
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include "cloog/cloog.h"
 int
@@ -5753,8 +5775,22 @@  _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   gcc_cv_cloog_type="PPL Legacy"
 else
-  LIBS="-lcloog-isl -lisl ${_cloog_saved_LIBS}"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gcc_cv_cloog_type=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
+$as_echo "$gcc_cv_cloog_type" >&6; }
+    ;;
+    "isl")
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG ISL" >&5
+$as_echo_n "checking for installed CLooG ISL... " >&6; }
+if test "${gcc_cv_cloog_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  LIBS="-lcloog-isl ${_cloog_saved_LIBS}"
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include "cloog/cloog.h"
 int
@@ -5766,12 +5802,29 @@  cloog_version ()
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_cloog_type=ISL
+  gcc_cv_cloog_type="ISL"
+else
+  gcc_cv_cloog_type=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
+$as_echo "$gcc_cv_cloog_type" >&6; }
+    ;;
+    "ppl")
+    CFLAGS="${CFLAGS} ${pplinc}"
+    LDFLAGS="${LDFLAGS} ${ppllibs}"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for installed CLooG PPL" >&5
+$as_echo_n "checking for installed CLooG PPL... " >&6; }
+if test "${gcc_cv_cloog_type+set}" = set; then :
+  $as_echo_n "(cached) " >&6
 else
   LIBS="-lcloog-ppl ${_cloog_saved_LIBS}"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include "cloog/cloog.h"
+   #include "cloog/ppl/cloog.h"
 int
 main ()
 {
@@ -5781,21 +5834,19 @@  cloog_version ()
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  gcc_cv_cloog_type=PPL
+  gcc_cv_cloog_type="PPL"
 else
   gcc_cv_cloog_type=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_cloog_type" >&5
 $as_echo "$gcc_cv_cloog_type" >&6; }
+    ;;
+    *)
+      gcc_cv_cloog_type=""
+  esac
 
   case $gcc_cv_cloog_type in
     "PPL Legacy")
-- 
1.7.1