[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 9 13:35:03 PDT 2024
rjmccall wrote:
> Why can't we just declare that the "generic" address-space must always be 0? The specific numbers we use for address-spaces are completely arbitrary anyway.
I don't think this works; there's nothing that LLVM could possibly do with a generic AS that would justify it being called out in the representation like this, because the existence of a generic AS is a deeply non-portable concept. The only AS that I think would be worthwhile to call out like this would be the `alloca` AS, and in fact I tried to argue that as a reason not to introduce the `alloca` AS to `DataLayout` in the first place. Unfortunately, I lost that argument, IIRC because some targets were adamant that they wanted to vary the `alloca` AS between functions.
https://github.com/llvm/llvm-project/pull/88182
More information about the cfe-commits
mailing list