[Mesa-dev] [PATCH 1/7] nir/phi_builder: Internal users should use nir_phi_builder_value_set_block_def too
Jason Ekstrand
jason at jlekstrand.net
Wed Nov 21 18:40:35 UTC 2018
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Tue, Nov 20, 2018 at 6:40 PM Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/compiler/nir/nir_phi_builder.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/nir/nir_phi_builder.c
> b/src/compiler/nir/nir_phi_builder.c
> index cc5ce81d120..add3efd2dfc 100644
> --- a/src/compiler/nir/nir_phi_builder.c
> +++ b/src/compiler/nir/nir_phi_builder.c
> @@ -147,7 +147,7 @@ nir_phi_builder_add_value(struct nir_phi_builder *pb,
> unsigned num_components,
> * value to the magic value NEEDS_PHI. Later, we create phi
> nodes
> * on demand in nir_phi_builder_value_get_block_def().
> */
> - val->defs[next->index] = NEEDS_PHI;
> + nir_phi_builder_value_set_block_def(val, next, NEEDS_PHI);
>
> if (pb->work[next->index] < pb->iter_count) {
> pb->work[next->index] = pb->iter_count;
> @@ -232,7 +232,7 @@ nir_phi_builder_value_get_block_def(struct
> nir_phi_builder_value *val,
> * 2) To avoid unneeded recreation of phi nodes and undefs.
> */
> for (dom = block; dom && val->defs[dom->index] == NULL; dom =
> dom->imm_dom)
> - val->defs[dom->index] = def;
> + nir_phi_builder_value_set_block_def(val, dom, def);
>
> return def;
> }
> --
> 2.14.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181121/66d7b5c2/attachment.html>
More information about the mesa-dev
mailing list