[Mesa-dev] [PATCH 1/3] nir: remove leftover return value when lowering to SSA

Jason Ekstrand jason at jlekstrand.net
Wed Apr 11 05:08:04 UTC 2018


On Tue, Apr 10, 2018 at 12:52 PM, Caio Marcelo de Oliveira Filho <
caio.oliveira at intel.com> wrote:

> The return value was needed to make use of the old nir_foreach_block
> helper, but not needed anymore with the macro version.
>

Nice bit of archaeology there. :-)


> ---
>  src/compiler/nir/nir_lower_vars_to_ssa.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/compiler/nir/nir_lower_vars_to_ssa.c
> b/src/compiler/nir/nir_lower_vars_to_ssa.c
> index 0cc65143e7..fe30c69756 100644
> --- a/src/compiler/nir/nir_lower_vars_to_ssa.c
> +++ b/src/compiler/nir/nir_lower_vars_to_ssa.c
> @@ -407,7 +407,7 @@ register_copy_instr(nir_intrinsic_instr *copy_instr,
>  }
>
>  /* Registers all variable uses in the given block. */
> -static bool
> +static void
>  register_variable_uses_block(nir_block *block,
>                               struct lower_variables_state *state)
>  {
> @@ -434,8 +434,6 @@ register_variable_uses_block(nir_block *block,
>           continue;
>        }
>     }
> -
> -   return true;
>

We can probably go even further and either inline this function or else
(and I think I would prefer this one) move the nir_foreach_block into it
and drop the _block suffix from the name.  In any case, this is better

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>


>  }
>
>  /* Walks over all of the copy instructions to or from the given deref_node
> --
> 2.17.0
>
> _______________________________________________
> 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/20180410/3f46e1e9/attachment-0001.html>


More information about the mesa-dev mailing list