diff --git a/common/shlibs b/common/shlibs index 840244ec4d5..2827a7f83ce 100644 --- a/common/shlibs +++ b/common/shlibs @@ -918,11 +918,12 @@ libyaml-0.so.2 libyaml-0.1.4_1 libgtksourceviewmm-3.0.so.0 gtksourceviewmm-3.2.0_1 libyajl.so.2 yajl-2.0.1_1 libconfuse.so.2 confuse-3.2.1_1 -libclang.so.4 clang-4.0.0_1 +libclang.so.5 clang-5.0.0_1 libLLVM-3.8.so libllvm3.8-3.8.0_1 libLLVM-3.8.1.so libllvm3.8-3.8.1_1 libLLVM-3.9.so libllvm3.9-3.9.0_1 libLLVM-4.0.so libllvm4.0-4.0.0_1 +libLLVM-5.0.so libllvm5.0-5.0.0_1 libisofs.so.6 libisofs-0.6.24_1 libv8.so.3.24 libv8-3.24.35.22_1 libGeoIP.so.1 libgeoip-1.4.8_1 diff --git a/srcpkgs/libllvm4.0 b/srcpkgs/libllvm5.0 similarity index 100% rename from srcpkgs/libllvm4.0 rename to srcpkgs/libllvm5.0 diff --git a/srcpkgs/llvm/files/patches/cfe/cfe-004-add-musl-triples.patch b/srcpkgs/llvm/files/patches/cfe/cfe-004-add-musl-triples.patch index a96916b74e2..9486d0ec2e8 100644 --- a/srcpkgs/llvm/files/patches/cfe/cfe-004-add-musl-triples.patch +++ b/srcpkgs/llvm/files/patches/cfe/cfe-004-add-musl-triples.patch @@ -1,47 +1,39 @@ -From 420899503863473ba40ba68a81134dbcb3c330e5 Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni -Date: Tue, 8 Sep 2015 22:24:52 +0200 -Subject: [PATCH 3/7] add musl triples - ---- - lib/Driver/ToolChains.cpp | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp -index 15e36a1..3cd6dd1 100644 ---- a/lib/Driver/ToolChains.cpp -+++ b/lib/Driver/ToolChains.cpp -@@ -1275,7 +1275,10 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const { - static const char *const ARMTriples[] = {"arm-linux-gnueabi", - "arm-linux-androideabi"}; +--- clang/lib/Driver/ToolChains/Gnu.cpp.orig ++++ clang/lib/Driver/ToolChains/Gnu.cpp +@@ -1802,7 +1802,8 @@ + static const char *const AArch64LibDirs[] = {"/lib64", "/lib"}; + static const char *const AArch64Triples[] = { + "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-linux-android", +- "aarch64-redhat-linux", "aarch64-suse-linux"}; ++ "aarch64-redhat-linux", "aarch64-suse-linux", ++ "aarch64-linux-musl"}; + static const char *const AArch64beLibDirs[] = {"/lib"}; + static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu", + "aarch64_be-linux-gnu"}; +@@ -1813,7 +1814,9 @@ static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf", -- "armv7hl-redhat-linux-gnueabi"}; -+ "armv7hl-redhat-linux-gnueabi", -+ "armv6-linux-musleabihf", "armv6l-linux-musleabihf", -+ "armv7-linux-musleabihf", "armv7l-linux-musleabihf", -+ "arm-linux-musleabihf" }; + "armv7hl-redhat-linux-gnueabi", + "armv6hl-suse-linux-gnueabi", +- "armv7hl-suse-linux-gnueabi"}; ++ "armv7hl-suse-linux-gnueabi", ++ "arm-linux-musleabihf", ++ "armv7l-linux-musleabihf"}; static const char *const ARMebLibDirs[] = {"/lib"}; static const char *const ARMebTriples[] = {"armeb-linux-gnueabi", "armeb-linux-androideabi"}; -@@ -1289,6 +1292,7 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const { +@@ -1827,6 +1830,7 @@ "x86_64-redhat-linux", "x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-linux-android", -+ "x86_64-linux-musl", "x86_64-pc-linux-musl", ++ "x86_64-linux-musl", "x86_64-unknown-linux"}; static const char *const X32LibDirs[] = {"/libx32"}; static const char *const X86LibDirs[] = {"/lib32", "/lib"}; -@@ -1297,7 +1301,9 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const { +@@ -1835,6 +1839,7 @@ "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux", "i686-montavista-linux", "i686-linux-android", -- "i586-linux-gnu"}; -+ "i586-linux-gnu", "i486-linux-musl", "i486-pc-linux-musl", -+ "i686-linux-musl", "i686-pc-linux-musl" -+ }; ++ "i686-linux-musl", + "i586-linux-gnu"}; static const char *const MIPSLibDirs[] = {"/lib"}; - static const char *const MIPSTriples[] = { --- -2.5.1 - diff --git a/srcpkgs/llvm/files/patches/cfe/cfe-007-musl-use-init-array.patch b/srcpkgs/llvm/files/patches/cfe/cfe-007-musl-use-init-array.patch deleted file mode 100644 index bab9a293106..00000000000 --- a/srcpkgs/llvm/files/patches/cfe/cfe-007-musl-use-init-array.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- cfe-3.8.0.src/lib/Driver/ToolChains.cpp.orig -+++ cfe-3.8.0.src/lib/Driver/ToolChains.cpp -@@ -2428,6 +2428,7 @@ - ArgStringList &CC1Args) const { - const Generic_GCC::GCCVersion &V = GCCInstallation.getVersion(); - bool UseInitArrayDefault = -+ getTriple().getEnvironment() == llvm::Triple::Musl || - getTriple().getArch() == llvm::Triple::aarch64 || - getTriple().getArch() == llvm::Triple::aarch64_be || - (getTriple().getOS() == llvm::Triple::Linux && diff --git a/srcpkgs/llvm/files/patches/compiler-rt/compiler-rt-003-sigaltstack.patch b/srcpkgs/llvm/files/patches/compiler-rt/compiler-rt-003-sigaltstack.patch deleted file mode 100644 index 1be89c2ea2f..00000000000 --- a/srcpkgs/llvm/files/patches/compiler-rt/compiler-rt-003-sigaltstack.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2016-10-14 00:34:13.000000000 +0200 -+++ compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-08-13 14:11:31.999995107 +0200 -@@ -275,7 +275,7 @@ - - // Alternate stack for signal handling. - InternalScopedBuffer handler_stack_memory(kHandlerStackSize); -- struct sigaltstack handler_stack; -+ stack_t handler_stack; - internal_memset(&handler_stack, 0, sizeof(handler_stack)); - handler_stack.ss_sp = handler_stack_memory.data(); - handler_stack.ss_size = kHandlerStackSize; ---- compiler-rt/lib/sanitizer_common/sanitizer_linux.h 2016-10-06 11:58:11.000000000 +0200 -+++ compiler-rt/lib/sanitizer_common/sanitizer_linux.h 2017-08-13 14:12:42.510168195 +0200 -@@ -30,8 +30,7 @@ - - // Syscall wrappers. - uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); --uptr internal_sigaltstack(const struct sigaltstack* ss, -- struct sigaltstack* oss); -+uptr internal_sigaltstack(const void* ss, void* oss); - uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set, - __sanitizer_sigset_t *oldset); - ---- compiler-rt/lib/sanitizer_common/sanitizer_linux.cc 2017-01-06 21:57:47.000000000 +0100 -+++ compiler-rt/lib/sanitizer_common/sanitizer_linux.cc 2017-08-13 14:12:26.765130389 +0200 -@@ -607,8 +607,7 @@ - } - #endif - --uptr internal_sigaltstack(const struct sigaltstack *ss, -- struct sigaltstack *oss) { -+uptr internal_sigaltstack(const void *ss, void *oss) { - return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss); - } - ---- compiler-rt/lib/esan/esan_sideline_linux.cpp 2016-07-19 07:03:38.000000000 +0200 -+++ compiler-rt/lib/esan/esan_sideline_linux.cpp 2017-08-13 14:18:04.702933687 +0200 -@@ -70,7 +70,7 @@ - - // Set up a signal handler on an alternate stack for safety. - InternalScopedBuffer StackMap(SigAltStackSize); -- struct sigaltstack SigAltStack; -+ stack_t SigAltStack; - SigAltStack.ss_sp = StackMap.data(); - SigAltStack.ss_size = SigAltStackSize; - SigAltStack.ss_flags = 0; diff --git a/srcpkgs/llvm/files/patches/compiler-rt/compiler-rt-004-__res_state.patch b/srcpkgs/llvm/files/patches/compiler-rt/compiler-rt-004-__res_state.patch deleted file mode 100644 index afa9d77ae75..00000000000 --- a/srcpkgs/llvm/files/patches/compiler-rt/compiler-rt-004-__res_state.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc -+++ compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc -@@ -287,7 +287,7 @@ void InitializePlatform() { - int ExtractResolvFDs(void *state, int *fds, int nfd) { - #if SANITIZER_LINUX && !SANITIZER_ANDROID - int cnt = 0; -- __res_state *statp = (__res_state*)state; -+ struct __res_state *statp = (struct __res_state*)state; - for (int i = 0; i < MAXNS && cnt < nfd; i++) { - if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) - fds[cnt++] = statp->_u._ext.nssocks[i]; - - diff --git a/srcpkgs/llvm/files/patches/lldb/editline_wchar.patch b/srcpkgs/llvm/files/patches/lldb/editline_wchar.patch index 497e8b35e23..828e4db9834 100644 --- a/srcpkgs/llvm/files/patches/lldb/editline_wchar.patch +++ b/srcpkgs/llvm/files/patches/lldb/editline_wchar.patch @@ -1,11 +1,11 @@ ---- lldb/include/lldb/Host/Editline.h.orig -+++ lldb/include/lldb/Host/Editline.h -@@ -43,7 +43,7 @@ - // will only be +--- lldb-5.0.0.src/include/lldb/Host/Editline.h.orig ++++ lldb-5.0.0.src/include/lldb/Host/Editline.h +@@ -44,7 +44,7 @@ // used in cases where this is true. This is a compile time dependecy, for now // selected per target Platform --#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) -+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) + #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \ +- defined(__OpenBSD__) ++ defined(__OpenBSD__) || defined(__linux__) #define LLDB_EDITLINE_USE_WCHAR 1 #include #else diff --git a/srcpkgs/llvm/files/patches/lldb/fix-musl.patch b/srcpkgs/llvm/files/patches/lldb/fix-musl.patch deleted file mode 100644 index c3422bef632..00000000000 --- a/srcpkgs/llvm/files/patches/lldb/fix-musl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 13b33959b864e3697e8dad002577321de13f4cc9 Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni -Date: Tue, 8 Sep 2015 23:00:56 +0200 -Subject: [PATCH] fix musl - ---- - source/Core/ConnectionSharedMemory.cpp | 1 + - source/Host/common/FileSpec.cpp | 1 + - source/Host/linux/Host.cpp | 2 +- - source/Host/linux/HostThreadLinux.cpp | 2 ++ - source/Plugins/Process/Linux/Procfs.h | 2 +- - 5 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/source/Host/common/FileSpec.cpp b/source/Host/common/FileSpec.cpp -index ceb094b..a48620d 100644 ---- a/source/Host/common/FileSpec.cpp -+++ b/source/Host/common/FileSpec.cpp -@@ -14,6 +14,7 @@ - #include "lldb/Host/windows/windows.h" - #endif - #include -+#include /* PATH_MAX */ - #ifndef _MSC_VER - #include - #endif --- -2.5.1 - diff --git a/srcpkgs/llvm/files/patches/lldb/gcc7-functional.patch b/srcpkgs/llvm/files/patches/lldb/gcc7-functional.patch deleted file mode 100644 index f4d6c349fa1..00000000000 --- a/srcpkgs/llvm/files/patches/lldb/gcc7-functional.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- lldb/include/lldb/Utility/TaskPool.h 2016-09-06 22:57:50.000000000 +0200 -+++ lldb/include/lldb/Utility/TaskPool.h 2017-05-09 10:11:17.802838086 +0200 -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - // Global TaskPool class for running tasks in parallel on a set of worker thread - // created the first diff --git a/srcpkgs/llvm/files/patches/llvm/llvm-003-musl.patch b/srcpkgs/llvm/files/patches/llvm/llvm-003-musl.patch index 8fafa570037..9a83da45cc5 100644 --- a/srcpkgs/llvm/files/patches/llvm/llvm-003-musl.patch +++ b/srcpkgs/llvm/files/patches/llvm/llvm-003-musl.patch @@ -31,41 +31,6 @@ index e0a1ee3..465b65a 100644 namespace llvm { /// VecDesc - Describes a possible vectorization of a function. /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized -diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp -index 635c50c..863f4a0 100644 ---- a/lib/Analysis/TargetLibraryInfo.cpp -+++ b/lib/Analysis/TargetLibraryInfo.cpp -@@ -336,14 +336,15 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - } - - // The following functions are available on at least Linux: -- if (!T.isOSLinux()) { -+ if (!T.isOSLinux()) -+ TLI.setUnavailable(LibFunc::memalign); -+ if (1 /*!T.isGlibc()*/) { - TLI.setUnavailable(LibFunc::dunder_strdup); - TLI.setUnavailable(LibFunc::dunder_strtok_r); - TLI.setUnavailable(LibFunc::dunder_isoc99_scanf); - TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf); - TLI.setUnavailable(LibFunc::under_IO_getc); - TLI.setUnavailable(LibFunc::under_IO_putc); -- TLI.setUnavailable(LibFunc::memalign); - TLI.setUnavailable(LibFunc::fopen64); - TLI.setUnavailable(LibFunc::fseeko64); - TLI.setUnavailable(LibFunc::fstat64); -diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp -index 9a7aeb5..e21750d 100644 ---- a/lib/Support/DynamicLibrary.cpp -+++ b/lib/Support/DynamicLibrary.cpp -@@ -138,7 +138,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) { - - // This macro returns the address of a well-known, explicit symbol - #define EXPLICIT_SYMBOL(SYM) \ -- if (!strcmp(symbolName, #SYM)) return &SYM -+ if (!strcmp(symbolName, #SYM)) return (void *) &SYM - - // On linux we have a weird situation. The stderr/out/in symbols are both - // macros and global variables because of standards requirements. So, we diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc index 5780764..1d548c1 100644 --- a/utils/unittest/googletest/src/gtest.cc @@ -81,3 +46,34 @@ index 5780764..1d548c1 100644 -- 2.5.1 +--- llvm-5.0.0.src/lib/Analysis/TargetLibraryInfo.cpp.orig ++++ llvm-5.0.0.src/lib/Analysis/TargetLibraryInfo.cpp +@@ -439,14 +439,15 @@ + } + + // The following functions are available on at least Linux: +- if (!T.isOSLinux()) { ++ if (!T.isOSLinux()) ++ TLI.setUnavailable(LibFunc_memalign); ++ if (1 /*!T.isGlibc()*/) { + TLI.setUnavailable(LibFunc_dunder_strdup); + TLI.setUnavailable(LibFunc_dunder_strtok_r); + TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); + TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); + TLI.setUnavailable(LibFunc_under_IO_getc); + TLI.setUnavailable(LibFunc_under_IO_putc); +- TLI.setUnavailable(LibFunc_memalign); + TLI.setUnavailable(LibFunc_fopen64); + TLI.setUnavailable(LibFunc_fseeko64); + TLI.setUnavailable(LibFunc_fstat64); +--- llvm-5.0.0.src/lib/Support/Unix/DynamicLibrary.inc.orig ++++ llvm-5.0.0.src/lib/Support/Unix/DynamicLibrary.inc +@@ -103,7 +103,7 @@ + + // This macro returns the address of a well-known, explicit symbol + #define EXPLICIT_SYMBOL(SYM) \ +- if (!strcmp(SymbolName, #SYM)) return &SYM ++ if (!strcmp(SymbolName, #SYM)) return (void *)&SYM + + // Under glibc we have a weird situation. The stderr/out/in symbols are both + // macros and global variables because of standards requirements. So, we diff --git a/srcpkgs/llvm/files/patches/llvm/reverse-llvm-AMDGPU-Fix-an-interaction-between-WQM-and-polygon-stippling.patch b/srcpkgs/llvm/files/patches/llvm/reverse-llvm-AMDGPU-Fix-an-interaction-between-WQM-and-polygon-stippling.patch new file mode 100644 index 00000000000..f23b9168286 --- /dev/null +++ b/srcpkgs/llvm/files/patches/llvm/reverse-llvm-AMDGPU-Fix-an-interaction-between-WQM-and-polygon-stippling.patch @@ -0,0 +1,140 @@ +From 25e2616626caafb896517e18cd8aa724fba2b200 Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 29 Nov 2016 03:41:28 +0000 +Subject: [PATCH] Merging r280589: + +------------------------------------------------------------------------ +r280589 | nhaehnle | 2016-09-03 05:26:32 -0700 (Sat, 03 Sep 2016) | 19 lines + +AMDGPU: Fix an interaction between WQM and polygon stippling + +Summary: +This fixes a rare bug in polygon stippling with non-monolithic pixel shaders. + +The underlying problem is as follows: the prolog part contains the polygon +stippling sequence, i.e. a kill. The main part then enables WQM based on the +_reduced_ exec mask, effectively undoing most of the polygon stippling. + +Since we cannot know whether polygon stippling will be used, the main part +of a non-monolithic shader must always return to exact mode to fix this +problem. + +Reviewers: arsenm, tstellarAMD, mareko + +Subscribers: arsenm, llvm-commits, kzhuravl + +Differential Revision: https://reviews.llvm.org/D23131 + +------------------------------------------------------------------------ + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_39@288105 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/Target/AMDGPU/SIInstructions.td | 1 + + lib/Target/AMDGPU/SIWholeQuadMode.cpp | 7 ----- + test/CodeGen/AMDGPU/wqm.ll | 49 ++++++++++++++++++++++++++++++++--- + 3 files changed, 46 insertions(+), 11 deletions(-) + +diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td +index 18b7d5d..dde5f2f 100644 +--- a/lib/Target/AMDGPU/SIInstructions.td ++++ b/lib/Target/AMDGPU/SIInstructions.td +@@ -2029,6 +2029,7 @@ 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 b200c15..1534d58 100644 +--- a/lib/Target/AMDGPU/SIWholeQuadMode.cpp ++++ b/lib/Target/AMDGPU/SIWholeQuadMode.cpp +@@ -219,13 +219,6 @@ 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 809a7ba..41e4264 100644 +--- a/test/CodeGen/AMDGPU/wqm.ll ++++ b/test/CodeGen/AMDGPU/wqm.ll +@@ -17,17 +17,18 @@ main_body: + ;CHECK-LABEL: {{^}}test2: + ;CHECK-NEXT: ; %main_body + ;CHECK-NEXT: s_wqm_b64 exec, exec +-;CHECK: image_sample + ;CHECK-NOT: exec +-;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) { ++define amdgpu_ps void @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 +- ret float %data ++ ++ 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 + } + + ; ... but disabled for stores (and, in this simple case, not re-enabled). +@@ -414,6 +415,46 @@ 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 diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template index 004a5fd130e..5ba37c0ae46 100644 --- a/srcpkgs/llvm/template +++ b/srcpkgs/llvm/template @@ -1,6 +1,6 @@ # Template file for 'llvm' pkgname=llvm -version=4.0.1 +version=5.0.1 revision=1 wrksrc="llvm-${version}.src" lib32disabled=yes @@ -24,27 +24,25 @@ distfiles=" http://www.llvm.org/releases/${version}/cfe-${version}.src.tar.xz http://www.llvm.org/releases/${version}/clang-tools-extra-${version}.src.tar.xz http://www.llvm.org/releases/${version}/compiler-rt-${version}.src.tar.xz" -checksum="da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51 - 8432d2dfd86044a0fc21713e0b5c1d98e1d8aad863cf67562879f47f841ac47b - 63ce10e533276ca353941ce5ab5cc8e8dcd99dbdd9c4fa49f344a212f29d36ed - 61738a735852c23c3bdbe52d035488cdb2083013f384d67c1ba36fabebd8769b - 35d1e64efc108076acbe7392566a52c35df9ec19778eb9eb12245fc7d8b915b6 - a3c87794334887b93b7a766c507244a7cdcce1d48b2e9249fc9a94f2c3beb440" +checksum="5fa7489fc0225b11821cab0362f5813a05f2bcf2533e8a4ea9c9c860168807b0 + b7c1c9e67975ca219089a3a6a9c77c2d102cead2dc38264f2524aa3326da376a + d5b36c0005824f07ab093616bdff247f3da817cae2c51371e1d1473af717d895 + 135f6c9b0cd2da1aff2250e065946258eb699777888df39ca5a5b4fe5e23d0ff + 9aada1f9d673226846c3399d13fab6bba4bfd38bcfe8def5ee7b0ec24f8cd225 + 4edd1417f457a9b3f0eb88082530490edf3cf6a7335cdce8ecbc5d3e16a895da" # XXX Investigate ocaml bindings. hostmakedepends="groff perl python zlib-devel libffi-devel swig" makedepends="python-devel zlib-devel libffi-devel libedit-devel libxml2-devel binutils-devel" -depends="libllvm4.0" +depends="libllvm5.0" -subpackages="clang-tools-extra clang clang-analyzer libllvm4.0" +subpackages="clang-tools-extra clang clang-analyzer libllvm5.0" if [ -z "$CROSS_BUILD" ]; then # XXX fails to cross compile due to python subpackages+=" lldb lldb-devel" fi subpackages+=" lld lld-devel" -CXXFLAGS="-D_GLIBCXX_USE_C99_STDIO=1 -D_GLIBCXX_USE_C99_STDLIB=1" - post_extract() { # patches cd ${XBPS_BUILDDIR}/llvm-${version}.src @@ -180,7 +178,6 @@ clang-tools-extra_package() { vmove usr/bin/modularize vmove "usr/lib/libclangApplyReplacements*" vmove "usr/lib/libclangQuery*" - vmove "usr/lib/libclangRename*" vmove "usr/lib/libclangTidy*" vmove "usr/share/clang/*tidy*" } @@ -246,7 +243,7 @@ lldb-devel_package() { vmove "usr/lib/liblldb*.so" } } -libllvm4.0_package() { +libllvm5.0_package() { short_desc+=" - runtime library" pkg_install() { vmove "usr/lib/libLLVM-*.so*"