nir: Use set_parent_instr internally
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 14 Aug 2023 14:35:43 +0000 (10:35 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 10 Oct 2023 08:58:04 +0000 (04:58 -0400)
This properly clears is_if.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24671>

src/compiler/nir/nir_serialize.c

index 5d783ec3c55b646bea89c7790b47ba1732ce81da..5f6cec0b119be76d233e1624f06857bfa48ef7e0 100644 (file)
@@ -1518,7 +1518,7 @@ read_phi(read_ctx *ctx, nir_block *blk, union packed_instr header)
        * we have to set the parent_instr manually.  It doesn't really matter
        * when we do it, so we might as well do it here.
        */
-      src->src.parent_instr = &phi->instr;
+      nir_src_set_parent_instr(&src->src, &phi->instr);
 
       /* Stash it in the list of phi sources.  We'll walk this list and fix up
        * sources at the very end of read_function_impl.