[llvm-commits] [polly] r156199 - in /polly/trunk: CMakeLists.txt Makefile.config.in autoconf/configure.ac configure include/polly/Cloog.h include/polly/CodeGen/CodeGeneration.h include/polly/Config/config.h.cmake include/polly/LinkAllPasses.h lib/CodeGen/CMakeLists.txt lib/Pocc.cpp lib/RegisterPasses.cpp
Sebastian Pop
spop at codeaurora.org
Fri May 4 13:30:04 PDT 2012
Author: spop
Date: Fri May 4 15:30:03 2012
New Revision: 156199
URL: http://llvm.org/viewvc/llvm-project?rev=156199&view=rev
Log:
compile cloog code only when CLOOG_FOUND is set
Modified:
polly/trunk/CMakeLists.txt
polly/trunk/Makefile.config.in
polly/trunk/autoconf/configure.ac
polly/trunk/configure
polly/trunk/include/polly/Cloog.h
polly/trunk/include/polly/CodeGen/CodeGeneration.h
polly/trunk/include/polly/Config/config.h.cmake
polly/trunk/include/polly/LinkAllPasses.h
polly/trunk/lib/CodeGen/CMakeLists.txt
polly/trunk/lib/Pocc.cpp
polly/trunk/lib/RegisterPasses.cpp
Modified: polly/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/CMakeLists.txt?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/CMakeLists.txt (original)
+++ polly/trunk/CMakeLists.txt Fri May 4 15:30:03 2012
@@ -85,7 +85,9 @@
FIND_PACKAGE(SCoPLib)
endif(POLLY_ENABLE_SCOPLIB)
-INCLUDE_DIRECTORIES( ${CLOOG_INCLUDE_DIR} )
+if (CLOOG_FOUND)
+ INCLUDE_DIRECTORIES( ${CLOOG_INCLUDE_DIR} )
+endif(CLOOG_FOUND)
INCLUDE_DIRECTORIES( ${ISL_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${GMP_INCLUDE_DIR} )
@@ -125,7 +127,11 @@
endforeach(lib)
endif( LLVM_USED_LIBS )
- target_link_libraries( ${name} ${CLOOG_LIBRARY} ${ISL_LIBRARY} ${GMP_LIBRARY})
+ target_link_libraries( ${name} ${ISL_LIBRARY} ${GMP_LIBRARY})
+
+ if (CLOOG_FOUND)
+ target_link_libraries( ${name} ${CLOOG_LIBRARY})
+ endif(CLOOG_FOUND)
if (OPENSCOP_FOUND)
target_link_libraries( ${name} ${OPENSCOP_LIBRARY})
endif(OPENSCOP_FOUND)
Modified: polly/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/Makefile.config.in?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/Makefile.config.in (original)
+++ polly/trunk/Makefile.config.in Fri May 4 15:30:03 2012
@@ -28,7 +28,7 @@
POLLY_CXXFLAGS += "-fno-rtti -fno-exceptions"
-# Do us work with scoplib?
+CLOOG_FOUND := @cloog_found@
OPENSCOP_FOUND := @openscop_found@
SCOPLIB_FOUND := @scoplib_found@
Modified: polly/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/autoconf/configure.ac?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/autoconf/configure.ac (original)
+++ polly/trunk/autoconf/configure.ac Fri May 4 15:30:03 2012
@@ -80,19 +80,20 @@
dnl Find Isl
find_lib_and_headers([isl], [isl/config.h], [isl], [required])
-dnl Find cloog
+dnl Check that we have cloog.
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $gmp_inc $isl_inc"
find_lib_and_headers([cloog], [cloog/isl/cloog.h], [cloog-isl], [required])
CXXFLAGS=$saved_CXXFLAGS
+AS_IF([test "cloog_found" = "xyes"],
+ [AC_DEFINE([CLOOG_FOUND],[1],[Define if cloog found])])
-
-dnl Check if Scoplib there
+dnl Check that we have openscop.
find_lib_and_headers([openscop], [openscop/scop.h], [openscop])
AS_IF([test "x$openscop_found" = "xyes"],
[AC_DEFINE([OPENSCOP_FOUND],[1],[Define if openscop found])])
-dnl Check if Scoplib there
+dnl Check that we have scoplib.
find_lib_and_headers([scoplib], [scoplib/scop.h], [scoplib])
AS_IF([test "x$scoplib_found" = "xyes"],
[AC_DEFINE([SCOPLIB_FOUND],[1],[Define if scoplib found])])
Modified: polly/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/configure?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/configure (original)
+++ polly/trunk/configure Fri May 4 15:30:03 2012
@@ -1700,7 +1700,7 @@
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -2099,7 +2099,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C++ compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -2142,7 +2142,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2201,7 +2201,7 @@
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
@@ -2253,7 +2253,7 @@
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -2622,7 +2622,11 @@
CXXFLAGS=$saved_CXXFLAGS
+if test "cloog_found" = "xyes"; then :
+$as_echo "#define CLOOG_FOUND 1" >>confdefs.h
+
+fi
ac_ext=cpp
@@ -3506,7 +3510,7 @@
"Makefile.common") CONFIG_FILES="$CONFIG_FILES Makefile.common" ;;
"include/polly/Config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/polly/Config/config.h" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -3822,7 +3826,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -3850,7 +3854,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -3877,7 +3881,7 @@
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
Modified: polly/trunk/include/polly/Cloog.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/Cloog.h?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/include/polly/Cloog.h (original)
+++ polly/trunk/include/polly/Cloog.h Fri May 4 15:30:03 2012
@@ -24,6 +24,10 @@
#ifndef POLLY_CLOOG_H
#define POLLY_CLOOG_H
+
+#include "polly/Config/config.h"
+#ifdef CLOOG_FOUND
+
#include "polly/ScopPass.h"
#define CLOOG_INT_GMP 1
@@ -66,4 +70,6 @@
class PassRegistry;
void initializeCloogInfoPass(llvm::PassRegistry&);
}
+
+#endif /* CLOOG_FOUND */
#endif /* POLLY_CLOOG_H */
Modified: polly/trunk/include/polly/CodeGen/CodeGeneration.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/CodeGeneration.h?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/CodeGeneration.h (original)
+++ polly/trunk/include/polly/CodeGen/CodeGeneration.h Fri May 4 15:30:03 2012
@@ -12,9 +12,13 @@
#ifndef POLLY_CODEGENERATION_H
#define POLLY_CODEGENERATION_H
+#include "polly/Config/config.h"
+#ifdef CLOOG_FOUND
+
namespace polly {
extern bool EnablePollyVector;
}
-#endif
+#endif // CLOOG_FOUND
+#endif // POLLY_CODEGENERATION_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=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/include/polly/Config/config.h.cmake (original)
+++ polly/trunk/include/polly/Config/config.h.cmake Fri May 4 15:30:03 2012
@@ -13,6 +13,7 @@
#ifndef POLLY_CONFIG_H
#define POLLY_CONFIG_H
+#cmakedefine CLOOG_FOUND
#cmakedefine OPENSCOP_FOUND
#cmakedefine SCOPLIB_FOUND
Modified: polly/trunk/include/polly/LinkAllPasses.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/LinkAllPasses.h?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/include/polly/LinkAllPasses.h (original)
+++ polly/trunk/include/polly/LinkAllPasses.h Fri May 4 15:30:03 2012
@@ -29,9 +29,11 @@
namespace polly {
Pass *createAffSCEVItTesterPass();
+#ifdef CLOOG_FOUND
Pass *createCloogExporterPass();
Pass *createCloogInfoPass();
Pass *createCodeGenerationPass();
+#endif
Pass *createCodePreparationPass();
Pass *createDeadCodeElimPass();
Pass *createDependencesPass();
@@ -77,9 +79,11 @@
return;
createAffSCEVItTesterPass();
+#ifdef CLOOG_FOUND
createCloogExporterPass();
createCloogInfoPass();
createCodeGenerationPass();
+#endif
createCodePreparationPass();
createDeadCodeElimPass();
createDependencesPass();
@@ -113,7 +117,9 @@
namespace llvm {
class PassRegistry;
+#ifdef CLOOG_FOUND
void initializeCodeGenerationPass(llvm::PassRegistry&);
+#endif
void initializeCodePreparationPass(llvm::PassRegistry&);
void initializeDeadCodeElimPass(llvm::PassRegistry&);
void initializeIndependentBlocksPass(llvm::PassRegistry&);
Modified: polly/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CMakeLists.txt?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ polly/trunk/lib/CodeGen/CMakeLists.txt Fri May 4 15:30:03 2012
@@ -1,6 +1,10 @@
+if (CLOOG_FOUND)
+ set(CLOOG_FILES
+ Cloog.cpp
+ CodeGeneration.cpp)
+endif (CLOOG_FOUND)
add_polly_library(PollyCodeGen
BlockGenerators.cpp
- Cloog.cpp
- CodeGeneration.cpp
+ ${CLOOG_FILES}
LoopGenerators.cpp
)
Modified: polly/trunk/lib/Pocc.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Pocc.cpp?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/lib/Pocc.cpp (original)
+++ polly/trunk/lib/Pocc.cpp Fri May 4 15:30:03 2012
@@ -16,7 +16,6 @@
//
//===----------------------------------------------------------------------===//
-#include "polly/Cloog.h"
#include "polly/LinkAllPasses.h"
#ifdef SCOPLIB_FOUND
Modified: polly/trunk/lib/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/RegisterPasses.cpp?rev=156199&r1=156198&r2=156199&view=diff
==============================================================================
--- polly/trunk/lib/RegisterPasses.cpp (original)
+++ polly/trunk/lib/RegisterPasses.cpp Fri May 4 15:30:03 2012
@@ -106,8 +106,10 @@
cl::init(false));
static void initializePollyPasses(PassRegistry &Registry) {
+#ifdef CLOOG_FOUND
initializeCloogInfoPass(Registry);
initializeCodeGenerationPass(Registry);
+#endif
initializeCodePreparationPass(Registry);
initializeDeadCodeElimPass(Registry);
initializeDependencesPass(Registry);
@@ -212,8 +214,10 @@
if (ExportJScop)
PM.add(polly::createJSONExporterPass());
+#ifdef CLOOG_FOUND
if (RunCodegen)
PM.add(polly::createCodeGenerationPass());
+#endif
if (CFGPrinter)
PM.add(llvm::createCFGPrinterPass());
More information about the llvm-commits
mailing list