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@
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
-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)
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; }
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
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"
#define POLLY_ISL_AST_H
#include "polly/Config/config.h"
-
-#ifdef ISL_CODEGEN_FOUND
-
#include "polly/ScopPass.h"
struct clast_name;
class PassRegistry;
void initializeIslAstInfoPass(llvm::PassRegistry&);
}
-
-#endif /* ISL_CODEGEN_FOUND */
#endif /* POLLY_ISL_AST_H */
#define POLLY_CONFIG_H
#cmakedefine CLOOG_FOUND
-#cmakedefine ISL_CODEGEN_FOUND
#cmakedefine OPENSCOP_FOUND
#cmakedefine PLUTO_FOUND
#cmakedefine SCOPLIB_FOUND
/* 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
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();
#ifdef PLUTO_FOUND
createPlutoOptimizerPass();
#endif
-#ifdef ISL_CODEGEN_FOUND
createIslAstInfoPass();
createIslCodeGenerationPass();
-#endif
createIslScheduleOptimizerPass();
createTempScopInfoPass();
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&);
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
#include "polly/CodeGen/IslAst.h"
-#ifdef ISL_CODEGEN_FOUND
#include "polly/LinkAllPasses.h"
#include "polly/ScopInfo.h"
Pass *polly::createIslAstInfoPass() {
return new IslAstInfo();
}
-
-#endif // CLOOG_FOUND
//===----------------------------------------------------------------------===//
#include "polly/Config/config.h"
-#ifdef ISL_CODEGEN_FOUND
-
#include "polly/Dependences.h"
#include "polly/LinkAllPasses.h"
#include "polly/ScopInfo.h"
Pass *polly::createIslCodeGenerationPass() {
return new IslCodeGeneration();
}
-
-#endif /* ISL_CODEGEN_FOUND */
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
#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);
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);
}
break;
#endif
-#ifdef ISL_CODEGEN_FOUND
case CODEGEN_ISL:
PM.add(polly::createIslCodeGenerationPass());
break;
-#endif
}
if (CFGPrinter)