nir/gather_info: implement partial masking of struct and compact I/O
fossil-db (Sienna):
Totals from 138 (0.10% of 138791) affected shaders:
CodeSize: 504060 -> 482136 (-4.35%)
Instrs: 97318 -> 94518 (-2.88%)
Cycles: 389272 -> 378072 (-2.88%)
VMEM: 14397 -> 14614 (+1.51%); split: +1.76%, -0.25%
SMEM: 9088 -> 9024 (-0.70%)
VClause: 2915 -> 2430 (-16.64%)
SClause: 1790 -> 1791 (+0.06%)
PreVGPRs: 5013 -> 4998 (-0.30%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8364>