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
I would expect this kind of handling to be done as part of selection, not a pretty late pass