2014-03-04 03:30:19 +08:00
|
|
|
# build a monolithic libLLVMPollyLib.$shlibext
|
|
|
|
# and a thin module LLVMPolly.moduleext that links to that shared library
|
2011-04-29 14:27:02 +08:00
|
|
|
|
|
|
|
set(LLVM_NO_RTTI 1)
|
|
|
|
|
2012-08-02 15:47:26 +08:00
|
|
|
if (PLUTO_FOUND)
|
|
|
|
set(POLLY_PLUTO_FILES Pluto.cpp)
|
|
|
|
endif (PLUTO_FOUND)
|
|
|
|
|
2014-03-04 03:30:19 +08:00
|
|
|
set(POLLY_JSON_FILES
|
|
|
|
JSON/json_reader.cpp
|
|
|
|
JSON/json_value.cpp
|
|
|
|
JSON/json_writer.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if (CLOOG_FOUND)
|
|
|
|
set(CLOOG_FILES
|
|
|
|
CodeGen/Cloog.cpp
|
|
|
|
CodeGen/CodeGeneration.cpp)
|
|
|
|
endif (CLOOG_FOUND)
|
|
|
|
|
|
|
|
set(ISL_CODEGEN_FILES
|
|
|
|
CodeGen/IslAst.cpp
|
|
|
|
CodeGen/IslCodeGeneration.cpp)
|
|
|
|
|
|
|
|
if (GPU_CODEGEN)
|
|
|
|
set (GPGPU_CODEGEN_FILES
|
|
|
|
CodeGen/PTXGenerator.cpp)
|
|
|
|
endif (GPU_CODEGEN)
|
2011-04-29 14:27:02 +08:00
|
|
|
|
2014-03-04 03:30:19 +08:00
|
|
|
if (OPENSCOP_FOUND)
|
|
|
|
set(POLLY_OPENSCOP_FILES
|
|
|
|
Exchange/OpenScopImporter.cpp
|
|
|
|
Exchange/OpenScopExporter.cpp)
|
|
|
|
endif (OPENSCOP_FOUND)
|
|
|
|
|
|
|
|
if (SCOPLIB_FOUND)
|
|
|
|
set(POLLY_SCOPLIB_FILES
|
|
|
|
Pocc.cpp
|
|
|
|
Exchange/ScopLib.cpp
|
|
|
|
Exchange/ScopLibExporter.cpp
|
|
|
|
Exchange/ScopLibImporter.cpp)
|
|
|
|
endif (SCOPLIB_FOUND)
|
|
|
|
|
|
|
|
add_polly_library(LLVMPollyLib
|
|
|
|
Analysis/Dependences.cpp
|
|
|
|
Analysis/ScopDetection.cpp
|
|
|
|
Analysis/ScopInfo.cpp
|
|
|
|
Analysis/ScopGraphPrinter.cpp
|
|
|
|
Analysis/ScopPass.cpp
|
|
|
|
Analysis/TempScopInfo.cpp
|
|
|
|
CodeGen/BlockGenerators.cpp
|
|
|
|
${CLOOG_FILES}
|
|
|
|
${ISL_CODEGEN_FILES}
|
|
|
|
CodeGen/LoopGenerators.cpp
|
|
|
|
CodeGen/Utils.cpp
|
|
|
|
${GPGPU_CODEGEN_FILES}
|
|
|
|
Support/GICHelper.cpp
|
|
|
|
Support/SCEVValidator.cpp
|
|
|
|
Support/ScopHelper.cpp
|
|
|
|
Exchange/JSONExporter.cpp
|
|
|
|
${POLLY_JSON_FILES}
|
|
|
|
${POLLY_OPENSCOP_FILES}
|
2014-01-03 07:39:18 +08:00
|
|
|
Canonicalization.cpp
|
2011-04-29 14:27:02 +08:00
|
|
|
CodePreparation.cpp
|
2012-01-31 22:00:27 +08:00
|
|
|
DeadCodeElimination.cpp
|
2011-04-29 14:27:02 +08:00
|
|
|
IndependentBlocks.cpp
|
2012-02-14 22:02:33 +08:00
|
|
|
IndVarSimplify.cpp
|
2011-04-29 14:27:02 +08:00
|
|
|
Pocc.cpp
|
2011-08-24 06:35:38 +08:00
|
|
|
RegisterPasses.cpp
|
2011-05-15 03:02:06 +08:00
|
|
|
ScheduleOptimizer.cpp
|
2011-04-29 14:27:02 +08:00
|
|
|
${POLLY_SCOPLIB_FILES}
|
2012-08-02 15:47:26 +08:00
|
|
|
${POLLY_PLUTO_FILES}
|
2011-04-29 14:27:02 +08:00
|
|
|
)
|
|
|
|
|
2014-03-04 03:30:19 +08:00
|
|
|
target_link_libraries(LLVMPollyLib
|
|
|
|
LLVMSupport
|
|
|
|
LLVMScalarOpts
|
|
|
|
LLVMTransformUtils
|
|
|
|
LLVMipo
|
|
|
|
)
|
|
|
|
|
|
|
|
add_polly_loadable_module(LLVMPolly)
|
|
|
|
|
2012-09-04 16:19:12 +08:00
|
|
|
if (TARGET intrinsics_gen)
|
|
|
|
# Check if we are building as part of an LLVM build
|
|
|
|
add_dependencies(LLVMPolly intrinsics_gen)
|
|
|
|
endif()
|
|
|
|
|
2014-03-04 03:30:19 +08:00
|
|
|
target_link_libraries(LLVMPolly LLVMPollyLib)
|
2011-04-29 14:27:02 +08:00
|
|
|
|
|
|
|
set_target_properties(LLVMPolly
|
|
|
|
PROPERTIES
|
|
|
|
LINKER_LANGUAGE CXX
|
|
|
|
PREFIX "")
|
2012-08-02 15:47:26 +08:00
|
|
|
|
|
|
|
if (PLUTO_FOUND)
|
|
|
|
target_link_libraries(LLVMPolly ${PLUTO_LIBRARY})
|
|
|
|
endif(PLUTO_FOUND)
|