intel/compiler: Always run opt_algebraic after descriptor_lowering

This change ensures that `brw_opt_algebraic` is always executed after
`brw_lower_send_descriptors` in `brw_opt.cpp`. By doing so, redundant
logical operations are optimized, resulting in cleaner and more
compact assembly output.

fossil-db results on LNL:
- Totals:
  - Instructions: 215857290 -> 215857028 (-0.00%)
  - Cycle count: 32008929636 -> 32008935384 (+0.00%); split: -0.00%, +0.00%
  - Max live registers: 66940643 -> 66940557 (-0.00%)

- Affected shaders (104 out of 713963):
  - Instructions: 31090 -> 30828 (-0.84%)
  - Cycle count: 5955908 -> 5961656 (+0.10%); split: -0.16%, +0.26%
  - Max live registers: 10888 -> 10802 (-0.79%)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34615>
This commit is contained in:
Sushma Venkatesh Reddy
2025-04-18 16:47:40 +00:00
committed by Marge Bot
parent c0f56fc64c
commit 4084527876
+2 -2
View File
@@ -203,8 +203,8 @@ brw_optimize(brw_shader &s)
/* No need for standard copy_propagation since
* brw_opt_address_reg_load will only optimize defs.
*/
if (OPT(brw_opt_copy_propagation_defs))
OPT(brw_opt_algebraic);
OPT(brw_opt_copy_propagation_defs);
OPT(brw_opt_algebraic);
OPT(brw_opt_address_reg_load);
OPT(brw_opt_dead_code_eliminate);
}