[Mlir-commits] [clang] [lld] [llvm] [mlir] [IR] Introduce `T<address space>` to `DataLayout` to represent flat address space if a target supports it (PR #108786)
Eli Friedman
llvmlistbot at llvm.org
Mon Sep 16 14:21:25 PDT 2024
efriedma-quic wrote:
Both in InferAddressSpaces, and in Attributor, you don't really care about whether a flat address-space exists. All you really need to know is whether, for a given pair of address-spaces "A" and "B", `addrspacecast ptr addrspace(A) %x to ptr addrspace(B)` should be optimized to use operations in "A" instead of "B". In this context, the existence of a "flat" address-space is just a statement that we should optimize if "B" is the flat address-space.
Given that, maybe worth clarifying LangRef to be more explicit: start off with a statement of the "should be optimized" property, and then say that GPU targets commonly refer to this kind of address-space as "flat".
I don't know whether anyone needs the generalization to multiple flat address-spaces, or trees of address-spaces with multiple levels of nesting.
https://github.com/llvm/llvm-project/pull/108786
More information about the Mlir-commits
mailing list