nir/lower_goto_if: Clean up ralloc usage
authorJason Ekstrand <jason@jlekstrand.net>
Wed, 12 Aug 2020 20:22:06 +0000 (15:22 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 14 Aug 2020 20:35:37 +0000 (20:35 +0000)
commitf69d732fcaba332f83aac073f2376ded0d3d5c74
tree5283d18d023186f8b41d1df8cf122c8ad1362cc3
parent202b4df4aee790bb5b9486deb7c014ed440f27ff
nir/lower_goto_if: Clean up ralloc usage

It's really hard to track in this pass which sets are getting ralloc'd
off which other sets.  To avoid leaks, just pass a mem_ctx around
everywhere and ralloc almost everything off the one context.  We do keep
using recursion a few places where it's crystal clear what the parent
relationship is.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2401>
src/compiler/nir/nir_lower_goto_ifs.c