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

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 06:18:16 PDT 2019


critson created this revision.
critson added reviewers: arsenm, nhaehnle.
Herald added subscribers: llvm-commits, t-tye, tpr, dstuttard, yaxunl, mgorny, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

Implement a pass, enabled by -amdgpu-scratch-bounds-checking,
which adds bounds checks to scratch accesses.
When this pass is enabled, out-of-bounds writes have no effect
and out-of-bounds reads return zero.
This is useful for GFX9 where hardware no longer performs
bounds checking on scratch accesses and hence page faults
result for out-of-bounds accesses by generated by shaders.

Change-Id: Id2ee4b1f32e70b6bde2541db755727b6a407721b


Repository:
  rL LLVM

https://reviews.llvm.org/D60772

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  lib/Target/AMDGPU/CMakeLists.txt
  lib/Target/AMDGPU/SIInsertScratchBounds.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60772.195360.patch
Type: text/x-patch
Size: 14881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190416/1affc8a7/attachment.bin>


More information about the llvm-commits mailing list