brw: Do cmod prop again after post-RA scheduling

shader-db:

All Intel platforms had similar results. (Meteor Lake shown)
total instructions in shared programs: 19968728 -> 19963825 (-0.02%)
instructions in affected programs: 788014 -> 783111 (-0.62%)
helped: 2503 / HURT: 0

total cycles in shared programs: 884112912 -> 884093268 (<.01%)
cycles in affected programs: 20017168 -> 19997524 (-0.10%)
helped: 1830 / HURT: 52

LOST:   0
GAINED: 6

fossil-db:

All Intel platforms had similar results. (Meteor Lake shown)
Totals:
Instrs: 980768016 -> 980172179 (-0.06%)
Cycle count: 91762351767 -> 91757280093 (-0.01%); split: -0.01%, +0.00%
Max dispatch width: 37602592 -> 37608768 (+0.02%)

Totals from 157150 (6.98% of 2251329) affected shaders:
Instrs: 107323207 -> 106727370 (-0.56%)
Cycle count: 12696754006 -> 12691682332 (-0.04%); split: -0.04%, +0.00%
Max dispatch width: 3708584 -> 3714760 (+0.17%)

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
This commit is contained in:
Ian Romanick 2025-02-25 17:33:55 -08:00
parent 08d71730ca
commit 09450faf6a

View file

@ -1321,6 +1321,14 @@ brw_allocate_registers(brw_shader &s, bool allow_spilling)
*/ */
OPT_V(brw_lower_vgrfs_to_fixed_grfs); OPT_V(brw_lower_vgrfs_to_fixed_grfs);
/* brw_opt_dead_code_eliminate cannot be run after
* brw_lower_vgrfs_to_fixed_grfs as it depends on VGRFs. cmod propagation
* mostly cleans up after itself. The only thing DCE could do would be to
* eliminate writes to registers that are unread. Since register allocation
* and final scheduling has already happend, this won't help.
*/
OPT(brw_opt_cmod_propagation);
if (s.devinfo->ver >= 30) if (s.devinfo->ver >= 30)
OPT(brw_lower_send_gather); OPT(brw_lower_send_gather);