- If a generic pointer is loaded from a readonly and noalias kernel pointer argument, it could be assumed as a global one. + readonly prevents the possible modifications from the device side, and + noalias ensures that pointer won't alias to any other objects in the whole kernel execution lifetime. + Taking them together, it's safe to assume that memory object could only be modified on the host side and contains global pointers only.
Readonly is incorrect here, as it only indicates the function does not write to the memory and does not indicate the memory may be changed by another function/thread. I also don't think noalias is really the correct check for the owned object
That readonly atttribute is marked in function attribute deduction pass by checking every use of a pointer argument, including if it's passed into another sub-func. It's only marked as readonly when it's safe. It's safe to assume there's no write though a pointer argument marked with readonly.