nir: Add a deref path helper struct
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 20 Mar 2018 18:11:25 +0000 (11:11 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 23 Jun 2018 03:15:54 +0000 (20:15 -0700)
commita406f7e0c9ab1ff36ae2d9fe377415bf41bace5a
tree21ab59aaf789e5ea244d673dc58c0fb22f99dcd1
parent535289a3a97b104dc128d633785fae3936e3b120
nir: Add a deref path helper struct

This commit introduces a new nir_deref.h header for helpers that are
less common and really only needed by a few heavy-duty passes.  In this
header is a new struct for representing a full deref path which can be
walked in either direction.

v2 (Jason Ekstrand):
 - Assert that deref != NULL (Caio)
 - Fill _short_path with 0xdeadbeef in debug builds when not used (Caio)
 - Make nir_deref_path a typedef (Rob)

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/Makefile.sources
src/compiler/nir/meson.build
src/compiler/nir/nir_deref.c
src/compiler/nir/nir_deref.h [new file with mode: 0644]