AMDGPU: Don't hard error on LDS globals in functions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 11 Mar 2020 15:49:03 +0000 (11:49 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Wed, 11 Mar 2020 19:34:11 +0000 (15:34 -0400)
commit1e0c540360e826d85e7f048d31895c4028e6499a
treebff42672bf3507916924c60e2dff6217932a4e6c
parent8f997b4f0118a8f9cd5c1071b61bfbc35a7e7e85
AMDGPU: Don't hard error on LDS globals in functions

Instead, emit a trap and a warning. We force inlining of this
situation, so any function where this happens should be dead as
indirect or external calls are not yet supported. This should avoid
erroring on dead code.
llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/lds-global-non-entry-func.ll
llvm/test/CodeGen/AMDGPU/lds-global-non-entry-func.ll