agx: Add try_coalesce_with helper
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 2 Jul 2023 13:33:53 +0000 (09:33 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 20 Jul 2023 15:33:28 +0000 (15:33 +0000)
commit6cc8d7b52a68c665dc7d6450740cc55c6766748a
tree9a36af9abc21246c276e196ea7f601587e5fd05d
parent42fbbd2a73f8444ec14546b7e75bf2e239167a92
agx: Add try_coalesce_with helper

Common logic the next few patches will use to try to assign something to the
same register as something else. "If it's already been assigned a register and
that register is free now, use it, otherwise bail."

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