[llvm-commits] [polly] r166403 - in /polly/trunk: Makefile.config.in autoconf/configure.ac cmake/FindIsl.cmake configure include/polly/CodeGen/IslAst.h include/polly/Config/config.h.cmake include/polly/Config/config.h.in include/polly/LinkAllPasses.h lib/CodeGen/CMakeLists.txt lib/CodeGen/IslAst.cpp lib/CodeGen/IslCodeGeneration.cpp lib/RegisterPasses.cpp

Tobias Grosser grosser at fim.uni-passau.de
Sun Oct 21 14:48:22 PDT 2012


Author: grosser
Date: Sun Oct 21 16:48:21 2012
New Revision: 166403

URL: http://llvm.org/viewvc/llvm-project?rev=166403&view=rev
Log:
autoconf/cmake: Always require isl code generation.

This change ensures that isl is only detected if it includes code generation
support. This allows us to remove a lot of conditional compilation and also
avoids missing test cases in case the feature is not available.

Modified:
    polly/trunk/Makefile.config.in
    polly/trunk/autoconf/configure.ac
    polly/trunk/cmake/FindIsl.cmake
    polly/trunk/configure
    polly/trunk/include/polly/CodeGen/IslAst.h
    polly/trunk/include/polly/Config/config.h.cmake
    polly/trunk/include/polly/Config/config.h.in
    polly/trunk/include/polly/LinkAllPasses.h
    polly/trunk/lib/CodeGen/CMakeLists.txt
    polly/trunk/lib/CodeGen/IslAst.cpp
    polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
    polly/trunk/lib/RegisterPasses.cpp

Modified: polly/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/Makefile.config.in?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/Makefile.config.in (original)
+++ polly/trunk/Makefile.config.in Sun Oct 21 16:48:21 2012
@@ -29,7 +29,6 @@
 POLLY_CXXFLAGS += "-fno-rtti -fno-exceptions"
 
 CLOOG_FOUND := @cloog_found@
-ISL_CODEGEN_FOUND := @isl_codegen_found@
 OPENSCOP_FOUND := @openscop_found@
 SCOPLIB_FOUND := @scoplib_found@
 CUDALIB_FOUND := @cuda_found@

Modified: polly/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/autoconf/configure.ac?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/autoconf/configure.ac (original)
+++ polly/trunk/autoconf/configure.ac Sun Oct 21 16:48:21 2012
@@ -78,12 +78,7 @@
 find_lib_and_headers([gmp], [gmp.h], [gmp], [required])
 
 dnl Find Isl
-find_lib_and_headers([isl], [isl/config.h], [isl], [required])
-
-dnl Find whether ISL has a codegen.h file.
-find_lib_and_headers([isl], [isl/ast.h], [isl])
-AS_IF([test "x$isl_found" = "xyes"],
-  [AC_DEFINE([ISL_CODEGEN_FOUND],[1],[Define if ISL has a code generator])])
+find_lib_and_headers([isl], [isl/ast.h], [isl], [required])
 
 dnl Check that we have cloog.
 saved_CXXFLAGS=$CXXFLAGS

Modified: polly/trunk/cmake/FindIsl.cmake
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/cmake/FindIsl.cmake?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/cmake/FindIsl.cmake (original)
+++ polly/trunk/cmake/FindIsl.cmake Sun Oct 21 16:48:21 2012
@@ -1,9 +1,4 @@
-FIND_PATH(ISL_INCLUDE_DIR isl/set.h)
-FIND_PATH(ISL_CODEGEN_DIR isl/ast.h)
-
-IF (ISL_CODEGEN_DIR)
-  SET(ISL_CODEGEN_FOUND TRUE)
-ENDIF (ISL_CODEGEN_DIR)
+FIND_PATH(ISL_INCLUDE_DIR isl/ast.h)
 
 FIND_LIBRARY(ISL_LIBRARY NAMES isl)
 

