If an instruction's destination is unused, then we shouldn't penalize
it. For example, this helps us schedule atomic operations whose results
aren't read. This works around RA failures when CSE is enabled in some
robustness2 tests.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9842>
live_effect(struct ir3_instruction *instr)
{
struct ir3_sched_node *n = instr->data;
- int new_live = n->partially_live ? 0 : dest_regs(instr);
+ int new_live = (n->partially_live || !instr->uses || instr->uses->entries == 0) ? 0 : dest_regs(instr);
int freed_live = 0;
/* if we schedule something that causes a vecN to be live,