[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
Sun Sep 15 20:26:52 PDT 2024
================
@@ -245,6 +246,7 @@ class DataLayout {
unsigned getDefaultGlobalsAddressSpace() const {
return DefaultGlobalsAddrSpace;
}
+ unsigned getFlatAddressSpace() const { return FlatAddressSpace; }
----------------
shiltian wrote:
It is optional from a target's perspective, but the expectation is indeed that to check against `~0U` because it represents invalid address space. I will put a comment there.
https://github.com/llvm/llvm-project/pull/108786
More information about the cfe-commits
mailing list