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/SCEVAffinator.cpp
66 Support/SCEVValidator.cpp
67 Support/RegisterPasses.cpp
68 Support/ScopHelper.cpp
69 Support/ScopLocation.cpp
71 Support/DumpModulePass.cpp
72 Support/DumpFunctionPass.cpp
73 Support/VirtualInstruction.cpp
74 Transform/Canonicalization.cpp
75 Transform/CodePreparation.cpp
76 Transform/DeadCodeElimination.cpp
77 Transform/ScheduleOptimizer.cpp
78 Transform/ScheduleTreeTransform.cpp
79 Transform/FlattenSchedule.cpp
80 Transform/FlattenAlgo.cpp
81 Transform/ForwardOpTree.cpp
83 Transform/ZoneAlgo.cpp
84 Transform/Simplify.cpp
85 Transform/MaximalStaticExpansion.cpp
86 Transform/ScopInliner.cpp
87 Transform/ManualOptimizer.cpp
88 Transform/MatmulOptimizer.cpp
94 set_target_properties(obj.Polly PROPERTIES FOLDER "Polly")
95 set_target_properties(Polly PROPERTIES FOLDER "Polly")
97 if (MSVC_IDE OR XCODE)
98 # Configure source groups for Polly source files. By default, in the IDE there
99 # will be a source and include folder. In the source folder will be all the
100 # source files in a flat list, and in the include folder will be all the
101 # headers in a flat list. Sets the CMake source_group for each folder such
102 # the organization of the sources and headers in the IDE matches how it is
104 setup_polly_source_groups(${CMAKE_CURRENT_LIST_DIR}
105 ${CMAKE_CURRENT_LIST_DIR}/../include/polly)
108 # Create the library that can be linked into LLVM's tools and Polly's unittests.
109 # It depends on all library it needs, such that with
110 # LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as
112 target_link_libraries(Polly PUBLIC
116 # Create a loadable module Polly.so that can be loaded using
117 # LLVM's/clang's "-load" option.
118 if (WIN32 OR CYGWIN OR NOT LLVM_ENABLE_PIC)
119 # Add dummy target, either because loadable modules are not supported
120 # as on Windows or because PIC code has been disabled
121 add_custom_target(LLVMPolly)
122 set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly")
124 add_polly_loadable_module(LLVMPolly
126 $<TARGET_OBJECTS:obj.Polly>
129 # Only add the dependencies that are not part of LLVM. The latter are assumed
130 # to be already available in the address space the module is loaded into.
131 # Adding them once more would have the effect that both copies try to register
132 # the same command line options, to which LLVM reacts with an error.
133 target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET})
135 set_target_properties(LLVMPolly
141 if (TARGET intrinsics_gen)
142 # Check if we are building as part of an LLVM build
143 add_dependencies(obj.Polly intrinsics_gen)