2011-04-29 06:27:02 +00:00
|
|
|
set(LLVM_NO_RTTI 1)
|
|
|
|
|
2014-03-03 19:30:19 +00:00
|
|
|
set(POLLY_JSON_FILES
|
|
|
|
JSON/json_reader.cpp
|
|
|
|
JSON/json_value.cpp
|
|
|
|
JSON/json_writer.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(ISL_CODEGEN_FILES
|
|
|
|
CodeGen/IslAst.cpp
|
2014-07-29 20:50:09 +00:00
|
|
|
CodeGen/IslExprBuilder.cpp
|
2015-04-27 12:32:24 +00:00
|
|
|
CodeGen/IslNodeBuilder.cpp
|
2015-05-12 07:45:52 +00:00
|
|
|
CodeGen/CodeGeneration.cpp)
|
2014-03-03 19:30:19 +00:00
|
|
|
|
|
|
|
if (GPU_CODEGEN)
|
2015-05-15 15:41:14 +00:00
|
|
|
set (GPGPU_CODEGEN_FILES)
|
2014-03-03 19:30:19 +00:00
|
|
|
endif (GPU_CODEGEN)
|
2011-04-29 06:27:02 +00:00
|
|
|
|
2015-06-22 17:52:33 +00:00
|
|
|
|
|
|
|
# External: Integer Set Library
|
|
|
|
set(ISL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/External/isl")
|
|
|
|
set(ISL_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/External/isl")
|
|
|
|
|
|
|
|
# Determine version of isl
|
|
|
|
if (EXISTS "${ISL_SOURCE_DIR}/GIT_HEAD_ID")
|
|
|
|
# The source comes from a 'make dist' archive
|
|
|
|
file(READ "${ISL_SOURCE_DIR}/GIT_HEAD_ID" GIT_HEAD_ID)
|
|
|
|
string(STRIP "${GIT_HEAD_ID}" GIT_HEAD_ID)
|
|
|
|
elseif (EXISTS "${ISL_SOURCE_DIR}/gitversion.h")
|
|
|
|
# The source directory is preconfigured
|
|
|
|
file(READ "${ISL_SOURCE_DIR}/gitversion.h" GITVERSION_H)
|
|
|
|
string(REGEX REPLACE ".*\\\"([^\\\"]*)\\\".*" "\\1" GIT_HEAD_ID "${GITVERSION_H}")
|
|
|
|
elseif ()
|
|
|
|
# Unknown revision
|
2015-07-21 12:01:14 +00:00
|
|
|
# TODO: We could look for a .git and get the revision from HEAD
|
2015-06-22 17:52:33 +00:00
|
|
|
set(GIT_HEAD_ID "UNKNOWN")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
message(STATUS "ISL version: ${GIT_HEAD_ID}")
|
|
|
|
|
|
|
|
# Enable small integer optimization and imath
|
|
|
|
set(USE_GMP_FOR_MP OFF)
|
|
|
|
set(USE_IMATH_FOR_MP ON)
|
Enable ISL's small integer optimization
Summary:
With small integer optimization (short: sio) enabled, ISL uses 32 bit
integers for its arithmetic and only falls back to a big integer library
(in the case of Polly: IMath) if an operation's result is too large.
This gives a massive performance boost for most application using ISL.
For instance, experiments with ppcg (polyhedral source-to-source
compiler) show speed-ups of 5.8 (compared to plain IMath), respectively
2.7 (compared to GMP).
In Polly, a smaller fraction of the total compile time is taken by ISL,
but the speed-ups are still very significant. The buildbots measure
compilation speed-up up to 1.8 (oourafft, floyd-warshall, symm). All
Polybench benchmarks compile in at least 9% less time, and about 20%
less on average.
Detailed Polybench compile time results (median of 10):
correlation -25.51%
covariance -24.82%
2mm -26.64%
3mm -28.69%
atax -13.70%
bicg -10.78%
cholesky -40.67%
doitgen -11.60%
gemm -11.54%
gemver -10.63%
gesummv -11.54%
mvt -9.43%
symm -41.25%
syr2k -14.71%
syrk -14.52%
trisolv -17.65%
trmm -9.78%
durbin -19.32%
dynprog -9.09%
gramschmidt -15.38%
lu -21.77%
floyd-warshall -42.71%
reg_detect -41.17%
adi -36.69%
fdtd-2d -32.61%
fdtd-apml -21.90%
jacobi-1d-imper -9.41%
jacobi-2d-imper -27.65%
seidel-2d -31.00%
Reviewers: grosser
Reviewed By: grosser
Subscribers: Meinersbur, llvm-commits, pollydev
Projects: #polly
Differential Revision: http://reviews.llvm.org/D10506
llvm-svn: 240689
2015-06-25 20:47:35 +00:00
|
|
|
set(USE_SMALL_INT_OPT ON)
|
2015-06-22 17:52:33 +00:00
|
|
|
|
|
|
|
# Determine compiler characteristics
|
|
|
|
include(CheckCSourceCompiles)
|
|
|
|
|
2015-07-21 12:01:14 +00:00
|
|
|
# Like check_c_source_compiles, but sets the result to either
|
|
|
|
# 0 (error while compiling) or 1 (compiled successfully)
|
|
|
|
# Required for compatibility with autotool's AC_CHECK_DECLS
|
|
|
|
function (check_c_source_compiles_numeric _prog _var)
|
|
|
|
check_c_source_compiles("${_prog}" "${_var}")
|
|
|
|
if ("${${_var}}")
|
|
|
|
set("${_var}" 1 PARENT_SCOPE)
|
|
|
|
else ()
|
|
|
|
set("${_var}" 0 PARENT_SCOPE)
|
|
|
|
endif ()
|
|
|
|
endfunction ()
|
|
|
|
|
2015-07-21 12:09:41 +00:00
|
|
|
# Check for the existance of a type
|
|
|
|
function (check_c_type_exists _type _files _variable)
|
|
|
|
set(_includes "")
|
|
|
|
foreach (file_name ${_files})
|
|
|
|
set(_includes "${_includes}#include<${file_name}>\n")
|
|
|
|
endforeach()
|
|
|
|
check_c_source_compiles("
|
|
|
|
${_includes}
|
|
|
|
${_type} typeVar;
|
|
|
|
int main() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
" ${_variable})
|
|
|
|
endfunction ()
|
|
|
|
|
2015-07-21 12:01:14 +00:00
|
|
|
|
2015-06-22 17:52:33 +00:00
|
|
|
check_c_source_compiles("
|
|
|
|
int func(void) __attribute__((__warn_unused_result__));
|
|
|
|
int main() { return 0; }
|
|
|
|
" HAS_ATTRIBUTE_WARN_UNUSED_RESULT)
|
|
|
|
set(GCC_WARN_UNUSED_RESULT)
|
|
|
|
if (HAS_ATTRIBUTE_WARN_UNUSED_RESULT)
|
|
|
|
set(GCC_WARN_UNUSED_RESULT "__attribute__((__warn_unused_result__))")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
check_c_source_compiles("
|
2015-07-21 12:01:14 +00:00
|
|
|
static void foo(void) __attribute__ ((unused));
|
|
|
|
int main() { return 0; }
|
|
|
|
" HAVE___ATTRIBUTE__)
|
|
|
|
|
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
2015-06-22 17:52:33 +00:00
|
|
|
#include <strings.h>
|
|
|
|
int main() { ffs(0); return 0; }
|
|
|
|
" HAVE_DECL_FFS)
|
|
|
|
|
2015-07-21 12:01:14 +00:00
|
|
|
check_c_source_compiles_numeric("
|
2015-06-22 17:52:33 +00:00
|
|
|
int main() { __builtin_ffs(0); return 0; }
|
|
|
|
" HAVE_DECL___BUILTIN_FFS)
|
2015-07-21 12:01:14 +00:00
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <intrin.h>
|
|
|
|
int main() { _BitScanForward(NULL, 0); return 0; }
|
|
|
|
" HAVE_DECL__BITSCANFORWARD)
|
|
|
|
|
|
|
|
if (NOT HAVE_DECL_FFS AND
|
|
|
|
NOT HAVE_DECL___BUILTIN_FFS AND
|
|
|
|
NOT HAVE_DECL__BITSCANFORWARD)
|
|
|
|
message(FATAL_ERROR "No ffs implementation found")
|
2015-06-22 17:52:33 +00:00
|
|
|
endif ()
|
|
|
|
|
2015-07-21 12:01:14 +00:00
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <strings.h>
|
|
|
|
int main() { strcasecmp(\"\", \"\"); return 0; }
|
|
|
|
" HAVE_DECL_STRCASECMP)
|
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <string.h>
|
|
|
|
int main() { _stricmp(\"\", \"\"); return 0; }
|
|
|
|
" HAVE_DECL__STRICMP)
|
|
|
|
|
|
|
|
if (NOT HAVE_DECL_STRCASECMP AND NOT HAVE_DECL__STRICMP)
|
|
|
|
message(FATAL_ERROR "No strcasecmp implementation found")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <strings.h>
|
|
|
|
int main() { strncasecmp(\"\", \"\", 0); return 0; }
|
|
|
|
" HAVE_DECL_STRNCASECMP)
|
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <string.h>
|
|
|
|
int main() { _strnicmp(\"\", \"\", 0); return 0; }
|
|
|
|
" HAVE_DECL__STRNICMP)
|
|
|
|
|
|
|
|
if (NOT HAVE_DECL_STRNCASECMP AND NOT HAVE_DECL__STRNICMP)
|
|
|
|
message(FATAL_ERROR "No strncasecmp implementation found")
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <stdio.h>
|
|
|
|
int main() { snprintf((void*)0, 0, \"\"); return 0; }
|
|
|
|
" HAVE_DECL_SNPRINTF)
|
|
|
|
|
|
|
|
check_c_source_compiles_numeric("
|
|
|
|
#include <stdio.h>
|
|
|
|
int main() { _snprintf((void*)0, 0, \"\"); return 0; }
|
|
|
|
" HAVE_DECL__SNPRINTF)
|
|
|
|
|
|
|
|
if (NOT HAVE_DECL_SNPRINTF AND NOT HAVE_DECL__SNPRINTF)
|
|
|
|
message(FATAL_ERROR "No snprintf implementation found")
|
|
|
|
endif ()
|
2015-06-22 17:52:33 +00:00
|
|
|
|
2015-07-21 12:09:41 +00:00
|
|
|
|
|
|
|
check_c_type_exists(uint8_t "" HAVE_UINT8T)
|
|
|
|
check_c_type_exists(uint8_t "stdint.h" HAVE_STDINT_H)
|
|
|
|
check_c_type_exists(uint8_t "inttypes.h" HAVE_INTTYPES_H)
|
|
|
|
check_c_type_exists(uint8_t "sys/types.h" HAVE_SYS_INTTYPES_H)
|
|
|
|
if (HAVE_UINT8T)
|
|
|
|
set(INCLUDE_STDINT_H "")
|
|
|
|
elseif (HAVE_STDINT_H)
|
|
|
|
set(INCLUDE_STDINT_H "#include <stdint.h>")
|
|
|
|
elseif (HAVE_INTTYPES_H)
|
|
|
|
set(INCLUDE_STDINT_H "#include <inttypes.h>")
|
|
|
|
elseif (HAVE_SYS_INTTYPES_H)
|
|
|
|
set(INCLUDE_STDINT_H "#include <sys/inttypes.h>")
|
|
|
|
else ()
|
|
|
|
message(FATAL_ERROR "No stdint.h or compatible found")
|
|
|
|
endif ()
|
|
|
|
|
2015-06-22 17:52:33 +00:00
|
|
|
# Write configure result
|
2015-07-21 12:06:27 +00:00
|
|
|
# configure_file(... COPYONLY) avoids that the time stamp changes if the file is identical
|
|
|
|
file(WRITE "${ISL_BINARY_DIR}/gitversion.h.tmp"
|
|
|
|
"#define GIT_HEAD_ID \"${GIT_HEAD_ID}\"")
|
|
|
|
configure_file("${ISL_BINARY_DIR}/gitversion.h.tmp"
|
|
|
|
"${ISL_BINARY_DIR}/gitversion.h" COPYONLY)
|
|
|
|
|
2015-07-21 12:09:41 +00:00
|
|
|
file(WRITE "${ISL_BINARY_DIR}/include/isl/stdint.h.tmp"
|
|
|
|
"${INCLUDE_STDINT_H}")
|
|
|
|
configure_file("${ISL_BINARY_DIR}/include/isl/stdint.h.tmp"
|
|
|
|
"${ISL_BINARY_DIR}/include/isl/stdint.h" COPYONLY)
|
|
|
|
|
2015-06-22 17:52:33 +00:00
|
|
|
configure_file("External/isl_config.h.cmake" "${ISL_BINARY_DIR}/isl_config.h")
|
|
|
|
|
2015-07-21 12:09:41 +00:00
|
|
|
|
2015-06-22 17:52:33 +00:00
|
|
|
# ISL files to compile
|
2015-02-04 20:55:43 +00:00
|
|
|
set (ISL_FILES
|
|
|
|
External/isl/basis_reduction_tab.c
|
|
|
|
External/isl/isl_aff.c
|
|
|
|
External/isl/isl_affine_hull.c
|
|
|
|
External/isl/isl_arg.c
|
|
|
|
External/isl/isl_ast_build.c
|
|
|
|
External/isl/isl_ast_build_expr.c
|
|
|
|
External/isl/isl_ast.c
|
|
|
|
External/isl/isl_ast_codegen.c
|
|
|
|
External/isl/isl_ast_graft.c
|
|
|
|
External/isl/isl_band.c
|
|
|
|
External/isl/isl_bernstein.c
|
|
|
|
External/isl/isl_blk.c
|
|
|
|
External/isl/isl_bound.c
|
|
|
|
External/isl/isl_coalesce.c
|
|
|
|
External/isl/isl_constraint.c
|
|
|
|
External/isl/isl_convex_hull.c
|
|
|
|
External/isl/isl_ctx.c
|
|
|
|
External/isl/isl_deprecated.c
|
|
|
|
External/isl/isl_dim_map.c
|
|
|
|
External/isl/isl_equalities.c
|
|
|
|
External/isl/isl_factorization.c
|
|
|
|
External/isl/isl_farkas.c
|
2015-07-21 12:01:14 +00:00
|
|
|
External/isl/isl_ffs.c
|
2015-02-04 20:55:43 +00:00
|
|
|
External/isl/isl_flow.c
|
|
|
|
External/isl/isl_fold.c
|
|
|
|
External/isl/isl_hash.c
|
|
|
|
External/isl/isl_id.c
|
|
|
|
External/isl/isl_id_to_ast_expr.c
|
|
|
|
External/isl/isl_id_to_pw_aff.c
|
|
|
|
External/isl/isl_ilp.c
|
|
|
|
External/isl/isl_imath.c
|
|
|
|
External/isl/isl_input.c
|
Enable ISL's small integer optimization
Summary:
With small integer optimization (short: sio) enabled, ISL uses 32 bit
integers for its arithmetic and only falls back to a big integer library
(in the case of Polly: IMath) if an operation's result is too large.
This gives a massive performance boost for most application using ISL.
For instance, experiments with ppcg (polyhedral source-to-source
compiler) show speed-ups of 5.8 (compared to plain IMath), respectively
2.7 (compared to GMP).
In Polly, a smaller fraction of the total compile time is taken by ISL,
but the speed-ups are still very significant. The buildbots measure
compilation speed-up up to 1.8 (oourafft, floyd-warshall, symm). All
Polybench benchmarks compile in at least 9% less time, and about 20%
less on average.
Detailed Polybench compile time results (median of 10):
correlation -25.51%
covariance -24.82%
2mm -26.64%
3mm -28.69%
atax -13.70%
bicg -10.78%
cholesky -40.67%
doitgen -11.60%
gemm -11.54%
gemver -10.63%
gesummv -11.54%
mvt -9.43%
symm -41.25%
syr2k -14.71%
syrk -14.52%
trisolv -17.65%
trmm -9.78%
durbin -19.32%
dynprog -9.09%
gramschmidt -15.38%
lu -21.77%
floyd-warshall -42.71%
reg_detect -41.17%
adi -36.69%
fdtd-2d -32.61%
fdtd-apml -21.90%
jacobi-1d-imper -9.41%
jacobi-2d-imper -27.65%
seidel-2d -31.00%
Reviewers: grosser
Reviewed By: grosser
Subscribers: Meinersbur, llvm-commits, pollydev
Projects: #polly
Differential Revision: http://reviews.llvm.org/D10506
llvm-svn: 240689
2015-06-25 20:47:35 +00:00
|
|
|
External/isl/isl_int_sioimath.c
|
2015-02-04 20:55:43 +00:00
|
|
|
External/isl/isl_local_space.c
|
|
|
|
External/isl/isl_lp.c
|
|
|
|
External/isl/isl_map.c
|
2015-02-16 19:33:40 +00:00
|
|
|
External/isl/isl_map_list.c
|
2015-02-04 20:55:43 +00:00
|
|
|
External/isl/isl_map_simplify.c
|
|
|
|
External/isl/isl_map_subtract.c
|
|
|
|
External/isl/isl_map_to_basic_set.c
|
|
|
|
External/isl/isl_mat.c
|
|
|
|
External/isl/isl_morph.c
|
|
|
|
External/isl/isl_obj.c
|
|
|
|
External/isl/isl_options.c
|
|
|
|
External/isl/isl_output.c
|
|
|
|
External/isl/isl_point.c
|
|
|
|
External/isl/isl_polynomial.c
|
|
|
|
External/isl/isl_printer.c
|
|
|
|
External/isl/isl_range.c
|
|
|
|
External/isl/isl_reordering.c
|
|
|
|
External/isl/isl_sample.c
|
|
|
|
External/isl/isl_scan.c
|
|
|
|
External/isl/isl_schedule.c
|
2015-02-16 19:33:40 +00:00
|
|
|
External/isl/isl_schedule_band.c
|
|
|
|
External/isl/isl_schedule_node.c
|
|
|
|
External/isl/isl_schedule_read.c
|
|
|
|
External/isl/isl_schedule_tree.c
|
2015-02-04 20:55:43 +00:00
|
|
|
External/isl/isl_scheduler.c
|
|
|
|
External/isl/isl_seq.c
|
|
|
|
External/isl/isl_set_list.c
|
|
|
|
External/isl/isl_sort.c
|
|
|
|
External/isl/isl_space.c
|
|
|
|
External/isl/isl_stream.c
|
|
|
|
External/isl/isl_tab.c
|
|
|
|
External/isl/isl_tab_pip.c
|
|
|
|
External/isl/isl_tarjan.c
|
|
|
|
External/isl/isl_transitive_closure.c
|
|
|
|
External/isl/isl_union_map.c
|
|
|
|
External/isl/isl_val.c
|
Enable ISL's small integer optimization
Summary:
With small integer optimization (short: sio) enabled, ISL uses 32 bit
integers for its arithmetic and only falls back to a big integer library
(in the case of Polly: IMath) if an operation's result is too large.
This gives a massive performance boost for most application using ISL.
For instance, experiments with ppcg (polyhedral source-to-source
compiler) show speed-ups of 5.8 (compared to plain IMath), respectively
2.7 (compared to GMP).
In Polly, a smaller fraction of the total compile time is taken by ISL,
but the speed-ups are still very significant. The buildbots measure
compilation speed-up up to 1.8 (oourafft, floyd-warshall, symm). All
Polybench benchmarks compile in at least 9% less time, and about 20%
less on average.
Detailed Polybench compile time results (median of 10):
correlation -25.51%
covariance -24.82%
2mm -26.64%
3mm -28.69%
atax -13.70%
bicg -10.78%
cholesky -40.67%
doitgen -11.60%
gemm -11.54%
gemver -10.63%
gesummv -11.54%
mvt -9.43%
symm -41.25%
syr2k -14.71%
syrk -14.52%
trisolv -17.65%
trmm -9.78%
durbin -19.32%
dynprog -9.09%
gramschmidt -15.38%
lu -21.77%
floyd-warshall -42.71%
reg_detect -41.17%
adi -36.69%
fdtd-2d -32.61%
fdtd-apml -21.90%
jacobi-1d-imper -9.41%
jacobi-2d-imper -27.65%
seidel-2d -31.00%
Reviewers: grosser
Reviewed By: grosser
Subscribers: Meinersbur, llvm-commits, pollydev
Projects: #polly
Differential Revision: http://reviews.llvm.org/D10506
llvm-svn: 240689
2015-06-25 20:47:35 +00:00
|
|
|
External/isl/isl_val_sioimath.c
|
2015-02-04 20:55:43 +00:00
|
|
|
External/isl/isl_vec.c
|
|
|
|
External/isl/isl_version.c
|
|
|
|
External/isl/isl_vertices.c
|
|
|
|
External/isl/print.c
|
|
|
|
External/isl/imath/gmp_compat.c
|
|
|
|
External/isl/imath/imath.c
|
|
|
|
External/isl/imath/imrat.c
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2014-03-11 21:26:02 +00:00
|
|
|
add_polly_library(Polly
|
2015-03-04 22:43:40 +00:00
|
|
|
Analysis/DependenceInfo.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
Analysis/ScopDetection.cpp
|
2014-05-24 09:24:53 +00:00
|
|
|
Analysis/ScopDetectionDiagnostic.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
Analysis/ScopInfo.cpp
|
|
|
|
Analysis/ScopGraphPrinter.cpp
|
|
|
|
Analysis/ScopPass.cpp
|
|
|
|
Analysis/TempScopInfo.cpp
|
|
|
|
CodeGen/BlockGenerators.cpp
|
|
|
|
${ISL_CODEGEN_FILES}
|
|
|
|
CodeGen/LoopGenerators.cpp
|
2014-03-04 14:59:00 +00:00
|
|
|
CodeGen/IRBuilder.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
CodeGen/Utils.cpp
|
2014-07-25 17:49:55 +00:00
|
|
|
CodeGen/RuntimeDebugBuilder.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
${GPGPU_CODEGEN_FILES}
|
2014-03-11 21:25:59 +00:00
|
|
|
Exchange/JSONExporter.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
Support/GICHelper.cpp
|
|
|
|
Support/SCEVValidator.cpp
|
2014-03-11 21:26:06 +00:00
|
|
|
Support/RegisterPasses.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
Support/ScopHelper.cpp
|
2015-05-03 05:21:36 +00:00
|
|
|
Support/ScopLocation.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
${POLLY_JSON_FILES}
|
2014-03-11 21:25:59 +00:00
|
|
|
Transform/Canonicalization.cpp
|
|
|
|
Transform/CodePreparation.cpp
|
|
|
|
Transform/DeadCodeElimination.cpp
|
|
|
|
Transform/IndependentBlocks.cpp
|
|
|
|
Transform/ScheduleOptimizer.cpp
|
2015-02-04 20:55:43 +00:00
|
|
|
${ISL_FILES}
|
2011-04-29 06:27:02 +00:00
|
|
|
)
|
|
|
|
|
2015-06-22 20:31:16 +00:00
|
|
|
# ISL requires at least C99 to compile. gcc < 5.0 use -std=gnu89 as default.
|
|
|
|
target_enable_c99(Polly)
|
|
|
|
|
2015-02-12 08:27:19 +00:00
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
target_link_libraries(Polly
|
|
|
|
LLVMSupport
|
|
|
|
LLVMCore
|
|
|
|
LLVMScalarOpts
|
|
|
|
LLVMInstCombine
|
|
|
|
LLVMTransformUtils
|
|
|
|
LLVMAnalysis
|
|
|
|
LLVMipo
|
2015-03-09 13:35:19 +00:00
|
|
|
LLVMMC
|
2015-02-12 08:27:19 +00:00
|
|
|
)
|
2015-03-04 18:51:27 +00:00
|
|
|
link_directories(
|
|
|
|
${LLVM_LIBRARY_DIR}
|
|
|
|
)
|
2015-02-12 08:27:19 +00:00
|
|
|
endif()
|
|
|
|
|
2014-03-13 22:07:17 +00:00
|
|
|
# Build a monolithic Polly.a and a thin module LLVMPolly.moduleext that links to
|
|
|
|
# that static library.
|
2014-03-03 21:58:50 +00:00
|
|
|
add_polly_loadable_module(LLVMPolly
|
2014-03-11 21:26:06 +00:00
|
|
|
Polly.cpp
|
2014-03-03 19:30:19 +00:00
|
|
|
)
|
|
|
|
|
2012-09-04 08:19:12 +00:00
|
|
|
if (TARGET intrinsics_gen)
|
|
|
|
# Check if we are building as part of an LLVM build
|
2014-03-13 20:29:19 +00:00
|
|
|
add_dependencies(Polly intrinsics_gen)
|
2012-09-04 08:19:12 +00:00
|
|
|
endif()
|
|
|
|
|
2014-03-11 21:26:02 +00:00
|
|
|
target_link_libraries(LLVMPolly Polly)
|
2011-04-29 06:27:02 +00:00
|
|
|
|
|
|
|
set_target_properties(LLVMPolly
|
|
|
|
PROPERTIES
|
|
|
|
LINKER_LANGUAGE CXX
|
|
|
|
PREFIX "")
|