ir3/ra: Fix available bitset for live-through collect srcs
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 23 Jul 2021 09:56:14 +0000 (11:56 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 20 Aug 2021 10:37:36 +0000 (10:37 +0000)
commit70c22d38945223fbdef699c8af60f8be95b178c8
tree535538ae9e74f0a7ffd2e88007df08a75835f43e
parenteae36b4850b6642062d43a4b910c6fe34a4ba81d
ir3/ra: Fix available bitset for live-through collect srcs

When we mark live-through sources that are merged with the destination
as killed, we kept the bitsets in sync, but we forgot to keep them in
sync when unmarking them after allocating the destination. The result
was that "available" wasn't correct for any instruction afterwards. This
resulted in a bad register allocation with IR3_SHADER_DEBUG=spillall for
a dEQP-VK test.

While we're changing this, use ra_foreach_src().

Fixes: 0ffcb19b9d9 ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033>
src/freedreno/ir3/ir3_ra.c