5 CodeGen/IslExprBuilder.cpp
6 CodeGen/IslNodeBuilder.cpp
7 CodeGen/CodeGeneration.cpp)
9 # Compile ISL into a separate library.
10 add_subdirectory(External)
12 set(POLLY_HEADER_FILES)
13 if (MSVC_IDE OR XCODE)
14 file(GLOB_RECURSE POLLY_HEADER_FILES "${POLLY_SOURCE_DIR}/include/polly/*.h")
30 # The libraries below are required for darwin: http://PR26392
40 # Use an object-library to add the same files to multiple libs without requiring
41 # the sources them to be recompiled for each of them.
42 add_llvm_pass_plugin(Polly
45 Analysis/DependenceInfo.cpp
46 Analysis/PolyhedralInfo.cpp
47 Analysis/ScopDetection.cpp
48 Analysis/ScopDetectionDiagnostic.cpp
50 Analysis/ScopBuilder.cpp
51 Analysis/ScopGraphPrinter.cpp
53 Analysis/PruneUnprofitable.cpp
54 CodeGen/BlockGenerators.cpp
56 CodeGen/LoopGenerators.cpp
57 CodeGen/LoopGeneratorsGOMP.cpp
58 CodeGen/LoopGeneratorsKMP.cpp
61 CodeGen/RuntimeDebugBuilder.cpp
62 CodeGen/PerfMonitor.cpp
63 Exchange/JSONExporter.cpp
65 Support/PollyDebug.cpp
66 Support/SCEVAffinator.cpp
67 Support/SCEVValidator.cpp
68 Support/RegisterPasses.cpp
69 Support/ScopHelper.cpp
70 Support/ScopLocation.cpp
72 Support/DumpModulePass.cpp
73 Support/DumpFunctionPass.cpp
74 Support/VirtualInstruction.cpp
75 Transform/Canonicalization.cpp
76 Transform/CodePreparation.cpp
77 Transform/DeadCodeElimination.cpp
78 Transform/ScheduleOptimizer.cpp
79 Transform/ScheduleTreeTransform.cpp
80 Transform/FlattenSchedule.cpp
81 Transform/FlattenAlgo.cpp
82 Transform/ForwardOpTree.cpp
84 Transform/ZoneAlgo.cpp
85 Transform/Simplify.cpp
86 Transform/MaximalStaticExpansion.cpp
87 Transform/ScopInliner.cpp
88 Transform/ManualOptimizer.cpp
89 Transform/MatmulOptimizer.cpp
96 if (MSVC_IDE OR XCODE)
97 # Configure source groups for Polly source files. By default, in the IDE there
98 # will be a source and include folder. In the source folder will be all the
99 # source files in a flat list, and in the include folder will be all the
100 # headers in a flat list. Sets the CMake source_group for each folder such
101 # the organization of the sources and headers in the IDE matches how it is
103 setup_polly_source_groups(${CMAKE_CURRENT_LIST_DIR}
104 ${CMAKE_CURRENT_LIST_DIR}/../include/polly)
107 # Create the library that can be linked into LLVM's tools and Polly's unittests.
108 # It depends on all library it needs, such that with
109 # LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as
111 target_link_libraries(Polly PUBLIC
115 # Create a loadable module Polly.so that can be loaded using
116 # LLVM's/clang's "-load" option.
117 if (WIN32 OR CYGWIN OR NOT LLVM_ENABLE_PIC)
118 # Add dummy target, either because loadable modules are not supported
119 # as on Windows or because PIC code has been disabled
120 add_custom_target(LLVMPolly)
121 set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly/Loadable Modules")
123 add_polly_loadable_module(LLVMPolly
125 $<TARGET_OBJECTS:obj.Polly>
128 # Only add the dependencies that are not part of LLVM. The latter are assumed
129 # to be already available in the address space the module is loaded into.
130 # Adding them once more would have the effect that both copies try to register
131 # the same command line options, to which LLVM reacts with an error.
132 target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET})
134 set_target_properties(LLVMPolly
140 if (TARGET intrinsics_gen)
141 # Check if we are building as part of an LLVM build
142 add_dependencies(obj.Polly intrinsics_gen)