nir/from_ssa: Use nir_instr_free() to free instrs instead of ralloc.
authorEmma Anholt <emma@anholt.net>
Wed, 7 Jul 2021 19:38:11 +0000 (12:38 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Sep 2021 17:53:05 +0000 (17:53 +0000)
commit7a4bbe60c126d7ede06f01212f2067aed513dbaa
tree7bc652edf15c09f244e26d0d05b3e6a2e19dab04
parentb99efb8af06539e999018826f86f413fce3222f3
nir/from_ssa: Use nir_instr_free() to free instrs instead of ralloc.

This code was being tricky with passing a mem_ctx instead of the shader,
then freeing the mem_ctx when the pass was done and all the parallel
copies had been removed from the shader.  Use the right type for instr
creation and do a bit of manual list management to prepare the way for
non-ralloc NIR instrs.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>
src/compiler/nir/nir_from_ssa.c