[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

Alex Voicu via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 13:16:24 PDT 2024


https://github.com/AlexVlx commented:

> 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. 

If we were to do this, some targets would need to change to accomodate it; it would also probably break folks that are making naughty assumptions about the numbers actually meaning special things on this or that target - we can reasonably argue that's not quite kosher, but it'd cause some friction, I suspect. Personally I'd prefer that / think it'd have been really nice to legislate it as such back in the dawn of time. I will note that even if we do that we'll probably needs some bits from this patch (e.g. using the explicit `GlobalVariable` ctor or, alternatively, changing the default value for the AS used there).

https://github.com/llvm/llvm-project/pull/88182


More information about the cfe-commits mailing list