Modified: polly/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/configure?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/configure (original)
+++ polly/trunk/configure Sun Oct 21 16:48:21 2012
@@ -2517,86 +2517,6 @@
 fi
 
   # Check for library and headers works
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl: isl/config.h in $given_inc_path, and libisl in $given_lib_path" >&5
-$as_echo_n "checking for isl: isl/config.h in $given_inc_path, and libisl in $given_lib_path... " >&6; }
-
-  # try to compile a file that includes a header of the library
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <isl/config.h>
-int
-main ()
-{
-;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-    isl_found="yes"
-
-    if test "x$given_inc_path" != "xinc_not_give_isl"; then :
-  isl_inc="-I$given_inc_path"
-
-fi
-    isl_lib="-lisl"
-
-    if test "x$given_lib_path" != "xlib_not_give_isl"; then :
-  isl_ld="-L$given_lib_path"
-
-fi
-else
-  if test "xrequired" = "xrequired"; then :
-  as_fn_error $? "isl required but not found" "$LINENO" 5
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
-$as_echo "not found" >&6; }
-fi
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-  # reset original CXXFLAGS
-  CXXFLAGS=$OLD_CXXFLAGS
-  LDFLAGS=$OLD_LDFLAGS;
-  LIBS=$OLD_LIBS
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-  OLD_CXXFLAGS=$CXXFLAGS;
-  OLD_LDFLAGS=$LDFLAGS;
-  OLD_LIBS=$LIBS;
-
-  LIBS="$LIBS -lisl";
-
-  # Get include path and lib path
-
-# Check whether --with-isl was given.
-if test "${with_isl+set}" = set; then :
-  withval=$with_isl; given_inc_path="$withval/include"; CXXFLAGS="-I$given_inc_path $CXXFLAGS";
-       given_lib_path="$withval/lib"; LDFLAGS="-L$given_lib_path $LDFLAGS"
-else
-  given_inc_path=inc_not_give_isl;
-       given_lib_path=lib_not_give_isl
-
-fi
-
-  # Check for library and headers works
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl: isl/ast.h in $given_inc_path, and libisl in $given_lib_path" >&5
 $as_echo_n "checking for isl: isl/ast.h in $given_inc_path, and libisl in $given_lib_path... " >&6; }
 
@@ -2628,7 +2548,7 @@
 
 fi
 else
-  if test "x" = "xrequired"; then :
+  if test "xrequired" = "xrequired"; then :
   as_fn_error $? "isl required but not found" "$LINENO" 5
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
@@ -2650,11 +2570,6 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-if test "x$isl_found" = "xyes"; then :
-
-$as_echo "#define ISL_CODEGEN_FOUND 1" >>confdefs.h
-
-fi
 
 saved_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS $gmp_inc $isl_inc"

Modified: polly/trunk/include/polly/CodeGen/IslAst.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/IslAst.h?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/IslAst.h (original)
+++ polly/trunk/include/polly/CodeGen/IslAst.h Sun Oct 21 16:48:21 2012
@@ -23,9 +23,6 @@
 #define POLLY_ISL_AST_H
 
 #include "polly/Config/config.h"
-
-#ifdef ISL_CODEGEN_FOUND
-
 #include "polly/ScopPass.h"
 
 struct clast_name;
@@ -70,6 +67,4 @@
   class PassRegistry;
   void initializeIslAstInfoPass(llvm::PassRegistry&);
 }
-
-#endif /* ISL_CODEGEN_FOUND */
 #endif /* POLLY_ISL_AST_H */

Modified: polly/trunk/include/polly/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/Config/config.h.cmake?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/include/polly/Config/config.h.cmake (original)
+++ polly/trunk/include/polly/Config/config.h.cmake Sun Oct 21 16:48:21 2012
@@ -14,7 +14,6 @@
 #define POLLY_CONFIG_H
 
 #cmakedefine CLOOG_FOUND
-#cmakedefine ISL_CODEGEN_FOUND
 #cmakedefine OPENSCOP_FOUND
 #cmakedefine PLUTO_FOUND
 #cmakedefine SCOPLIB_FOUND

Modified: polly/trunk/include/polly/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/Config/config.h.in?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/include/polly/Config/config.h.in (original)
+++ polly/trunk/include/polly/Config/config.h.in Sun Oct 21 16:48:21 2012
@@ -12,9 +12,6 @@
 /* Define if gpu codegen is enabled */
 #undef GPU_CODEGEN
 
-/* Define if ISL has a code generator */
-#undef ISL_CODEGEN_FOUND
-
 /* Define if openscop found */
 #undef OPENSCOP_FOUND
 

Modified: polly/trunk/include/polly/LinkAllPasses.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/LinkAllPasses.h?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/include/polly/LinkAllPasses.h (original)
+++ polly/trunk/include/polly/LinkAllPasses.h Sun Oct 21 16:48:21 2012
@@ -48,12 +48,8 @@
   llvm::Pass *createRegionSimplifyPass();
   llvm::Pass *createScopDetectionPass();
   llvm::Pass *createScopInfoPass();
-
-#ifdef ISL_CODEGEN_FOUND
   llvm::Pass *createIslAstInfoPass();
   llvm::Pass *createIslCodeGenerationPass();
-#endif
-
   llvm::Pass *createIslScheduleOptimizerPass();
   llvm::Pass *createTempScopInfoPass();
 
@@ -106,10 +102,8 @@
 #ifdef PLUTO_FOUND
        createPlutoOptimizerPass();
 #endif
-#ifdef ISL_CODEGEN_FOUND
        createIslAstInfoPass();
        createIslCodeGenerationPass();
-#endif
        createIslScheduleOptimizerPass();
        createTempScopInfoPass();
 
@@ -137,10 +131,8 @@
   void initializeIndependentBlocksPass(llvm::PassRegistry&);
   void initializeJSONExporterPass(llvm::PassRegistry&);
   void initializeJSONImporterPass(llvm::PassRegistry&);
