hk: sink SSBO loads

Seems to hit instr count due to RA lottery but reduce reg pressure a LOT so,
probably worth it.

Totals from 5305 (9.88% of 53701) affected shaders:
MaxWaves: 4487168 -> 4551040 (+1.42%); split: +1.51%, -0.09%
Instrs: 6063323 -> 6178678 (+1.90%); split: -0.17%, +2.07%
CodeSize: 44356516 -> 44662024 (+0.69%); split: -0.21%, +0.90%
Spills: 7321 -> 4034 (-44.90%); split: -45.49%, +0.59%
Fills: 8522 -> 5069 (-40.52%); split: -40.87%, +0.35%
Scratch: 21940 -> 9856 (-55.08%); split: -55.17%, +0.09%
ALU: 4541440 -> 4554906 (+0.30%); split: -0.20%, +0.50%
FSCIB: 4541440 -> 4554906 (+0.30%); split: -0.20%, +0.50%
IC: 1180150 -> 1184856 (+0.40%); split: -0.01%, +0.41%
GPRs: 605023 -> 576336 (-4.74%); split: -5.00%, +0.26%
Uniforms: 1421832 -> 1425367 (+0.25%); split: -0.08%, +0.33%

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35720>
This commit is contained in:
Alyssa Rosenzweig
2025-06-24 12:09:03 -04:00
committed by Marge Bot
parent 776f07517f
commit d17dd8332e
+3
View File
@@ -846,6 +846,9 @@ hk_lower_nir(struct hk_device *dev, nir_shader *nir,
NIR_PASS(progress, nir, nir_opt_dce);
} while (progress);
NIR_PASS(progress, nir, nir_opt_sink, nir_move_load_ssbo);
NIR_PASS(progress, nir, nir_opt_move, nir_move_load_ssbo);
bool soft_fault = agx_has_soft_fault(&dev->dev);
NIR_PASS(_, nir, nir_shader_intrinsics_pass,
lower_load_global_constant_offset_instr, nir_metadata_none,