spirv,aco: set restrict by default and use SMEM if we know it's safe
This MR enables SMEM for 8/16-bit accesses and on GFX6/7 and disables it if we can't prove that it's safe. This requires that SPIR-V -> NIR sets ACCESS_RESTRICT by default so that we handle SpvDecorationAliased correctly.
Some ideas to improve this:
- use better alias analysis by using deref information, range analysis and comparing offsets
- consider control flow and ordering
- take advantage that SMEM and VMEM should be coherent if both are GLC=1
The last two require that we wait when switching between VMEM and SMEM if one operation is a store.
I'm not too certain about the SPIR-V -> NIR changes
Edited by Rhys Perry