[clang] [lld] [llvm] [mlir] [IR] Introduce `T<address space>` to `DataLayout` to represent flat address space if a target supports it (PR #108786)
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 16 06:30:48 PDT 2024
shiltian wrote:
I updated the PR description. Hopefully it can make the motivation of this patch more clear. I think the central question is, why it can't be just address space 0. I don't have a clear answer to that. @arsenm first introduced this concept to LLVM at least 8 years ago. I agree that the only two targets that have this concept are AMDGPU and NVPTX, and they both set it to address space 0. My understanding is, LLVM doesn't force any other characteristics to address 0 in addition to just making it as the default one if there is no other specified for the allocation of certain variables, so we can't assert or assume how a target needs to implement it.
https://github.com/llvm/llvm-project/pull/108786
More information about the cfe-commits
mailing list