[PATCH] D47740: [AMDGPU] Do not consider indirect acces through phi for wave limiter
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 09:55:20 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334420: [AMDGPU] Do not consider indirect acces through phi for wave limiter (authored by rampitec, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D47740?vs=149838&id=150780#toc
Repository:
rL LLVM
https://reviews.llvm.org/D47740
Files:
llvm/trunk/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
llvm/trunk/test/CodeGen/AMDGPU/perfhint.ll
Index: llvm/trunk/test/CodeGen/AMDGPU/perfhint.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/perfhint.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/perfhint.ll
@@ -82,4 +82,30 @@
ret void
}
+; GCN-LABEL: {{^}}test_indirect_through_phi:
+; MemoryBound: 0
+; WaveLimiterHint : 0
+define amdgpu_kernel void @test_indirect_through_phi(float addrspace(1)* %arg) {
+bb:
+ %load = load float, float addrspace(1)* %arg, align 8
+ %load.f = bitcast float %load to i32
+ %n = tail call i32 @llvm.amdgcn.workitem.id.x()
+ br label %bb1
+
+bb1: ; preds = %bb1, %bb
+ %phi = phi i32 [ %load.f, %bb ], [ %and2, %bb1 ]
+ %ind = phi i32 [ 0, %bb ], [ %inc2, %bb1 ]
+ %and1 = and i32 %phi, %n
+ %gep = getelementptr inbounds float, float addrspace(1)* %arg, i32 %and1
+ store float %load, float addrspace(1)* %gep, align 4
+ %inc1 = add nsw i32 %phi, 1310720
+ %and2 = and i32 %inc1, %n
+ %inc2 = add nuw nsw i32 %ind, 1
+ %cmp = icmp eq i32 %inc2, 1024
+ br i1 %cmp, label %bb2, label %bb1
+
+bb2: ; preds = %bb1
+ ret void
+}
+
declare i32 @llvm.amdgcn.workitem.id.x()
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
@@ -198,12 +198,6 @@
continue;
}
- if (auto Phi = dyn_cast<PHINode>(V)) {
- for (unsigned I = 0, E = Phi->getNumIncomingValues(); I != E; ++I)
- WorkSet.insert(Phi->getIncomingValue(I));
- continue;
- }
-
LLVM_DEBUG(dbgs() << " dropped\n");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47740.150780.patch
Type: text/x-patch
Size: 1762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/65c4421e/attachment.bin>
More information about the llvm-commits
mailing list