[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
Thu Sep 19 08:40:45 PDT 2024


shiltian wrote:

It's a good idea to make it more generic. Potentially we can add an API like `isAddressSpaceOptimizable(unsigned AS)`. If we want to do that, the question would be, where to put this API? Like I mentioned in the description, I tried some similar approach but they didn't pan out well. So far we know that, neither TTI nor `TargetMachine` is good place. Where else can we do this, other than putting it into `DataLayout`? If `DataLayout` is still a good place, then it might be just about whether we call it a _flat_ address space, or _optimizable_ address space, and nothing would be different from what is done in this PR.

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


More information about the cfe-commits mailing list