From 5bd6fd5c105d38a19156bb38acc2c1779078caef Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 29 May 2025 15:44:28 -0700 Subject: [PATCH] ir3: Enable nir_opt_combine_barriers. From my fossils db: Totals from 42 (0.08% of 49975) affected shaders: Instrs: 108929 -> 108046 (-0.81%) CodeSize: 182346 -> 179498 (-1.56%) NOPs: 22106 -> 21916 (-0.86%) (ss): 5458 -> 4765 (-12.70%) (sy): 2987 -> 2294 (-23.20%) Cat0: 24293 -> 24103 (-0.78%) Cat7: 3939 -> 3246 (-17.59%) Affected fossils include Danylo's d3d traces, gfxbench, and Sascha Willems's computenbody. Part-of: --- src/freedreno/ir3/ir3_nir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 851138a8f51..355761f032c 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -635,6 +635,7 @@ ir3_finalize_nir(struct ir3_compiler *compiler, } OPT(s, nir_lower_is_helper_invocation); + OPT(s, nir_opt_combine_barriers, NULL, NULL); ir3_optimize_loop(compiler, options, s);