================
@@ -84,6 +91,11 @@ enum : unsigned {
   // Some places use this if the address space can't be determined.
   UNKNOWN_ADDRESS_SPACE = ~0u,
 };
+
+/// The BARRIER AS is does not have an aperture in HW, so when converting
+/// BARRIER addresses from/to generic, we represent them as LDS addresses
+/// offset by a large amount so they can never alias with real LDS memory.
----------------
nhaehnle wrote:

I agree we need to be able to roundtrip this address space through 
`addrspace(0)`, but I don't follow this point.

Taking a barrier pointer, casting it to flat/generic and then trying to 
load/store it is inherently undefined behavior as mentioned in AMDGPUUsage.rst 
(though perhaps it could be a bit more explicit).

https://github.com/llvm/llvm-project/pull/195613
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to