[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 17 04:52:28 PDT 2024
================
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo,
return 0;
}
+ /// \returns Target specific flat ptr address space; a flat ptr is a ptr that
+ /// can be casted to / from all other target address spaces. If the target
+ /// exposes no such address space / does not care, we return 0.
----------------
AlexVlx wrote:
There's no such thing as LangAS::Generic, there's LangAS::Default. Default doesn't have to map to something that's actually useful, and it actually does not. There's no actual mechanism to get a flat pointer. And I have no idea what notion spreading you are talking about - this merely maintains the status quo, wherein everybody grabs an AS 0 pointer and hopes for the best. So I have no idea what you are talking about, if I'm honest.
https://github.com/llvm/llvm-project/pull/95728
More information about the cfe-commits
mailing list