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

Pierre van Houtryve via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 04:57:53 PDT 2024


Pierre-vh wrote:

> > The default stance is usually that we're compiling something like C in which case the address of different objects need to be different.
> 
> This isn't the case with 0 sized allocations, which I believe are all required to get the same address

I think zero-sized allocations are an extension so they're not really required to do anything, especially for address spaces like LDS. Rejecting it should be fine I think.
The original ticket just complained about the error (an assert failure) being cryptic. We could just fatal instead and if we have an actual request to support it with a good example later, we can revisit it.

Internal zero-sized-types in LDS seem tricky to handle. When they're external we can probably justify giving them all the same address, but when they're internal it's expected that they're different objects, but then the question is: how do you support more than one variable-sized LDS variable?

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


More information about the llvm-commits mailing list