rjmccall wrote:

It's very uncommon for LLVM to need to come up with an address space on its 
own, as opposed to just propagating the original address space of some memory / 
operation as chosen by the frontend.  LLVM occasionally creates new storage 
allocations, but usually they're (non-escaping) `alloca`s and therefore have to 
be in the `alloca` AS.  The only situation I can think of where LLVM might 
legitimately have to come with an address space is when LLVM decides to 
introduce new global constants.  (I can't think of any transformation that 
would introduce a *non-constant* global.)  So if you add a default AS to 
`DataLayout`, please focus on that specifically and call it something like a 
"preferred constant address space" rather than some sort of default AS.  The 
default AS for pointer types and so on is really a frontend issue that's none 
of LLVM's business to know about.

https://github.com/llvm/llvm-project/pull/88182
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to