brw: Update copy propagation into EOT sends handling for Xe2 units
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

We're counting in REG_SIZE units here, but g112-127 is twice as large on
Xe2.  Check against 15 * reg_unit() to avoid missing out on propagation.

fossil-db results on Arc B580:

   Totals:
   Instrs: 233779396 -> 233779098 (-0.00%)
   Cycle count: 32601212742 -> 32601187382 (-0.00%); split: -0.00%, +0.00%
   Max live registers: 72695253 -> 72694326 (-0.00%); split: -0.00%, +0.00%

   Totals from 232 (0.03% of 789301) affected shaders:
   Instrs: 41071 -> 40773 (-0.73%)
   Cycle count: 1756714 -> 1731354 (-1.44%); split: -2.01%, +0.57%
   Max live registers: 22092 -> 21165 (-4.20%); split: -4.48%, +0.28%

Fixes: ec2e8bc33f ("intel/compiler: Avoid copy propagating large registers into EOT messages")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36577>
This commit is contained in:
Kenneth Graunke 2025-08-05 01:36:02 -07:00 committed by Marge Bot
parent 946f768359
commit c12497f943

View file

@ -686,7 +686,7 @@ eot_send_has_constraint(brw_shader &s, brw_inst *inst, brw_reg val, int arg)
s.alloc.sizes[inst->src[other_src].nr] :
(inst->size_read(devinfo, other_src) / REG_SIZE);
unsigned prop_src_size = s.alloc.sizes[val.nr];
if (other_size + prop_src_size > 15)
if (other_size + prop_src_size > 15 * reg_unit(devinfo))
return true;
}