WIP: nir: Move deref_instr::cast::align* to nir_deref_instr

Open Faith Ekstrand requested to merge gfxstrand/mesa:review/nir-16b-align into main

Coming in from LLVM and OpenCL C, we get piles of casts that exist entirely for the purpose of adding an alignment right before we do a load or store. These casts don't really do anything for us and just make it harder to see through the deref chain. In order to get rid of them, we need the alignment information to be on every deref and not just casts. This MR moves the alignment information and then adds an optimization which removes such casts by creating a copy of the parent deref and putting the alignment information there.

Merge request reports