agx: Try to allocate phis compatibly with sources
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 1 Jul 2023 16:56:02 +0000 (12:56 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 20 Jul 2023 15:33:28 +0000 (15:33 +0000)
commit73da872a66deef2bc0923619b8388494527ad136
tree5c5c8df70e3d009a39d3269a15c6a2e67f375062
parent6cc8d7b52a68c665dc7d6450740cc55c6766748a
agx: Try to allocate phis compatibly with sources

All shaders affected for thread count are in pubg... by chance the allocation
before used fewer registers than the calculated register demand (I guess because
we're conservative with our vector handling) and so got lucky and got higher
thread count. That shader is also helped massively for instructions.

The halfreg change doesn't matter -- we're not actually increasing register
demand, we're just being more choosy about our registers.

total instructions in shared programs: 1799738 -> 1790901 (-0.49%)
instructions in affected programs: 306081 -> 297244 (-2.89%)
helped: 889
HURT: 14
Instructions are helped.

total bytes in shared programs: 12263290 -> 12210266 (-0.43%)
bytes in affected programs: 2150966 -> 2097942 (-2.47%)
helped: 889
HURT: 14
Bytes are helped.

total halfregs in shared programs: 531981 -> 532130 (0.03%)
halfregs in affected programs: 1925 -> 2074 (7.74%)
helped: 0
HURT: 26
Halfregs are HURT.

total threads in shared programs: 18885184 -> 18884224 (<.01%)
threads in affected programs: 13440 -> 12480 (-7.14%)
helped: 0
HURT: 15

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24258>
src/asahi/compiler/agx_register_allocate.c