From b3ec78370ab0362e1fde05f52b22bd3d44bc725d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 8 Sep 2021 21:54:15 -0700 Subject: clang: Update to latest 13.x Drop upstreamed patches Brings following changes * Workaround incorre ct types when lowering fixed length gather/scatter * f17d60d62028 Inform pass manager when child loops are deleted * f56129fe78d5 Fine grain control over some sym bol visibility * dc10ff25f54b [AArch64][SME] Fix imm bug in mov vector to tile aliases * b77c810feba0 Revert "[HardwareLoops] Change order of SCEV expression construction for Init LoopCount." * 02dece03f93d [clang] fix transformation of template arguments of 'auto' type constraints * 297e9237db53 [SelectionDAGBuilder] Bugfix in visitInlineAsm() * bc3cbd744d70 [llvm-objdump] Fix 'llvm-objdump -dr' for executables with relocations * 912ad5830cc1 Add llvm-ml to LLVM_TOOLCHAIN_TOOLS (PR50536) * b46abdb7b8fe [clang][Driver] Pick the last --driver-mode in case of multiple ones * 197d9d91aec1 [AArch64][sve] Prevent incorrect function call on fixed width vector * 427df19c4791 Update counter offset to account for binary ids * 09f659449b83 libunwind: add missing break statements in EHABI * a98b397504f8 [SCEV] Fix applyLoopGuards() with range check idiom (PR51760) * 9b3867e959fa [DAGCombine] Prevent the transform of combine for multi-use operand * 49dacda603b3 [tests] precommit tests for D107692 * 8aa8ed9d4b5f Fix for commit d8cd7806310c51af912a647a6ca46de62ff13214. * 2a1d8b5016eb [clang] OpenBSD does not support C11 atomics or threads. * a52b7bf7d123 PR50294: Fix a performance regression from 2c9dbcd. * c30b2813a1d5 [clang] fix error recovery ICE on copy elision when returing invalid variable * 6668e31250ba Support linking against OpenMP runtime on OpenBSD. * be305271bfb6 OpenBSD also needs execinfo * a5e968b66a59 [clang] Allow the OpenBSD driver to link the libclang_rt.profile library. * 181739213aa0 [docs] Update release notes with items related to Flang * c45fa58f171e [libomptarget][amdcgn] Only add opt/llvm-link dependency if TARGET is availab le * 7f3d00c9b49b [libomptarget][amdcgn] Add build dependency for llvm-link and opt * 3b1fa4aef006 [RISCV] Fix reporting of incorrect commutable operand indices * 1c3fcc8ae92e [libc++][NFC] Mark values in gdb pretty print comparison functions as live to prevent values being optimized out. * c8905f1bb304 [Orc] Enable debug object tests only on x86_64 hosts * 7a4a5d413624 [Linker] Support weak symbols in nodeduplicate COMDAT group Signed-off-by: Khem Raj (cherry picked from commit 12c3739c9cc737ceb8a29bf7bbd848d3de4b8d17) --- recipes-devtools/clang/clang.inc | 2 +- recipes-devtools/clang/clang/D108404.diff | 58 ------------------------------- recipes-devtools/clang/clang/D108868.diff | 47 ------------------------- recipes-devtools/clang/common.inc | 2 -- 4 files changed, 1 insertion(+), 108 deletions(-) delete mode 100644 recipes-devtools/clang/clang/D108404.diff delete mode 100644 recipes-devtools/clang/clang/D108868.diff diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 829c03b..37556b4 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc @@ -8,7 +8,7 @@ MAJOR_VER = "13" MINOR_VER = "0" PATCH_VER = "0" -SRCREV ?= "9e41dc71b8d4040fa5f0742022d6cf9852096744" +SRCREV ?= "0c2f8599a9cc42014b41aadf7c308b4889d2397f" PV = "${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}" BRANCH = "release/13.x" diff --git a/recipes-devtools/clang/clang/D108404.diff b/recipes-devtools/clang/clang/D108404.diff deleted file mode 100644 index 68d8ebc..0000000 --- a/recipes-devtools/clang/clang/D108404.diff +++ /dev/null @@ -1,58 +0,0 @@ -Backported from https://reviews.llvm.org/D108404 - -diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt ---- a/llvm/runtimes/CMakeLists.txt -+++ b/llvm/runtimes/CMakeLists.txt -@@ -350,15 +350,19 @@ - # Create a runtimes target that uses this file as its top-level CMake file. - # The runtimes target is a configuration of all the runtime libraries - # together in a single CMake invocaiton. -+ if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) -+ message(STATUS "Adding dependencies opt llvm-link") -+ set(extra_deps opt llvm-link) -+ endif() - if(NOT LLVM_RUNTIME_TARGETS) - runtime_default_target( -- DEPENDS ${deps} -+ DEPENDS ${deps} ${extra_deps} - PREFIXES ${prefixes}) - set(test_targets check-runtimes) - else() - if("default" IN_LIST LLVM_RUNTIME_TARGETS) - runtime_default_target( -- DEPENDS ${deps} -+ DEPENDS ${deps} ${extra_deps} - PREFIXES ${prefixes}) - list(REMOVE_ITEM LLVM_RUNTIME_TARGETS "default") - else() -diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt ---- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt -+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt -@@ -151,6 +151,7 @@ - - # Create target to build all Bitcode libraries. - add_custom_target(omptarget-new-nvptx-bc) -+add_dependencies(omptarget-new-nvptx-bc opt llvm-link) - - # Generate a Bitcode library for all the compute capabilities the user requested - foreach(sm ${nvptx_sm_list}) -@@ -197,6 +198,7 @@ - - add_custom_target(${bclib_target_name} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${bclib_name}_opt) - add_dependencies(omptarget-new-nvptx-bc ${bclib_target_name}) -+ add_dependencies(${bclib_target_name} opt llvm-link) - - # Copy library to destination. - add_custom_command(TARGET ${bclib_target_name} POST_BUILD -diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt ---- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -@@ -157,7 +157,7 @@ - add_custom_command( - OUTPUT ${bc_libname} - COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} -- DEPENDS ${bc_files} opt) -+ DEPENDS ${bc_files} llvm-link opt) - - add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) - diff --git a/recipes-devtools/clang/clang/D108868.diff b/recipes-devtools/clang/clang/D108868.diff deleted file mode 100644 index a12a3eb..0000000 --- a/recipes-devtools/clang/clang/D108868.diff +++ /dev/null @@ -1,47 +0,0 @@ -Backported from https://reviews.llvm.org/D108868 - ---- a/llvm/runtimes/CMakeLists.txt -+++ b/llvm/runtimes/CMakeLists.txt -@@ -350,9 +350,14 @@ if(runtimes) - # Create a runtimes target that uses this file as its top-level CMake file. - # The runtimes target is a configuration of all the runtime libraries - # together in a single CMake invocaiton. -+ set(extra_deps "") - if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) -- message(STATUS "Adding dependencies opt llvm-link") -- set(extra_deps opt llvm-link) -+ if(TARGET opt) -+ list(APPEND extra_deps opt) -+ endif() -+ if(TARGET llvm-link) -+ list(APPEND extra_deps llvm-link) -+ endif() - endif() - if(NOT LLVM_RUNTIME_TARGETS) - runtime_default_target( ---- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt -@@ -149,6 +149,14 @@ endmacro() - - set(libname "omptarget-amdgcn") - -+set(toolchain_deps "") -+if(TARGET llvm-link) -+ list(APPEND toolchain_deps llvm-link) -+endif() -+if(TARGET opt) -+ list(APPEND toolchain_deps opt) -+endif() -+ - foreach(mcpu ${mcpus}) - set(bc_files) - add_cuda_bc_library(${cuda_sources}) -@@ -157,7 +165,7 @@ foreach(mcpu ${mcpus}) - add_custom_command( - OUTPUT ${bc_libname} - COMMAND ${LINK_TOOL} ${bc_files} | ${OPT_TOOL} --always-inline -o ${OUTPUTDIR}/${bc_libname} -- DEPENDS ${bc_files} llvm-link opt) -+ DEPENDS ${bc_files} ${toolchain_deps}) - - add_custom_target(lib${libname}-${mcpu} ALL DEPENDS ${bc_libname}) - diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc index b11e180..1a01809 100644 --- a/recipes-devtools/clang/common.inc +++ b/recipes-devtools/clang/common.inc @@ -46,8 +46,6 @@ SRC_URI = "\ file://0034-compiler-rt-Do-not-force-thumb-mode-directive.patch \ file://0035-Drop-the-git-suffix-from-various-version-variables.patch \ file://0036-clang-Do-not-use-install-relative-libc-headers.patch \ - file://D108404.diff \ - file://D108868.diff \ file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ " -- cgit v1.2.3-54-g00ecf