[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 28 12:11:13 PDT 2024


efriedma-quic wrote:

I mean, this is conceptually fine as far as it goes, but I'm not sure where we actually want to use it.  As noted on the other PRs, llvm.used/llvm.global_ctors/llvm.global_dtors don't really want a flat address-space.  The "address-space" for llvm.used, and for the "associated global" for global_ctors/global_dtors, is not a real address-space; it's just there because the IR representation forces the use of some address-space.

For most places using address-space "0", there's some appropriate address-space, it's just nobody has spent any time thinking about what that address-space is, and everything defaulted to "0" when address-spaces were introduced into LLVM.

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


More information about the cfe-commits mailing list