llvm-32: 3.9.1 -> 4.0.0

This commit is contained in:
Danny Rawlins 2017-03-14 12:56:15 +11:00
parent 65869a877c
commit 9a3e2c7eaf
5 changed files with 20 additions and 136 deletions

View File

@ -14,7 +14,9 @@ drwxr-xr-x root/root usr/lib32/cmake/llvm/
-rw-r--r-- root/root usr/lib32/cmake/llvm/AddLLVMDefinitions.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/AddOCaml.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/AddSphinxTarget.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/CheckAtomic.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/CheckCompilerVersion.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/CheckLinkerFlag.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/ChooseMSVCCRT.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/CrossCompile.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/DetermineGCCCompatible.cmake
@ -34,9 +36,9 @@ drwxr-xr-x root/root usr/lib32/cmake/llvm/
-rw-r--r-- root/root usr/lib32/cmake/llvm/LLVMProcessSources.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/TableGen.cmake
-rw-r--r-- root/root usr/lib32/cmake/llvm/VersionFromVCS.cmake
lrwxrwxrwx root/root usr/lib32/libLLVM-3.9.1.so -> libLLVM-3.9.so
-rwxr-xr-x root/root usr/lib32/libLLVM-3.9.so
lrwxrwxrwx root/root usr/lib32/libLLVM.so -> libLLVM-3.9.so
lrwxrwxrwx root/root usr/lib32/libLLVM-4.0.0.so -> libLLVM-4.0.so
-rwxr-xr-x root/root usr/lib32/libLLVM-4.0.so
lrwxrwxrwx root/root usr/lib32/libLLVM.so -> libLLVM-4.0.so
-rw-r--r-- root/root usr/lib32/libLLVMAMDGPUAsmParser.a
-rw-r--r-- root/root usr/lib32/libLLVMAMDGPUAsmPrinter.a
-rw-r--r-- root/root usr/lib32/libLLVMAMDGPUCodeGen.a
@ -50,15 +52,19 @@ lrwxrwxrwx root/root usr/lib32/libLLVM.so -> libLLVM-3.9.so
-rw-r--r-- root/root usr/lib32/libLLVMBPFAsmPrinter.a
-rw-r--r-- root/root usr/lib32/libLLVMBPFCodeGen.a
-rw-r--r-- root/root usr/lib32/libLLVMBPFDesc.a
-rw-r--r-- root/root usr/lib32/libLLVMBPFDisassembler.a
-rw-r--r-- root/root usr/lib32/libLLVMBPFInfo.a
-rw-r--r-- root/root usr/lib32/libLLVMBitReader.a
-rw-r--r-- root/root usr/lib32/libLLVMBitWriter.a
-rw-r--r-- root/root usr/lib32/libLLVMCodeGen.a
-rw-r--r-- root/root usr/lib32/libLLVMCore.a
-rw-r--r-- root/root usr/lib32/libLLVMCoroutines.a
-rw-r--r-- root/root usr/lib32/libLLVMCoverage.a
-rw-r--r-- root/root usr/lib32/libLLVMDebugInfoCodeView.a
-rw-r--r-- root/root usr/lib32/libLLVMDebugInfoDWARF.a
-rw-r--r-- root/root usr/lib32/libLLVMDebugInfoMSF.a
-rw-r--r-- root/root usr/lib32/libLLVMDebugInfoPDB.a
-rw-r--r-- root/root usr/lib32/libLLVMDemangle.a
-rw-r--r-- root/root usr/lib32/libLLVMExecutionEngine.a
-rw-r--r-- root/root usr/lib32/libLLVMGlobalISel.a
-rw-r--r-- root/root usr/lib32/libLLVMIRReader.a
@ -97,5 +103,8 @@ lrwxrwxrwx root/root usr/lib32/libLLVM.so -> libLLVM-3.9.so
-rw-r--r-- root/root usr/lib32/libLLVMX86Disassembler.a
-rw-r--r-- root/root usr/lib32/libLLVMX86Info.a
-rw-r--r-- root/root usr/lib32/libLLVMX86Utils.a
-rw-r--r-- root/root usr/lib32/libLLVMXRay.a
-rw-r--r-- root/root usr/lib32/libLLVMipo.a
-rwxr-xr-x root/root usr/lib32/libLTO.so
lrwxrwxrwx root/root usr/lib32/libLTO.so -> libLTO.so.4
lrwxrwxrwx root/root usr/lib32/libLTO.so.4 -> libLTO.so.4.0.0
-rwxr-xr-x root/root usr/lib32/libLTO.so.4.0.0

View File

@ -1,2 +1 @@
7b8219e2b0d15e96a09dbe8bc2614777 0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch
3259018a7437e157f3642df80f1983ea llvm-3.9.1.src.tar.xz
ea9139a604be702454f6acf160b4f3a2 llvm-4.0.0.src.tar.xz

View File

@ -1,6 +1,5 @@
untrusted comment: verify with /etc/ports/compat-32.pub
RWSwxGo/zH7eXepOzlEla4ovYdza7SzaHHMMMCiuHwtrc6xblyIdDrkKjsDogAUqhya5IKVH0jBWkA9Sc3voPTggtsl+l676cQU=
SHA256 (Pkgfile) = 5b3c482d992d9f66ceae6e40b414fe1cf3d6b7fad23cada4420a14d2a1d122cf
SHA256 (.footprint) = 617bfee732c4d597c192d9520d58d2c59196c3a35f25000ec7204786ae5b30b2
SHA256 (llvm-3.9.1.src.tar.xz) = 1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee
SHA256 (0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch) = 782e014661ae77b48468103d6879acd415c1fb8e90ccdc26fe1007265fd22c42
RWSwxGo/zH7eXeMWnHa1+GhZmm8p/XjXxDUT3NvF0i8gTakOsqoM0FGkzr8xpnEPu9rcsxf6joyU4XV4BtNQiHEZ0P1xMJP5Eww=
SHA256 (Pkgfile) = 50c7c7711e30167233df0c5fe6735dc9086bfb2b86240f403a267007429cd3ff
SHA256 (.footprint) = ce8ddfd8741e4498a3d779abebf4653a7e4a0a501cef4ca2387d95c61a10a98b
SHA256 (llvm-4.0.0.src.tar.xz) = 8d10511df96e73b8ff9e7abbfb4d4d432edbdbe965f1f4f07afaf370b8a533be

View File

@ -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

View File

@ -5,16 +5,13 @@
# Depends on: python-32 llvm
name=llvm-32
version=3.9.1
version=4.0.0
release=1
source=(http://llvm.org/releases/$version/llvm-$version.src.tar.xz
0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch)
source=(http://llvm.org/releases/$version/llvm-$version.src.tar.xz)
build() {
cd llvm-$version.src
patch -p1 -i $SRC/0009-Revert-AMDGPU-Fix-an-interaction-between-WQM-and-pol.patch
install -d build $SRC/keep
cd build