diff options
17 files changed, 20 insertions, 1716 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 88cc2b1dd230..f7b800f41b64 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -32,6 +32,7 @@ DIST llvm-3.8.0-manpages.tar.bz2 37889 SHA256 4dda7f69f9412e0fb50d32631df34d6ea7 DIST llvm-3.8.1-patchset.tar.xz 24260 SHA256 4a1677b5aff3a4ca8ccdbcc45e286e44d23867cbaa48a39cffc0fc2a8765ed6c SHA512 1e4ec68c56cc72a89afb573ad0c3cada10be7ec02e0af033a6c5cf8ce46ed7bf40389543c2f1b11e7080dba49962c57b4ea9f9bc971c4647eb3fd945c0cf0529 WHIRLPOOL 38c16b23f995818a6ca292e89d28f85ae6d19327bc0efe72270611077a7b76bca99b2e1f11b8653550bddee4123f2611621b86c4b81cdb8f96edc1cd4c5cfc4f DIST llvm-3.8.1.src.tar.xz 16551472 SHA256 6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9 SHA512 99bbb2cc5f337fd5edf1621f8028c8cb74011aa4af2531018dc05409b27f7b8d0c2f76a00115f677f7c013029d5d9f55d085a5b40433409aac4e9161d53bd366 WHIRLPOOL a99cef164a0e05e5237b840bee776d48fe0bde460cb4536f03a5e4eb0cc630deeb96f76bdd42f912a4b2dab08133bd9137ea16be1b9582d375f0f5841dd40234 DIST llvm-3.9.0_rc3-manpages.tar.bz2 80007 SHA256 991f5238d23c0aee2fd303d1adecd6045c42ed066f42f0d58f62c3a25c197140 SHA512 f96c340021de3f096ec3ad7d51a6af2c7a84974122d1df15729a39d4f9d65452f063a85ab38adb064288dc14220d9cc679b31ee19b48424d3d7cde621ff37597 WHIRLPOOL d3f24a2faaa5aa909519373532262c342acf517048ac543f303b6ddb539f5ece876a338c8efc445f4ada6f723a4e65e35bd5f2f9b4f52ef96ef832000259ab20 +DIST llvm-3.9.1-patchset.tar.xz 16404 SHA256 a4b3e5887b53af47984ea39ff8640f11e8a9accbafd1be20fb9cf25f2980b16c SHA512 dcae89ba910b5195bb455924242912f526b6994f0f236571b6364fd594bf9ca03cc74e116a44ae4372e34ce63b21f1351125157e7af7a957aee115f400b54089 WHIRLPOOL a9ec4315e8bb9593e6734e22a0d81fbe0398adedcfe7f6b81de852c1a1092593e07624a5ce7b67bca8be8b34c7453fda9f7eb33be41d11f51458800248a15649 DIST llvm-3.9.1.src.tar.xz 18130436 SHA256 1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee SHA512 50cbe8ee911080f586e77861c442348701bd02e2de0c090c54c34f82ac275ecfcd712af0f41e387c33b4a6057778a4258a27554292fe68ab4af3fd9dd6d90683 WHIRLPOOL 1cd1a25befcb178bec4a4aace4367167f3838d32edbe9db9de8c6e558c01c1fcf123f6d6f80b7ec9ff32b3d6dcf2de2f4eb4201d417c3d17a5c8a69934832903 DIST llvm-4.0.0.src.tar.xz 21016340 SHA256 8d10511df96e73b8ff9e7abbfb4d4d432edbdbe965f1f4f07afaf370b8a533be SHA512 cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704 WHIRLPOOL 9783e8f47306c1deb2e114d4b46a7db9b0260b4965076345c88765413c5fc8e73fab5f88ae4903adbdea31406022948b16d32ae47d98f5def074509d5d794579 DIST llvm-manpages-4.0.0.tar.bz2 84861 SHA256 4676b3a18e95ddba19e868bfac0753154be2b57bc0d557f90270e4d2b0913d37 SHA512 7a04ffb607203aca099c816fe6e143779062610935f501786bd64bad6001741fb7a55adebe4e52e0611aa70fa04b22e1a7cab7b3da9dc2ed996fd0baf1ae8916 WHIRLPOOL e2ce15c26008995d71b830d74c5e6ca7dd862ed8208168facc0be6e7f855e5f59b143057ec2bbbaa70ed54dc77ad31279239886d25fe67c0853a9dee7baff31b diff --git a/sys-devel/llvm/files/3.9.1/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch b/sys-devel/llvm/files/3.9.1/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch deleted file mode 100644 index 367a8a7794fe..000000000000 --- a/sys-devel/llvm/files/3.9.1/0001-cmake-Install-OCaml-modules-into-correct-package-loc.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 2907883b3c504a08b98cf735ceaa8e438d20f37e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 21 Aug 2016 22:46:48 +0200 -Subject: [PATCH 01/10] cmake: Install OCaml modules into correct package - location - -Ensure that correct libdir is used for OCaml modules, and install them -into dedicated llvm subdirectory rather than the top directory which is -supposedly reserved for the standard library. - -Author: Mark Wright <gienah@gentoo.org> -Bug: https://bugs.gentoo.org/559134 -Bug: https://bugs.gentoo.org/559624 ---- - bindings/ocaml/backends/CMakeLists.txt | 2 +- - bindings/ocaml/llvm/CMakeLists.txt | 2 +- - cmake/modules/AddOCaml.cmake | 6 +++--- - 3 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/bindings/ocaml/backends/CMakeLists.txt b/bindings/ocaml/backends/CMakeLists.txt -index a980638..9e5dc50 100644 ---- a/bindings/ocaml/backends/CMakeLists.txt -+++ b/bindings/ocaml/backends/CMakeLists.txt -@@ -23,5 +23,5 @@ foreach(TARGET ${LLVM_TARGETS_TO_BUILD}) - "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}") - - install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm_${TARGET}" -- DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) - endforeach() -diff --git a/bindings/ocaml/llvm/CMakeLists.txt b/bindings/ocaml/llvm/CMakeLists.txt -index 4956fa4..c612f73 100644 ---- a/bindings/ocaml/llvm/CMakeLists.txt -+++ b/bindings/ocaml/llvm/CMakeLists.txt -@@ -8,4 +8,4 @@ configure_file( - "${LLVM_LIBRARY_DIR}/ocaml/META.llvm") - - install(FILES "${LLVM_LIBRARY_DIR}/ocaml/META.llvm" -- DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) -diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake -index e3dd1d8..a16238e 100644 ---- a/cmake/modules/AddOCaml.cmake -+++ b/cmake/modules/AddOCaml.cmake -@@ -137,7 +137,7 @@ function(add_ocaml_library name) - if( APPLE ) - set(ocaml_rpath "@executable_path/../../lib") - elseif( UNIX ) -- set(ocaml_rpath "\\$ORIGIN/../../lib") -+ set(ocaml_rpath "\\$ORIGIN/../../${CMAKE_INSTALL_LIBDIR}") - endif() - list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}") - -@@ -189,12 +189,12 @@ function(add_ocaml_library name) - endforeach() - - install(FILES ${install_files} -- DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) - install(FILES ${install_shlibs} - PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE - GROUP_READ GROUP_EXECUTE - WORLD_READ WORLD_EXECUTE -- DESTINATION lib/ocaml) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/ocaml/llvm) - - foreach( install_file ${install_files} ${install_shlibs} ) - get_filename_component(filename "${install_file}" NAME) --- -2.9.3 - diff --git a/sys-devel/llvm/files/3.9.1/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch b/sys-devel/llvm/files/3.9.1/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch deleted file mode 100644 index b90527a0e449..000000000000 --- a/sys-devel/llvm/files/3.9.1/0002-cmake-Make-OCaml-docs-dependent-on-LLVM_BUILD_DOCS.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 726806d9b4932287d67f9b6b112099648ea008b4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 21 Aug 2016 23:01:47 +0200 -Subject: [PATCH 02/10] cmake: Make OCaml docs dependent on LLVM_BUILD_DOCS - -Author: Bernard Cafarelli <voyageur@gentoo.org> -Bug: https://bugs.gentoo.org/562008 -Patch: https://reviews.llvm.org/D23763 ---- - docs/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt -index eaa1750..f2cd7e9 100644 ---- a/docs/CMakeLists.txt -+++ b/docs/CMakeLists.txt -@@ -115,7 +115,7 @@ if (LLVM_ENABLE_SPHINX) - endif() - - list(FIND LLVM_BINDINGS_LIST ocaml uses_ocaml) --if( NOT uses_ocaml LESS 0 ) -+if( NOT uses_ocaml LESS 0 AND LLVM_BUILD_DOCS ) - set(doc_targets - ocaml_llvm - ocaml_llvm_all_backends --- -2.9.3 - diff --git a/sys-devel/llvm/files/3.9.1/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch b/sys-devel/llvm/files/3.9.1/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch deleted file mode 100644 index 76adf52fb94e..000000000000 --- a/sys-devel/llvm/files/3.9.1/0003-cmake-Support-overriding-Sphinx-HTML-doc-install-dir.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 1251ac2021b768d3a56b4dc03212ea2fd12a34dd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Mon, 8 Jun 2015 06:43:00 +0200 -Subject: [PATCH 03/10] cmake: Support overriding Sphinx HTML doc install - directory - -Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to -override Sphinx HTML doc install directory. - -Bug: https://llvm.org/bugs/show_bug.cgi?id=23780 -Patch: https://reviews.llvm.org/D23757 ---- - cmake/modules/AddSphinxTarget.cmake | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake -index 045dc23..fac143f 100644 ---- a/cmake/modules/AddSphinxTarget.cmake -+++ b/cmake/modules/AddSphinxTarget.cmake -@@ -53,8 +53,12 @@ function (add_sphinx_target builder project) - DESTINATION share/man/man1) - - elseif (builder STREQUAL html) -- install(DIRECTORY "${SPHINX_BUILD_DIR}" -- DESTINATION "share/doc/${project}") -+ string(TOUPPER "${project}" project_upper) -+ set(${project_upper}_INSTALL_HTML "share/doc/${project}/html" -+ CACHE STRING "HTML documentation install directory for ${project}") -+ -+ install(DIRECTORY "${SPHINX_BUILD_DIR}/." -+ DESTINATION "${${project_upper}_INSTALL_HTML}") - else() - message(WARNING Installation of ${builder} not supported) - endif() --- -2.9.3 - diff --git a/sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch b/sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch deleted file mode 100644 index 1e01e640b3dc..000000000000 --- a/sys-devel/llvm/files/3.9.1/0004-cmake-Use-separate-doctrees-to-prevent-races-between.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 40960f63616f62c8ac52eeeddf68bdb441b8be3e Mon Sep 17 00:00:00 2001 -From: Michal Gorny <mgorny@gentoo.org> -Date: Tue, 4 Oct 2016 06:09:14 +0000 -Subject: [PATCH] [cmake] Use separate doctrees to prevent races between Sphinx - instances - -Use separate doctrees between different Sphinx builders in order to -prevent race condition issues due to multiple Sphinx instances accessing -the same doctree cache in parallel. - -Bug: https://llvm.org/bugs/show_bug.cgi?id=23781 - -Differential Revision: https://reviews.llvm.org/D23755 - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283188 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - cmake/modules/AddSphinxTarget.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake -index a968555aa06..ca9f4c38ffd 100644 ---- a/cmake/modules/AddSphinxTarget.cmake -+++ b/cmake/modules/AddSphinxTarget.cmake -@@ -6,7 +6,7 @@ - # ``project`` should be the project name - function (add_sphinx_target builder project) - set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${builder}") -- set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") -+ set(SPHINX_DOC_TREE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees-${builder}") - set(SPHINX_TARGET_NAME docs-${project}-${builder}) - - if (SPHINX_WARNINGS_AS_ERRORS) --- -2.11.0 - diff --git a/sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch b/sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch deleted file mode 100644 index 8a2c091edfbf..000000000000 --- a/sys-devel/llvm/files/3.9.1/0006-cmake-Remove-the-CMAKE_BUILD_TYPE-assertion.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a2ecd4815d285281cb816e06b25dc0dc2a933073 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 21 Aug 2016 23:13:45 +0200 -Subject: [PATCH 06/10] cmake: Remove the CMAKE_BUILD_TYPE assertion - ---- - CMakeLists.txt | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 894bc8c..453fcb8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -232,11 +232,6 @@ endif() - - string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) - --if (CMAKE_BUILD_TYPE AND -- NOT uppercase_CMAKE_BUILD_TYPE MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$") -- message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") --endif() -- - set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) - - set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')") --- -2.9.3 - diff --git a/sys-devel/llvm/files/3.9.1/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch b/sys-devel/llvm/files/3.9.1/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch deleted file mode 100644 index 6634cdebe351..000000000000 --- a/sys-devel/llvm/files/3.9.1/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch +++ /dev/null @@ -1,62 +0,0 @@ -From aeddc35a35c55f487977d7609060225e03e2028b Mon Sep 17 00:00:00 2001 -From: Michal Gorny <mgorny@gentoo.org> -Date: Tue, 4 Oct 2016 06:09:18 +0000 -Subject: [PATCH] [cmake] Reintroduce (ldconfig-compatible) SOVERSIONs on - shared libraries - -Reintroduce versioning of shared libraries via SOVERSION, addressing -the issues with the previous design, since Gentoo is relying -on shared-split install of LLVM. The SOVERSIONs were originally -introduced in r229720 for all libraries, and removed in r252093 in favor -of custom SONAME. As far as I understand, the major concern with the old -versioning was that the used versions were incompatible with ldconfig. - -Having considered that, this commit introduce SOVERSIONS with the -following considerations: - -1. SOVERSIONs are formed of major & minor version concatenated -- i.e. -for 4.0 its .so.40. This matches the common practice where the first -version number indicates ABI breakage, and therefore fixes the issues -with ldconfig. Additionally, VERSION with the remaining verion -components appended is used, however this is not strictly necessary. - -2. The versioning is only applied to libraries with no explicit SONAME -specified -- i.e. it won't apply to libLLVM but only to the split -libraries. It will also apply to libraries installed by the subprojects. - -3. The versioning is only done on *nix systems, Darwin excluded. This -matches the current use of SONAME. - -Differential Revision: https://reviews.llvm.org/D24757 - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283189 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - cmake/modules/AddLLVM.cmake | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake -index 37b3b80..7cb1b0c 100644 ---- a/cmake/modules/AddLLVM.cmake -+++ b/cmake/modules/AddLLVM.cmake -@@ -450,6 +450,18 @@ function(llvm_add_library name) - PREFIX "" - ) - endif() -+ -+ # Set SOVERSION on shared libraries that lack explicit SONAME -+ # specifier, on *nix systems that are not Darwin. -+ if(UNIX AND NOT APPLE AND NOT ARG_SONAME) -+ set_target_properties(${name} -+ PROPERTIES -+ # Concatenate the version numbers since ldconfig expects exactly -+ # one component indicating the ABI version, while LLVM uses -+ # major+minor for that. -+ SOVERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR} -+ VERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}) -+ endif() - endif() - - if(ARG_MODULE OR ARG_SHARED) --- -2.10.0 - diff --git a/sys-devel/llvm/files/3.9.1/0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch b/sys-devel/llvm/files/3.9.1/0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch deleted file mode 100644 index f9ec68c00c0c..000000000000 --- a/sys-devel/llvm/files/3.9.1/0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch +++ /dev/null @@ -1,120 +0,0 @@ -From d6b5bd6f44e8091a4c4870f1c52921c25a4f8cca Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sat, 21 Jan 2017 12:35:36 +0100 -Subject: [PATCH] Revert "AMDGPU: Fix an interaction between WQM and polygon - stippling" - -https://bugs.gentoo.org/603858 ---- - lib/Target/AMDGPU/SIInstructions.td | 1 - - lib/Target/AMDGPU/SIWholeQuadMode.cpp | 7 +++++ - test/CodeGen/AMDGPU/wqm.ll | 49 +++-------------------------------- - 3 files changed, 11 insertions(+), 46 deletions(-) - -diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td -index dde5f2fc6b4..18b7d5d62ef 100644 ---- a/lib/Target/AMDGPU/SIInstructions.td -+++ b/lib/Target/AMDGPU/SIInstructions.td -@@ -2029,7 +2029,6 @@ def SI_RETURN : PseudoInstSI < - let hasSideEffects = 1; - let SALU = 1; - let hasNoSchedulingInfo = 1; -- let DisableWQM = 1; - } - - let Uses = [EXEC], Defs = [EXEC, VCC, M0], -diff --git a/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/lib/Target/AMDGPU/SIWholeQuadMode.cpp -index 1534d582569..b200c153df0 100644 ---- a/lib/Target/AMDGPU/SIWholeQuadMode.cpp -+++ b/lib/Target/AMDGPU/SIWholeQuadMode.cpp -@@ -219,6 +219,13 @@ char SIWholeQuadMode::scanInstructions(MachineFunction &MF, - markInstruction(MI, Flags, Worklist); - GlobalFlags |= Flags; - } -+ -+ if (WQMOutputs && MBB.succ_empty()) { -+ // This is a prolog shader. Make sure we go back to exact mode at the end. -+ Blocks[&MBB].OutNeeds = StateExact; -+ Worklist.push_back(&MBB); -+ GlobalFlags |= StateExact; -+ } - } - - return GlobalFlags; -diff --git a/test/CodeGen/AMDGPU/wqm.ll b/test/CodeGen/AMDGPU/wqm.ll -index 41e42645788..809a7ba9b82 100644 ---- a/test/CodeGen/AMDGPU/wqm.ll -+++ b/test/CodeGen/AMDGPU/wqm.ll -@@ -17,18 +17,17 @@ main_body: - ;CHECK-LABEL: {{^}}test2: - ;CHECK-NEXT: ; %main_body - ;CHECK-NEXT: s_wqm_b64 exec, exec -+;CHECK: image_sample - ;CHECK-NOT: exec --define amdgpu_ps void @test2(<8 x i32> inreg %rsrc, <4 x i32> inreg %sampler, float addrspace(1)* inreg %ptr, <4 x i32> %c) { -+;CHECK: _load_dword v0, -+define amdgpu_ps float @test2(<8 x i32> inreg %rsrc, <4 x i32> inreg %sampler, float addrspace(1)* inreg %ptr, <4 x i32> %c) { - main_body: - %c.1 = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %c, <8 x i32> %rsrc, <4 x i32> %sampler, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0) - %c.2 = bitcast <4 x float> %c.1 to <4 x i32> - %c.3 = extractelement <4 x i32> %c.2, i32 0 - %gep = getelementptr float, float addrspace(1)* %ptr, i32 %c.3 - %data = load float, float addrspace(1)* %gep -- -- call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %data, float undef, float undef, float undef) -- -- ret void -+ ret float %data - } - - ; ... but disabled for stores (and, in this simple case, not re-enabled). -@@ -415,46 +414,6 @@ entry: - ret void - } - --; Must return to exact at the end of a non-void returning shader, --; otherwise the EXEC mask exported by the epilog will be wrong. This is true --; even if the shader has no kills, because a kill could have happened in a --; previous shader fragment. --; --; CHECK-LABEL: {{^}}test_nonvoid_return: --; CHECK: s_mov_b64 [[LIVE:s\[[0-9]+:[0-9]+\]]], exec --; CHECK: s_wqm_b64 exec, exec --; --; CHECK: s_and_b64 exec, exec, [[LIVE]] --; CHECK-NOT: exec --define amdgpu_ps <4 x float> @test_nonvoid_return() nounwind { -- %tex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> undef, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0) -- %tex.i = bitcast <4 x float> %tex to <4 x i32> -- %dtex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %tex.i, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0) -- ret <4 x float> %dtex --} -- --; CHECK-LABEL: {{^}}test_nonvoid_return_unreachable: --; CHECK: s_mov_b64 [[LIVE:s\[[0-9]+:[0-9]+\]]], exec --; CHECK: s_wqm_b64 exec, exec --; --; CHECK: s_and_b64 exec, exec, [[LIVE]] --; CHECK-NOT: exec --define amdgpu_ps <4 x float> @test_nonvoid_return_unreachable(i32 inreg %c) nounwind { --entry: -- %tex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> undef, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0) -- %tex.i = bitcast <4 x float> %tex to <4 x i32> -- %dtex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %tex.i, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0) -- -- %cc = icmp sgt i32 %c, 0 -- br i1 %cc, label %if, label %else -- --if: -- store volatile <4 x float> %dtex, <4 x float>* undef -- unreachable -- --else: -- ret <4 x float> %dtex --} - - declare void @llvm.amdgcn.image.store.v4i32(<4 x float>, <4 x i32>, <8 x i32>, i32, i1, i1, i1, i1) #1 - declare void @llvm.amdgcn.buffer.store.f32(float, <4 x i32>, i32, i32, i1, i1) #1 --- -2.11.0 - diff --git a/sys-devel/llvm/files/3.9.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch b/sys-devel/llvm/files/3.9.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch deleted file mode 100644 index 931eb56e5a96..000000000000 --- a/sys-devel/llvm/files/3.9.1/clang/0001-Install-clang-runtime-into-usr-lib-without-suffix.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index fa7780f..e3a6c8f 100644 ---- a/tools/clang/lib/Driver/Driver.cpp -+++ b/tools/clang/lib/Driver/Driver.cpp -@@ -66,8 +66,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, - if (ClangResourceDir != "") { - llvm::sys::path::append(P, ClangResourceDir); - } else { -- StringRef ClangLibdirSuffix(CLANG_LIBDIR_SUFFIX); -- llvm::sys::path::append(P, "..", Twine("lib") + ClangLibdirSuffix, "clang", -+ llvm::sys::path::append(P, "..", "lib", "clang", - CLANG_VERSION_STRING); - } - ResourceDir = P.str(); -diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp -index f078b37..0c514fc 100644 ---- a/tools/clang/lib/Frontend/CompilerInvocation.cpp -+++ b/tools/clang/lib/Frontend/CompilerInvocation.cpp -@@ -1097,7 +1097,7 @@ std::string CompilerInvocation::GetResourcesPath(const char *Argv0, - if (ClangResourceDir != "") - llvm::sys::path::append(P, ClangResourceDir); - else -- llvm::sys::path::append(P, "..", Twine("lib") + CLANG_LIBDIR_SUFFIX, -+ llvm::sys::path::append(P, "..", "lib", - "clang", CLANG_VERSION_STRING); - - return P.str(); -diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt -index 7de5fbe..49f439b 100644 ---- a/tools/clang/lib/Headers/CMakeLists.txt -+++ b/tools/clang/lib/Headers/CMakeLists.txt -@@ -100,4 +100,4 @@ set_target_properties(clang-headers PROPERTIES FOLDER "Misc") - PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ -- DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) -+ DESTINATION lib/clang/${CLANG_VERSION}/include) diff --git a/sys-devel/llvm/files/3.9.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch b/sys-devel/llvm/files/3.9.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch deleted file mode 100644 index 0b93deba0b58..000000000000 --- a/sys-devel/llvm/files/3.9.1/clang/0002-cmake-Make-CLANG_LIBDIR_SUFFIX-overridable.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d07632abe23d55eec2aae303a142a97765a77d32 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Tue, 9 Jun 2015 12:20:06 +0200 -Subject: [PATCH 2/2] cmake: Make CLANG_LIBDIR_SUFFIX overridable - -Make CLANG_LIBDIR_SUFFIX a cache variable so that it can be explicitly -overriden. It is used purely to find the LLVMgold.so plugin, so we want -to set it to native suffix. ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 357286b..647f976 100644 ---- a/tools/clang/CMakeLists.txt -+++ b/tools/clang/CMakeLists.txt -@@ -203,7 +203,7 @@ set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING - "Vendor-specific uti.") - - # The libdir suffix must exactly match whatever LLVM's configuration used. --set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}") -+set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING "") - - set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) --- -2.4.3 - diff --git a/sys-devel/llvm/files/3.9.1/clang/darwin_prefix-include-paths.patch b/sys-devel/llvm/files/3.9.1/clang/darwin_prefix-include-paths.patch deleted file mode 100644 index ed332f3f68af..000000000000 --- a/sys-devel/llvm/files/3.9.1/clang/darwin_prefix-include-paths.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/tools/clang/lib/Frontend/InitHeaderSearch.cpp -+++ b/tools/clang/lib/Frontend/InitHeaderSearch.cpp -@@ -233,6 +233,7 @@ - case llvm::Triple::Bitrig: - break; - default: -+ AddPath("@GENTOO_PORTAGE_EPREFIX@/usr/include", System, false); - // FIXME: temporary hack: hard-coded paths. - AddPath("/usr/local/include", System, false); - break; -@@ -505,6 +506,7 @@ - // Add the default framework include paths on Darwin. - if (HSOpts.UseStandardSystemIncludes) { - if (triple.isOSDarwin()) { -+ AddPath("@GENTOO_PORTAGE_EPREFIX@/Frameworks", System, true); - AddPath("/System/Library/Frameworks", System, true); - AddPath("/Library/Frameworks", System, true); - } diff --git a/sys-devel/llvm/files/3.9.1/clang/default-libs.patch b/sys-devel/llvm/files/3.9.1/clang/default-libs.patch deleted file mode 100644 index 12ef52d5b689..000000000000 --- a/sys-devel/llvm/files/3.9.1/clang/default-libs.patch +++ /dev/null @@ -1,703 +0,0 @@ -From 2d354bfbb2f5efdf3f6b2405078f9ccb65c21536 Mon Sep 17 00:00:00 2001 -From: Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> -Date: Wed, 27 Jul 2016 08:15:54 +0000 -Subject: [PATCH] Support setting default value for -rtlib at build time - -This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru -which we can specify a default value for -rtlib (libgcc or -compiler-rt) at build time, just like how we set the default C++ -stdlib thru CLANG_DEFAULT_CXX_STDLIB. - -With these two options, we can configure clang to build binaries on -Linux that have no runtime dependence on any gcc libs (libstdc++ or -libgcc_s). - -Patch by Lei Zhang! - -Differential Revision: https://reviews.llvm.org/D22663 - -git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276848 91177308-0d34-0410-b5e6-96231b3b80d8 ---- - CMakeLists.txt | 10 +++++ - include/clang/Config/config.h.cmake | 3 ++ - lib/Driver/ToolChain.cpp | 22 ++++++----- - lib/Driver/ToolChains.cpp | 23 ++++++----- - lib/Driver/ToolChains.h | 2 + - test/Driver/linux-ld.c | 76 ++++++++++++++++++------------------- - test/Driver/miamcu-opt.c | 14 +++---- - test/Driver/miamcu-opt.cpp | 2 +- - test/Driver/mingw-libgcc.c | 24 ++++++------ - test/Driver/mingw.cpp | 14 +++---- - test/Driver/mips-mti-linux.c | 4 +- - test/Driver/sanitizer-ld.c | 2 +- - test/Driver/windows-cross.c | 2 +- - test/OpenMP/linking.c | 18 +++++---- - 14 files changed, 121 insertions(+), 95 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cfcd221..aec4579 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -201,6 +201,16 @@ if (NOT(CLANG_DEFAULT_CXX_STDLIB STREQUAL "" OR - set(CLANG_DEFAULT_CXX_STDLIB "") - endif() - -+set(CLANG_DEFAULT_RTLIB "" CACHE STRING -+ "Default runtime library to use (\"libgcc\" or \"compiler-rt\", empty for platform default)") -+if (NOT(CLANG_DEFAULT_RTLIB STREQUAL "" OR -+ CLANG_DEFAULT_RTLIB STREQUAL "libgcc" OR -+ CLANG_DEFAULT_RTLIB STREQUAL "compiler-rt")) -+ message(WARNING "Resetting default rtlib to use platform default") -+ set(CLANG_DEFAULT_RTLIB "" CACHE STRING -+ "Default runtime library to use (\"libgcc\" or \"compiler-rt\", empty for platform default)" FORCE) -+endif() -+ - set(CLANG_DEFAULT_OPENMP_RUNTIME "libomp" CACHE STRING - "Default OpenMP runtime used by -fopenmp.") - -diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake -index e5a1d0d..9200ed9 100644 ---- a/include/clang/Config/config.h.cmake -+++ b/include/clang/Config/config.h.cmake -@@ -11,6 +11,9 @@ - /* Default C++ stdlib to use. */ - #define CLANG_DEFAULT_CXX_STDLIB "${CLANG_DEFAULT_CXX_STDLIB}" - -+/* Default runtime library to use. */ -+#define CLANG_DEFAULT_RTLIB "${CLANG_DEFAULT_RTLIB}" -+ - /* Default OpenMP runtime used by -fopenmp. */ - #define CLANG_DEFAULT_OPENMP_RUNTIME "${CLANG_DEFAULT_OPENMP_RUNTIME}" - -diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp -index e96688c..b825d63 100644 ---- a/lib/Driver/ToolChain.cpp -+++ b/lib/Driver/ToolChain.cpp -@@ -526,15 +526,19 @@ void ToolChain::addProfileRTLibs(const llvm::opt::ArgList &Args, - - ToolChain::RuntimeLibType ToolChain::GetRuntimeLibType( - const ArgList &Args) const { -- if (Arg *A = Args.getLastArg(options::OPT_rtlib_EQ)) { -- StringRef Value = A->getValue(); -- if (Value == "compiler-rt") -- return ToolChain::RLT_CompilerRT; -- if (Value == "libgcc") -- return ToolChain::RLT_Libgcc; -- getDriver().Diag(diag::err_drv_invalid_rtlib_name) -- << A->getAsString(Args); -- } -+ const Arg* A = Args.getLastArg(options::OPT_rtlib_EQ); -+ StringRef LibName = A ? A->getValue() : CLANG_DEFAULT_RTLIB; -+ -+ // "platform" is only used in tests to override CLANG_DEFAULT_RTLIB -+ if (LibName == "compiler-rt") -+ return ToolChain::RLT_CompilerRT; -+ else if (LibName == "libgcc") -+ return ToolChain::RLT_Libgcc; -+ else if (LibName == "platform") -+ return GetDefaultRuntimeLibType(); -+ -+ if (A) -+ getDriver().Diag(diag::err_drv_invalid_rtlib_name) << A->getAsString(Args); - - return GetDefaultRuntimeLibType(); - } -diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp -index 347aa29..6027bbf 100644 ---- a/lib/Driver/ToolChains.cpp -+++ b/lib/Driver/ToolChains.cpp -@@ -400,17 +400,22 @@ void DarwinClang::AddLinkSanitizerLibArgs(const ArgList &Args, - /*AddRPath*/ true); - } - -+ToolChain::RuntimeLibType DarwinClang::GetRuntimeLibType( -+ const ArgList &Args) const { -+ if (Arg* A = Args.getLastArg(options::OPT_rtlib_EQ)) { -+ StringRef Value = A->getValue(); -+ if (Value != "compiler-rt") -+ getDriver().Diag(diag::err_drv_unsupported_rtlib_for_platform) -+ << Value << "darwin"; -+ } -+ -+ return ToolChain::RLT_CompilerRT; -+} -+ - void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, - ArgStringList &CmdArgs) const { -- // Darwin only supports the compiler-rt based runtime libraries. -- switch (GetRuntimeLibType(Args)) { -- case ToolChain::RLT_CompilerRT: -- break; -- default: -- getDriver().Diag(diag::err_drv_unsupported_rtlib_for_platform) -- << Args.getLastArg(options::OPT_rtlib_EQ)->getValue() << "darwin"; -- return; -- } -+ // Call once to ensure diagnostic is printed if wrong value was specified -+ GetRuntimeLibType(Args); - - // Darwin doesn't support real static executables, don't link any runtime - // libraries with -static. -diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h -index 369712f..fe570fd 100644 ---- a/lib/Driver/ToolChains.h -+++ b/lib/Driver/ToolChains.h -@@ -573,6 +573,8 @@ public: - /// @name Apple ToolChain Implementation - /// { - -+ RuntimeLibType GetRuntimeLibType(const llvm::opt::ArgList &Args) const override; -+ - void AddLinkRuntimeLibArgs(const llvm::opt::ArgList &Args, - llvm::opt::ArgStringList &CmdArgs) const override; - -diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c -index f9f4b48..87bd55f 100644 ---- a/test/Driver/linux-ld.c -+++ b/test/Driver/linux-ld.c -@@ -16,7 +16,7 @@ - // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib" - // - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --target=x86_64-unknown-linux \ -+// RUN: --target=x86_64-unknown-linux -rtlib=platform \ - // RUN: --gcc-toolchain="" \ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ - // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s -@@ -36,7 +36,7 @@ - // CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" - // - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --target=x86_64-unknown-linux-gnux32 \ -+// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform \ - // RUN: --gcc-toolchain="" \ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ - // RUN: | FileCheck --check-prefix=CHECK-LD-X32 %s -@@ -86,7 +86,7 @@ - // CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a" - // - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --target=x86_64-unknown-linux \ -+// RUN: --target=x86_64-unknown-linux -rtlib=platform \ - // RUN: --gcc-toolchain="" \ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ - // RUN: --rtlib=libgcc \ -@@ -107,7 +107,7 @@ - // CHECK-LD-GCC: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" - // - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --target=x86_64-unknown-linux \ -+// RUN: --target=x86_64-unknown-linux -rtlib=platform \ - // RUN: -static-libgcc \ - // RUN: --gcc-toolchain="" \ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ -@@ -128,7 +128,7 @@ - // CHECK-LD-64-STATIC-LIBGCC: "-lgcc" "-lgcc_eh" - // - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --target=x86_64-unknown-linux \ -+// RUN: --target=x86_64-unknown-linux -rtlib=platform \ - // RUN: -static \ - // RUN: --gcc-toolchain="" \ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ -@@ -149,7 +149,7 @@ - // - // Check that flags can be combined. The -static dominates. - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --target=x86_64-unknown-linux \ -+// RUN: --target=x86_64-unknown-linux -rtlib=platform \ - // RUN: -static-libgcc -static \ - // RUN: --gcc-toolchain="" \ - // RUN: --sysroot=%S/Inputs/basic_linux_tree \ -@@ -1004,42 +1004,42 @@ - // - // Test linker invocation on Android. - // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ --// RUN: --t |
