[PATCH] D79744: clang: Add address space to indirect abi info and use it for kernels

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 16 11:37:27 PDT 2020


rjmccall added a comment.

I don't understand why `noalias` is even a concern if the whole buffer passed to the kernel is read-only.  `noalias` is primarily about proving non-interference, but if you can tell IR that the buffer is read-only, that's a much more powerful statement.

Regardless, if you do need `noalias`, you should be able to emit the same IR that we'd emit if pointers to all the fields were assigned into `restrict` local variables and then only those variables were subsequently used.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79744/new/

https://reviews.llvm.org/D79744





More information about the cfe-commits mailing list