[llvm] Reapply "[NFC][AMDGPU] Introduce AMDGPU::FlatVariant enum to replace uint64_t FLAT discriminant" (PR #200431)

Valery Pykhtin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 10:52:05 PDT 2026


vpykhtin wrote:

> This looks good to me at it current form, but a thought: maybe directly merge this into `AMDGPUAS`, make them pretty large numbers, and then we can almost treat them as dedicated virtual AS.

I see several problems:
1. Would cause name confusion since FLAT_ADDRESS already exists there with a different meaning. 
2. It would also replace the strongly-typed 3-value enum with a plain integer. 
3. Additionally, AMDGPUAS values are ABI-visible IR address spaces, while FlatAddrSpace is a purely backend-internal encoding discriminant — conflating the two would blur that boundary.

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


More information about the llvm-commits mailing list