nir: Use a tagged pointer for nir_src parents
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 14 Aug 2023 14:38:03 +0000 (10:38 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 10 Oct 2023 08:58:05 +0000 (04:58 -0400)
commit335cf5f22f2a662a3869efae87745f1a533917fa
tree22dbe3afe37eff9a4140883123a9037ca3964698
parent316af8c965142c3879f90ed85b6fd92aefa8b322
nir: Use a tagged pointer for nir_src parents

This allows us to pack the is_if boolean into the bottom bit of the parent
pointer, eliminating the boolean and hence shrinking the nir_src by 8 bytes (due
to the extra 63 bits of padding incurred in the old layout).

Because all access is forced through helpers now, this is a local change.

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.h