head 1.5; access; symbols pkgsrc-2024Q1:1.4.0.52 pkgsrc-2024Q1-base:1.4 pkgsrc-2023Q4:1.4.0.50 pkgsrc-2023Q4-base:1.4 pkgsrc-2023Q3:1.4.0.48 pkgsrc-2023Q3-base:1.4 pkgsrc-2023Q2:1.4.0.46 pkgsrc-2023Q2-base:1.4 pkgsrc-2023Q1:1.4.0.44 pkgsrc-2023Q1-base:1.4 pkgsrc-2022Q4:1.4.0.42 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.4.0.40 pkgsrc-2022Q3-base:1.4 pkgsrc-2022Q2:1.4.0.38 pkgsrc-2022Q2-base:1.4 pkgsrc-2022Q1:1.4.0.36 pkgsrc-2022Q1-base:1.4 pkgsrc-2021Q4:1.4.0.34 pkgsrc-2021Q4-base:1.4 pkgsrc-2021Q3:1.4.0.32 pkgsrc-2021Q3-base:1.4 pkgsrc-2021Q2:1.4.0.30 pkgsrc-2021Q2-base:1.4 pkgsrc-2021Q1:1.4.0.28 pkgsrc-2021Q1-base:1.4 pkgsrc-2020Q4:1.4.0.26 pkgsrc-2020Q4-base:1.4 pkgsrc-2020Q3:1.4.0.24 pkgsrc-2020Q3-base:1.4 pkgsrc-2020Q2:1.4.0.22 pkgsrc-2020Q2-base:1.4 pkgsrc-2020Q1:1.4.0.18 pkgsrc-2020Q1-base:1.4 pkgsrc-2019Q4:1.4.0.20 pkgsrc-2019Q4-base:1.4 pkgsrc-2019Q3:1.4.0.16 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.14 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.12 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.10 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.8 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.6 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.4 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.2 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.3.0.8 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.4 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.2 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.2.0.2 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.1.0.2 pkgsrc-2016Q3-base:1.1; locks; strict; comment @# @; 1.5 date 2024.04.22.07.25.56; author adam; state dead; branches; next 1.4; commitid nK5sAHh3Q2oJT67F; 1.4 date 2017.12.01.19.22.12; author adam; state Exp; branches; next 1.3; commitid RNNRTudpzr1HSdhA; 1.3 date 2017.03.17.22.38.17; author adam; state Exp; branches; next 1.2; commitid RtC8EMbuGmoliXJz; 1.2 date 2016.11.14.20.49.15; author ryoon; state Exp; branches; next 1.1; commitid zf2ADDoGJf26E8uz; 1.1 date 2016.09.12.22.49.23; author kamil; state Exp; branches; next ; commitid BCoszkYH5IOUj3mz; desc @@ 1.5 log @polly openmp: updated to 17.0.6 17.0.6 https://releases.llvm.org/17.0.1/tools/polly/docs/ReleaseNotes.html @ text @$NetBSD: patch-CMakeLists.txt,v 1.4 2017/12/01 19:22:12 adam Exp $ Disable tests: they require missing files from standard LLVM build (lit tool) --- CMakeLists.txt.orig 2017-07-11 11:37:35.000000000 +0000 +++ CMakeLists.txt @@@@ -176,10 +176,6 @@@@ add_definitions( -D_GNU_SOURCE ) add_subdirectory(docs) add_subdirectory(lib) -add_subdirectory(test) -if (POLLY_GTEST_AVAIL) - add_subdirectory(unittests) -endif () add_subdirectory(tools) add_subdirectory(cmake) # TODO: docs. @ 1.4 log @llvm: updated to 5.0.0 5.0.0: Non-comprehensive list of changes in this release * LLVM’s WeakVH has been renamed to WeakTrackingVH and a new WeakVH has been introduced. The new WeakVH nulls itself out on deletion, but does not track values across RAUW. * A new library named BinaryFormat has been created which holds a collection of code which previously lived in Support. This includes the file_magic structure and identify_magic functions, as well as all the structure and type definitions for DWARF, ELF, COFF, WASM, and MachO file formats. * The tool llvm-pdbdump has been renamed llvm-pdbutil to better reflect its nature as a general purpose PDB manipulation / diagnostics tool that does more than just dumping contents. * The BBVectorize pass has been removed. It was fully replaced and no longer used back in 2014 but we didn’t get around to removing it. Now it is gone. The SLP vectorizer is the suggested non-loop vectorization pass. * A new tool opt-viewer.py has been added to visualize optimization remarks in HTML. The tool processes the YAML files produced by clang with the -fsave-optimization-record option. * A new CMake macro LLVM_REVERSE_ITERATION has been added. If enabled, all supported unordered LLVM containers would be iterated in reverse order. This is useful for uncovering non-determinism caused by iteration of unordered containers. Currently, it supports reverse iteration of SmallPtrSet and DenseMap. * A new tool llvm-dlltool has been added to create short import libraries from GNU style definition files. The tool utilizes the PE COFF SPEC Import Library Format and PE COFF Auxiliary Weak Externals Format to achieve compatibility with LLD and MSVC LINK. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.3 2017/03/17 22:38:17 adam Exp $ @ 1.3 log @LLVM 4.0.0: The minimum compiler version required for building LLVM has been raised to 4.8 for GCC and 2015 for Visual Studio. The C API functions LLVMAddFunctionAttr, LLVMGetFunctionAttr, LLVMRemoveFunctionAttr, LLVMAddAttribute, LLVMRemoveAttribute, LLVMGetAttribute, LLVMAddInstrAttribute and LLVMRemoveInstrAttribute have been removed. The C API enum LLVMAttribute has been deleted. The definition and uses of LLVM_ATRIBUTE_UNUSED_RESULT in the LLVM source were replaced with LLVM_NODISCARD, which matches the C++17 [[nodiscard]] semantics rather than gcc’s __attribute__((warn_unused_result)). The Timer related APIs now expect a Name and Description. When upgrading code the previously used names should become descriptions and a short name in the style of a programming language identifier should be added. LLVM now handles invariant.group across different basic blocks, which makes it possible to devirtualize virtual calls inside loops. The aggressive dead code elimination phase (“adce”) now removes branches which do not effect program behavior. Loops are retained by default since they may be infinite but these can also be removed with LLVM option -adce-remove-loops when the loop body otherwise has no live operations. The llvm-cov tool can now export coverage data as json. Its html output mode has also improved. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 3 Bump minimal required CMake version to 3.4.3 like modern LLVM Add support for standalone builds Disable tests - they require missing files from standard LLVM build (lit tool) d5 1 a5 1 --- CMakeLists.txt.orig 2017-01-11 01:07:37.000000000 +0000 d7 1 a7 212 @@@@ -1,117 +1,106 @@@@ # Check if this is a in tree build. if (NOT DEFINED LLVM_MAIN_SRC_DIR) project(Polly) - cmake_minimum_required(VERSION 2.8) + cmake_minimum_required(VERSION 3.4.3) - # Where is LLVM installed? - set(LLVM_INSTALL_ROOT "" CACHE PATH "Root of LLVM install.") - # Check if the LLVM_INSTALL_ROOT valid. - if( NOT EXISTS ${LLVM_INSTALL_ROOT}/include/llvm ) - message(FATAL_ERROR "LLVM_INSTALL_ROOT (${LLVM_INSTALL_ROOT}) is not a valid LLVM installation.") - endif(NOT EXISTS ${LLVM_INSTALL_ROOT}/include/llvm) - # FileCheck, not and llvm-lit are not install by default, warn the user to copy them. - if( NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/FileCheck - OR NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/not - OR NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/llvm-lit ) - message(WARNING "'FileCheck', 'not' and 'llvm-lit' are required by running regress tests, " - "but they are not installed! Please copy them to " - "${LLVM_INSTALL_ROOT}/bin.") - endif() - # Add the llvm header path. - include_directories(${LLVM_INSTALL_ROOT}/include/) - - # Get the system librarys that will link into LLVM. - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --system-libs - OUTPUT_VARIABLE LLVM_SYSTEM_LIBS - OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "System libs required by LLVM: ${LLVM_SYSTEM_LIBS}") - - # Determine where LLVM stores its libraries. - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --libdir - OUTPUT_VARIABLE LLVM_LIBRARY_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - link_directories("${LLVM_LIBRARY_DIR}") + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) - # Now set the header paths. - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --includedir - OUTPUT_VARIABLE LLVM_INCLUDE_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - include_directories( ${LLVM_INCLUDE_DIR} ) - - # Get the TARGET_TRIPLE - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --host-target - OUTPUT_VARIABLE TARGET_TRIPLE - OUTPUT_STRIP_TRAILING_WHITESPACE) - - # And then set the cxx flags. - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --cxxflags - OUTPUT_VARIABLE LLVM_CXX_FLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS}) - - # Check LLVM_ENABLE_ASSERTIONS - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --assertion-mode - OUTPUT_VARIABLE LLVM_ENABLE_ASSERTIONS - OUTPUT_STRIP_TRAILING_WHITESPACE) - # Copied from LLVM's HandleLLVMOptions.cmake - if( LLVM_ENABLE_ASSERTIONS ) - # MSVC doesn't like _DEBUG on release builds. See PR 4379. - if( NOT MSVC ) - add_definitions( -D_DEBUG ) - endif() - # On non-Debug builds cmake automatically defines NDEBUG, so we - # explicitly undefine it: - if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) - add_definitions( -UNDEBUG ) - # Also remove /D NDEBUG to avoid MSVC warnings about conflicting defines. - foreach (flags_var_to_scrub - CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS_MINSIZEREL - CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_C_FLAGS_MINSIZEREL) - string (REGEX REPLACE "(^| )[/-]D *NDEBUG($| )" " " - "${flags_var_to_scrub}" "${${flags_var_to_scrub}}") - endforeach() - endif() - endif() - - # Sources available, too? - execute_process(COMMAND "${LLVM_INSTALL_ROOT}/bin/llvm-config" --src-root - OUTPUT_VARIABLE MAIN_SRC_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(LLVM_SOURCE_ROOT ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") - - # Enable unit tests if available. - set(UNITTEST_DIR ${LLVM_SOURCE_ROOT}/utils/unittest) - if(EXISTS ${UNITTEST_DIR}/googletest/include/gtest/gtest.h) - add_library(gtest - ${UNITTEST_DIR}/googletest/src/gtest-all.cc - ${UNITTEST_DIR}/googlemock/src/gmock-all.cc - ) - target_include_directories(gtest - PUBLIC - "${UNITTEST_DIR}/googletest/include" - "${UNITTEST_DIR}/googlemock/include" - - PRIVATE - "${UNITTEST_DIR}/googletest" - "${UNITTEST_DIR}/googlemock" + # Rely on llvm-config. + set(CONFIG_OUTPUT) + find_program(LLVM_CONFIG "llvm-config") + if(LLVM_CONFIG) + message(STATUS "Found LLVM_CONFIG as ${LLVM_CONFIG}") + set(CONFIG_COMMAND ${LLVM_CONFIG} + "--assertion-mode" + "--bindir" + "--libdir" + "--includedir" + "--prefix" + "--src-root") + execute_process( + COMMAND ${CONFIG_COMMAND} + RESULT_VARIABLE HAD_ERROR + OUTPUT_VARIABLE CONFIG_OUTPUT ) - target_link_libraries(gtest ${LLVM_SYSTEM_LIBS}) + if(NOT HAD_ERROR) + string(REGEX REPLACE + "[ \t]*[\r\n]+[ \t]*" ";" + CONFIG_OUTPUT ${CONFIG_OUTPUT}) + else() + string(REPLACE ";" " " CONFIG_COMMAND_STR "${CONFIG_COMMAND}") + message(STATUS "${CONFIG_COMMAND_STR}") + message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}") + endif() + else() + message(FATAL_ERROR "llvm-config not found -- ${LLVM_CONFIG}") + endif() - add_library(gtest_main ${UNITTEST_DIR}/UnitTestMain/TestMain.cpp) - target_link_libraries(gtest_main gtest) + list(GET CONFIG_OUTPUT 0 ENABLE_ASSERTIONS) + list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR) + list(GET CONFIG_OUTPUT 2 LIBRARY_DIR) + list(GET CONFIG_OUTPUT 3 INCLUDE_DIR) + list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) + list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) + + if(NOT MSVC_IDE) + set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} + CACHE BOOL "Enable assertions") + # Assertions should follow llvm-config's. + mark_as_advanced(LLVM_ENABLE_ASSERTIONS) + endif() + + set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") + set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") + set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files") + set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") + set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") + + find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} + NO_DEFAULT_PATH) + + set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib/cmake/llvm") + set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") + if(EXISTS ${LLVMCONFIG_FILE}) + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") + include(${LLVMCONFIG_FILE}) + else() + message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}") + endif() - set(POLLY_GTEST_AVAIL 1) + # They are used as destination of target generators. + set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) + set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) + if(WIN32 OR CYGWIN) + # DLL platform -- put DLLs into bin. + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) + else() + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) + endif() + + include(AddLLVM) + include(HandleLLVMOptions) + include(TableGen) + + # Import CMake library targets from LLVM and Clang. + include("${LLVM_OBJ_ROOT}/lib/cmake/llvm/LLVMConfig.cmake") + set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") + set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR}) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") + # Next three include directories are needed when llvm-config is located in build directory. + # LLVM and Cland are assumed to be built together + if (EXISTS "${LLVM_OBJ_ROOT}/include") + include_directories("${LLVM_OBJ_ROOT}/include") endif() + link_directories("${LLVM_LIBRARY_DIR}") - # Make sure the isl c files are built as fPIC - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") -else () - set(LLVM_SOURCE_ROOT "${LLVM_MAIN_SRC_DIR}") - set(POLLY_GTEST_AVAIL 1) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}) + + set(POLLY_BUILT_STANDALONE 1) endif () set(POLLY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) @@@@ -190,10 +179,6 @@@@ add_definitions( -D_GNU_SOURCE ) d16 1 a17 1 @ 1.2 log @Update to 3.9.0 Changelog: * Polly directly available in clang/opt/bugpoint * Increased analysis coverage * Fine-grain dependences analysis * Update of the isl math library @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.1 2016/09/12 22:49:23 kamil Exp $ d7 1 a7 1 --- CMakeLists.txt.orig 2016-07-15 07:50:36.000000000 +0000 d9 1 a9 1 @@@@ -1,90 +1,107 @@@@ d22 1 a22 1 - #FileCheck is not install by default, warn the user to Copy FileCheck d24 4 a27 3 - OR NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/not) - message(WARNING "FileCheck or not are required by running regress tests, " - "but they are not installed! Please copy it to " d29 1 a29 2 - endif(NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/FileCheck - OR NOT EXISTS ${LLVM_INSTALL_ROOT}/bin/not) d34 4 a37 16 - function(get_system_libs return_var) - # Returns in `return_var' a list of system libraries used by LLVM. - if( NOT MSVC ) - if( MINGW ) - set(system_libs ${system_libs} imagehlp psapi) - elseif( CMAKE_HOST_UNIX ) - if( HAVE_LIBDL ) - set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) - endif() - if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) - set(system_libs ${system_libs} pthread) - endif() - endif( MINGW ) - endif( NOT MSVC ) - set(${return_var} ${system_libs} PARENT_SCOPE) - endfunction(get_system_libs) d39 7 d89 23 a111 2 + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) + d128 2 a129 1 + ) a137 1 + d142 3 a144 1 + d172 1 a172 1 + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") d177 2 a178 1 + d187 2 a188 4 endif() - # Make sure the isl c files are built as fPIC - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") d204 1 a204 1 + endif() d206 6 a211 1 + d213 1 a213 1 + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}) d217 1 a217 1 endif(NOT DEFINED LLVM_MAIN_SRC_DIR) d220 1 a220 10 @@@@ -111,7 +128,7 @@@@ else () endif () # Add path for custom modules -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${POLLY_SOURCE_DIR}/cmake") +set (CMAKE_MODULE_PATH "/usr/tmp/pkgsrc/devel/polly/work/.buildlink/cmake-Modules" ${CMAKE_MODULE_PATH} "${POLLY_SOURCE_DIR}/cmake") SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) @@@@ -163,7 +180,7 @@@@ add_definitions( -D_GNU_SOURCE ) d225 3 a227 1 +#add_subdirectory(test) @ 1.1 log @Import LLVM Polly 3.8.1 as devel/polly Polly is a high-level loop and data-locality optimizer and optimization infrastructure for LLVM. It uses an abstract mathematical representation based on integer polyhedra to analyze and optimize the memory access pattern of a program. We currently perform classical loop transformations, especially tiling and loop fusion to improve data-locality. Polly can also exploit OpenMP level parallelism, expose SIMDization opportunities. Work has also be done in the area of automatic GPU code generation. For many users, however, it's not the existing optimizations in Polly that are of most interest, but the new analyses and optimizations enabled by the Polly infrastructure. At polyhedral.info you can get an idea of what has already been done and what is possible in the context of polyhedral compilation. @ text @d1 1 a1 1 $NetBSD$ d7 1 a7 1 --- CMakeLists.txt.orig 2015-10-15 12:18:37.000000000 +0000 d151 1 a151 1 + set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/share/llvm/cmake") d177 1 a177 1 + include("${LLVM_OBJ_ROOT}/share/llvm/cmake/LLVMConfig.cmake") d198 2 a199 2 @@@@ -155,7 +172,7 @@@@ install(DIRECTORY ${POLLY_BINARY_DIR}/in add_definitions( -D_GNU_SOURCE ) d201 9 @