anv: Use nir_opt_barrier_modes() to drop unnecessary barriers
fossil-db stats on Alchemist:
Totals:
Instrs:
196514947 ->
196513342 (-0.00%); split: -0.00%, +0.00%
Cycles:
14271450761 ->
14271426028 (-0.00%); split: -0.00%, +0.00%
Send messages: 8022316 -> 8021892 (-0.01%)
Totals from 43 (0.01% of 653252) affected shaders:
Instrs: 98558 -> 96953 (-1.63%); split: -1.63%, +0.00%
Cycles:
15867801 ->
15843068 (-0.16%); split: -0.17%, +0.02%
Send messages: 8997 -> 8573 (-4.71%)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24842>