<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 21, 2019 at 5:33 AM Thomas Helland <<a href="mailto:thomashelland90@gmail.com">thomashelland90@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This patch is:<br>
<br>
Reviewed-by: Thomas Helland<<a href="mailto:thomashelland90@gmail.com" target="_blank">thomashelland90@gmail.com</a>><br>
<br>
Den ons. 20. feb. 2019 kl. 04:04 skrev Timothy Arceri <<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>>:<br>
><br>
> This reduces the time spent in nir_opt_cse() by almost a half.<br>
> ---<br>
>  src/compiler/nir/nir_opt_cse.c | 6 +++---<br>
>  1 file changed, 3 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/src/compiler/nir/nir_opt_cse.c b/src/compiler/nir/nir_opt_cse.c<br>
> index bf42a6a33dc..3c3617d852a 100644<br>
> --- a/src/compiler/nir/nir_opt_cse.c<br>
> +++ b/src/compiler/nir/nir_opt_cse.c<br>
> @@ -39,9 +39,10 @@<br>
>   */<br>
><br>
>  static bool<br>
> -cse_block(nir_block *block, struct set *instr_set)<br>
> +cse_block(nir_block *block, struct set *dominance_set)<br>
>  {<br>
>     bool progress = false;<br>
> +   struct set *instr_set = _mesa_set_clone(dominance_set, NULL);<br>
><br>
>     nir_foreach_instr_safe(instr, block) {<br>
>        if (nir_instr_set_add_or_rewrite(instr_set, instr)) {<br>
> @@ -55,8 +56,7 @@ cse_block(nir_block *block, struct set *instr_set)<br>
>        progress |= cse_block(child, instr_set);<br>
>     }<br>
><br>
> -   nir_foreach_instr(instr, block)<br>
> -     nir_instr_set_remove(instr_set, instr);<br>
> +   _mesa_set_destroy(instr_set, NULL);<br>
><br>
>     return progress;<br>
>  }<br>
> --<br>
> 2.20.1<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>