WIP: Freedreno: extend lower_io_offsets pass for load_ubo
This series extends the ir3_nir_lower_io_offsets pass to include lowering for load_ubo intrinsics. It is part of the ongoing effort to streamline the backend compiler and take more advantage of existing NIR optimization passes.
The pass helps significantly almost all shaders that do UBO loads. Most of the gain comes from not emitting the comparison between address and base low if we know they are the same.
Some old shader-db results for the Steam collection on a5xx:
total instructions in shared programs: 6000081 -> 5935159 (-1.082%) total dwords in shared programs: 11372224 -> 11255968 (-1.022%) total full registers used in shared programs: 323157 -> 323126 (-0.010%) total half registers used in shared programs: 10332 -> 10332 (0.000%) total const registers used in shared programs: 1577292 -> 1577292 (0.000%) total constlen used in shared programs: 1574797 -> 1574797 (0.000%) total (ss) used in shared programs: 163961 -> 154606 (-5.706%) total (sy) used in shared programs: 147575 -> 136597 (-7.439%) total 'max_sun' used in shared programs: 1082332 -> 1082332 (0.000%)