-#ifdef ISL_CODEGEN_FOUND
   void initializeIslAstInfoPass(llvm::PassRegistry&);
   void initializeIslCodeGenerationPass(llvm::PassRegistry&);
-#endif
   void initializeIslScheduleOptimizerPass(llvm::PassRegistry&);
 #ifdef PLUTO_FOUND
   void initializePlutoOptimizerPass(llvm::PassRegistry&);

Modified: polly/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CMakeLists.txt?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ polly/trunk/lib/CodeGen/CMakeLists.txt Sun Oct 21 16:48:21 2012
@@ -4,11 +4,9 @@
       CodeGeneration.cpp)
 endif (CLOOG_FOUND)
 
-if (ISL_CODEGEN_FOUND)
-  set(ISL_CODEGEN_FILES
-      IslAst.cpp
-      IslCodeGeneration.cpp)
-endif (ISL_CODEGEN_FOUND)
+set(ISL_CODEGEN_FILES
+    IslAst.cpp
+    IslCodeGeneration.cpp)
 
 if (GPU_CODEGEN)
   set (GPGPU_CODEGEN_FILES

Modified: polly/trunk/lib/CodeGen/IslAst.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslAst.cpp?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslAst.cpp (original)
+++ polly/trunk/lib/CodeGen/IslAst.cpp Sun Oct 21 16:48:21 2012
@@ -21,7 +21,6 @@
 
 #include "polly/CodeGen/IslAst.h"
 
-#ifdef ISL_CODEGEN_FOUND
 #include "polly/LinkAllPasses.h"
 #include "polly/ScopInfo.h"
 
@@ -209,5 +208,3 @@
 Pass *polly::createIslAstInfoPass() {
   return new IslAstInfo();
 }
-
-#endif // CLOOG_FOUND

Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Sun Oct 21 16:48:21 2012
@@ -20,8 +20,6 @@
 //===----------------------------------------------------------------------===//
 #include "polly/Config/config.h"
 
-#ifdef ISL_CODEGEN_FOUND
-
 #include "polly/Dependences.h"
 #include "polly/LinkAllPasses.h"
 #include "polly/ScopInfo.h"
@@ -897,5 +895,3 @@
 Pass *polly::createIslCodeGenerationPass() {
   return new IslCodeGeneration();
 }
-
-#endif /* ISL_CODEGEN_FOUND */

Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=166403&r1=166402&r2=166403&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Sun Oct 21 16:48:21 2012
@@ -64,23 +64,11 @@
             clEnumValEnd),
           cl::Hidden, cl::init(OPTIMIZER_ISL), cl::ZeroOrMore);
 
-#ifndef CLOOG_FOUND
-#ifndef ISL_CODEGEN_FOUND
-  #error No code generator found.
-#endif
-#endif
-
 enum CodeGenChoice {
 #ifdef CLOOG_FOUND
-  CODEGEN_CLOOG
-  #ifdef ISL_CODEGEN_FOUND
-    , // Avoid a warning in C++03 pedantic mode
-  #endif
+  CODEGEN_CLOOG,
 #endif
-
-#ifdef ISL_CODEGEN_FOUND
   CODEGEN_ISL
-#endif
 };
 
 #ifdef CLOOG_FOUND
@@ -97,9 +85,7 @@
 #ifdef CLOOG_FOUND
                          clEnumValN(CODEGEN_CLOOG, "cloog", "CLooG"),
 #endif
-#ifdef ISL_CODEGEN_FOUND
                          clEnumValN(CODEGEN_ISL, "isl", "isl code generator"),
-#endif
                          clEnumValEnd),
           cl::Hidden, cl::init(DefaultCodeGen), cl::ZeroOrMore);
 
@@ -167,18 +153,14 @@
   initializeCloogInfoPass(Registry);
   initializeCodeGenerationPass(Registry);
 #endif
-#ifdef ISL_CODEGEN_FOUND
   initializeIslCodeGenerationPass(Registry);
-#endif
   initializeCodePreparationPass(Registry);
   initializeDeadCodeElimPass(Registry);
   initializeDependencesPass(Registry);
   initializeIndependentBlocksPass(Registry);
   initializeJSONExporterPass(Registry);
   initializeJSONImporterPass(Registry);
-#ifdef ISL_CODEGEN_FOUND
   initializeIslAstInfoPass(Registry);
-#endif
   initializeIslScheduleOptimizerPass(Registry);
 #ifdef SCOPLIB_FOUND
   initializePoccPass(Registry);
@@ -294,11 +276,9 @@
     }
     break;
 #endif
-#ifdef ISL_CODEGEN_FOUND
   case CODEGEN_ISL:
     PM.add(polly::createIslCodeGenerationPass());
     break;
-#endif
   }
 
   if (CFGPrinter)





More information about the llvm-commits mailing list