[llvm] [AMDGPU][LowerModuleLDS] Handle non-dynlds zero sized type (PR #84742)

Jon Chesterfield via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 08:40:00 PDT 2024


JonChesterfield wrote:

It's not obvious to me that a zero sized type is necessarily the same thing as a dynamic LDS allocation.

The default stance is usually that we're compiling something like C in which case the address of different objects need to be different. Mapping different things onto the same address is bad. The extern array[] thing from cuda gets special cased.

I think the baseline is that an unsized static is a nonsense and we should reject it at sema, and fatal_error on one if it makes it to LDS lowering.

If there are some useful semantics to give one then we need to work out what those semantics are before choosing a lowering.

https://github.com/llvm/llvm-project/pull/84742


More information about the llvm-commits mailing list