brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.1 KiB · 7c609fd Raw
145 lines · plain
1set(LLVM_NO_RTTI 1)2 3set(ISL_CODEGEN_FILES4    CodeGen/IslAst.cpp5    CodeGen/IslExprBuilder.cpp6    CodeGen/IslNodeBuilder.cpp7    CodeGen/CodeGeneration.cpp)8 9# Compile ISL into a separate library.10add_subdirectory(External)11 12set(POLLY_HEADER_FILES)13if (MSVC_IDE OR XCODE)14  file(GLOB_RECURSE POLLY_HEADER_FILES "${POLLY_SOURCE_DIR}/include/polly/*.h")15endif ()16 17set(POLLY_COMPONENTS18    Support19    Core20    ScalarOpts21    InstCombine22    TransformUtils23    Analysis24    ipo25    MC26    Passes27    Linker28    IRReader29    Analysis30    # The libraries below are required for darwin: http://PR2639231    BitReader32    MCParser33    Object34    ProfileData35    Target36    TargetParser37    Vectorize38)39 40# Use an object-library to add the same files to multiple libs without requiring41# the sources them to be recompiled for each of them.42add_llvm_pass_plugin(Polly43  NO_MODULE44  SUBPROJECT Polly45  Analysis/DependenceInfo.cpp46  Analysis/ScopDetection.cpp47  Analysis/ScopDetectionDiagnostic.cpp48  Analysis/ScopInfo.cpp49  Analysis/ScopBuilder.cpp50  Analysis/ScopGraphPrinter.cpp51  Analysis/PruneUnprofitable.cpp52  CodeGen/BlockGenerators.cpp53  ${ISL_CODEGEN_FILES}54  CodeGen/LoopGenerators.cpp55  CodeGen/LoopGeneratorsGOMP.cpp56  CodeGen/LoopGeneratorsKMP.cpp57  CodeGen/IRBuilder.cpp58  CodeGen/Utils.cpp59  CodeGen/RuntimeDebugBuilder.cpp60  CodeGen/PerfMonitor.cpp61  Exchange/JSONExporter.cpp62  Pass/PhaseManager.cpp63  Pass/PollyFunctionPass.cpp64  Pass/PollyModulePass.cpp65  Support/GICHelper.cpp66  Support/PollyDebug.cpp67  Support/SCEVAffinator.cpp68  Support/SCEVValidator.cpp69  Support/RegisterPasses.cpp70  Support/ScopHelper.cpp71  Support/ScopLocation.cpp72  Support/ISLTools.cpp73  Support/DumpModulePass.cpp74  Support/DumpFunctionPass.cpp75  Support/VirtualInstruction.cpp76  Transform/Canonicalization.cpp77  Transform/CodePreparation.cpp78  Transform/DeadCodeElimination.cpp79  Transform/ScheduleOptimizer.cpp80  Transform/ScheduleTreeTransform.cpp81  Transform/FlattenSchedule.cpp82  Transform/FlattenAlgo.cpp83  Transform/ForwardOpTree.cpp84  Transform/DeLICM.cpp85  Transform/ZoneAlgo.cpp86  Transform/Simplify.cpp87  Transform/MaximalStaticExpansion.cpp88  Transform/ScopInliner.cpp89  Transform/ManualOptimizer.cpp90  Transform/MatmulOptimizer.cpp91  ${POLLY_HEADER_FILES}92 93  LINK_COMPONENTS94  ${POLLY_COMPONENTS}95  )96 97if (MSVC_IDE OR XCODE)98  # Configure source groups for Polly source files. By default, in the IDE there99  # will be a source and include folder. In the source folder will be all the100  # source files in a flat list, and in the include folder will be all the101  # headers in a flat list. Sets the CMake source_group for each folder such102  # the organization of the sources and headers in the IDE matches how it is103  # laid out on disk104  setup_polly_source_groups(${CMAKE_CURRENT_LIST_DIR}105    ${CMAKE_CURRENT_LIST_DIR}/../include/polly)106endif()107 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 with110# LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as111# well.112target_link_libraries(Polly PUBLIC113  ${ISL_TARGET}114)115 116# Create a loadable module Polly.so that can be loaded using117# LLVM's/clang's "-load" option.118if (WIN32 OR CYGWIN OR NOT LLVM_ENABLE_PIC)119  # Add dummy target, either because loadable modules are not supported120  # as on Windows or because PIC code has been disabled121  add_custom_target(LLVMPolly)122  set_target_properties(LLVMPolly PROPERTIES FOLDER "Polly/Loadable Modules")123else ()124  add_polly_loadable_module(LLVMPolly125    Plugin/Polly.cpp126    $<TARGET_OBJECTS:obj.Polly>127  )128 129  # Only add the dependencies that are not part of LLVM. The latter are assumed130  # 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 register132  # the same command line options, to which LLVM reacts with an error.133  target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET})134 135  set_target_properties(LLVMPolly136    PROPERTIES137    LINKER_LANGUAGE CXX138    PREFIX "")139endif ()140 141if (TARGET intrinsics_gen)142  # Check if we are building as part of an LLVM build143  add_dependencies(obj.Polly intrinsics_gen)144endif()145