[PATCH] D60772: [AMDGPU] Add optional bounds checking for scratch accesses

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 20:22:42 PDT 2019


arsenm added a comment.

In D60772#1501198 <https://reviews.llvm.org/D60772#1501198>, @nhaehnle wrote:

> In D60772#1470073 <https://reviews.llvm.org/D60772#1470073>, @arsenm wrote:
>
> > I don't understand the problem being solved here. Who/what is this intended to benefit? An out of bounds access is going to be undefined.
>
>
> Graphics APIs have "robust (buffer) access" settings in which out of bounds accesses must be guaranteed not to crash the program.


There must be some restrictions on this? I don't think any kind of codegen pass like this will be strong enough to guarantee this. An IR optimization could have introduced a trap or something based on a detected invalid access. This probably won't happen today since things are overly conservative with non-0 address spaces, but this is something I want to fix


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60772





More information about the llvm-commits mailing list