compiler/nir: Add support for variable initialization from a pointer
authorArcady Goldmints-Orlov <agoldmints@igalia.com>
Tue, 10 Dec 2019 20:37:53 +0000 (15:37 -0500)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 12 Feb 2020 15:41:49 +0000 (15:41 +0000)
commit7acc81056f7ac6a869ef6403573b2572c77dbecf
treec7035d0b3318f330d19a08b2c834043dd27e6e1c
parent461c40e0fd5d67dc8155ae4f6c53ddd9acd995b1
compiler/nir: Add support for variable initialization from a pointer

Add a pointer_initializer field to nir_variable analogous to
constant_initializer, which can be used to initialize the nir_variable
to a pointer to another nir_variable. Just like the
constant_initializer, the pointer_initializer gets eliminated in the
nir_lower_constant_initializers pass.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3047>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_constant_initializers.c
src/compiler/nir/nir_lower_io_to_temporaries.c
src/compiler/nir/nir_lower_locals_to_regs.c
src/compiler/nir/nir_lower_vars_to_ssa.c
src/compiler/nir/nir_print.c
src/compiler/nir/nir_serialize.c
src/compiler/nir/nir_split_per_member_structs.c