ir3/cp_postsched: Fixup SSA use pointer for direct reads
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 22 Mar 2021 10:30:53 +0000 (11:30 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 3 May 2021 19:52:31 +0000 (19:52 +0000)
commitd28b22374cb01ebb22c66bb940891d4b1996bfaa
tree5f88462e412f4919ff1397af7f09d5dd5439e55d
parent40a1c4ba2d6ff13fae396b0baa569efaa426c041
ir3/cp_postsched: Fixup SSA use pointer for direct reads

There's an optimization here to sink direct (i.e. not relative) reads of
an array past unrelated direct writes. However, since each write
actually reads, modifies, and then writes again to the array, this means
that we need to read the latest updated array. The old RA used the array
id instead of the SSA information, so it didn't care, but the new RA
uses ->instr instead and ignores the array id because arrays are now SSA
so it needs to be correct.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10591>
src/freedreno/ir3/ir3_cp_postsched.c