[PATCH] D18358: AMDGPU: Account for globals in AMDGPUPromoteAlloca pass
Bas Nieuwenhuizen via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 11:07:55 PDT 2016
bnieuwenhuizen added inline comments.
Comment at: test/CodeGen/AMDGPU/promote-alloca-globals.ll:1
@@ +1,2 @@
+; RUN: opt -S -mtriple=amdgcn-unknown-unknown -amdgpu-promote-alloca < %s | FileCheck %s
> You should also include an llc run line and check for the final LDS usage
How do you check for LDS usage? I can't find anything about LDS except the numerical representations of the RSRC registers.
Comment at: test/CodeGen/AMDGPU/promote-alloca-globals.ll:24
@@ +23,3 @@
+ store i32 %3, i32 addrspace(1)* %arrayidx13
+ %v = getelementptr inbounds [1500 x [5 x i32]], [1500 x [5 x i32]] addrspace(3)* @promote_alloca_size_1500.stack, i32 0, i32 0
+ ret void
> This GEP isn't used?
It isn't as we just need a user of the global array to be used by an instruction inside the function to let the AMDGPUPromoteAlloca associate it with this function. I'll probably add a user though, to prevent llc from optimizing the LDS array away.
More information about the llvm-commits