[clang] [clang-tools-extra] [Clang] Use TargetInfo when deciding if an address space is compatible (PR #115777)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 19:14:30 PST 2024
================
@@ -111,6 +111,18 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
return getPointerWidthV(AddrSpace);
}
+ virtual bool isAddressSpaceSupersetOf(LangAS A, LangAS B) const override {
+ // The flat address space AS(0) is a superset of all the other address
+ // spaces used by the backend target.
----------------
arsenm wrote:
Should reject it, it's not flat addressable. We don't have a magic aperture constant for it and the addrspacecast codegen will fail
https://github.com/llvm/llvm-project/pull/115777
More information about the cfe-commits
mailing list