From 8ac975fa5eccd3c3d19d1b6053159afae3d6e753 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pavel=20Ondra=C4=8Dka?= Date: Tue, 29 Aug 2023 08:03:05 +0200 Subject: [PATCH] r300: enable nir_move_vec_src_uses_to_dest We want to do this in general, right now the stats are not that good but that will be taken care of in the next commits. RV530: total instructions in shared programs: 93561 -> 93597 (0.04%) instructions in affected programs: 39015 -> 39051 (0.09%) helped: 207 HURT: 212 total temps in shared programs: 12864 -> 13019 (1.20%) temps in affected programs: 2010 -> 2165 (7.71%) helped: 57 HURT: 181 total cycles in shared programs: 144639 -> 144506 (-0.09%) cycles in affected programs: 54524 -> 54391 (-0.24%) helped: 191 HURT: 234 RV370: total instructions in shared programs: 63692 -> 63811 (0.19%) instructions in affected programs: 16851 -> 16970 (0.71%) helped: 121 HURT: 141 total temps in shared programs: 9966 -> 10050 (0.84%) temps in affected programs: 969 -> 1053 (8.67%) helped: 33 HURT: 126 total cycles in shared programs: 101042 -> 101205 (0.16%) cycles in affected programs: 20606 -> 20769 (0.79%) helped: 121 HURT: 155 Reviewed-by: Emma Anholt Part-of: --- src/gallium/drivers/r300/compiler/nir_to_rc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/r300/compiler/nir_to_rc.c b/src/gallium/drivers/r300/compiler/nir_to_rc.c index 7a783a1..cb556a5 100644 --- a/src/gallium/drivers/r300/compiler/nir_to_rc.c +++ b/src/gallium/drivers/r300/compiler/nir_to_rc.c @@ -2451,6 +2451,7 @@ const void *nir_to_rc_options(struct nir_shader *s, nir_move_comparisons | nir_move_copies | nir_move_load_ssbo; NIR_PASS_V(s, nir_opt_move, move_all); + NIR_PASS_V(s, nir_move_vec_src_uses_to_dest); NIR_PASS_V(s, nir_convert_from_ssa, true); NIR_PASS_V(s, nir_lower_vec_to_regs, NULL, NULL); -- 2.7.4