Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Jason Ekstrand
Latest version is Reviewed-by: Jason Ekstrand On Mon, Oct 15, 2018 at 2:41 PM Jason Ekstrand wrote: > Cool, thanks! > > On Mon, Oct 15, 2018 at 2:38 PM Caio Marcelo de Oliveira Filho < > caio.olive...@intel.com> wrote: > >> > > > > +{ >> > > > > + bool progress = false; >> > > > > + >> > >

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Jason Ekstrand
Cool, thanks! On Mon, Oct 15, 2018 at 2:38 PM Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > > > > > +{ > > > > > + bool progress = false; > > > > > + > > > > > + /* Find writes that are unused and can be removed. */ > > > > > +

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Caio Marcelo de Oliveira Filho
> > > > +{ > > > > + bool progress = false; > > > > + > > > > + /* Find writes that are unused and can be removed. */ > > > > + util_dynarray_foreach_reverse(unused_writes, struct write_entry, > > > > entry) { > > > > + nir_deref_compare_result comp = nir_compare_derefs(dst, > >

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Jason Ekstrand
On Mon, Oct 15, 2018 at 12:37 PM Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > Hi, > > > > +{ > > > + bool progress = false; > > > + > > > + /* Find writes that are unused and can be removed. */ > > > + util_dynarray_foreach_reverse(unused_writes, struct write_entry, >

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-15 Thread Caio Marcelo de Oliveira Filho
Hi, > > +{ > > + bool progress = false; > > + > > + /* Find writes that are unused and can be removed. */ > > + util_dynarray_foreach_reverse(unused_writes, struct write_entry, > > entry) { > > + nir_deref_compare_result comp = nir_compare_derefs(dst, entry->dst); > > + if (comp &

Re: [Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-10-10 Thread Jason Ekstrand
On Sat, Sep 15, 2018 at 12:46 AM Caio Marcelo de Oliveira Filho < caio.olive...@intel.com> wrote: > Instead of doing this as part of the existing copy_prop_vars pass. > > Separation makes easier to expand the scope of both passes to be more > than per-block. For copy propagation, the information

[Mesa-dev] [PATCH 05/11] nir: Separate dead write removal into its own pass

2018-09-14 Thread Caio Marcelo de Oliveira Filho
Instead of doing this as part of the existing copy_prop_vars pass. Separation makes easier to expand the scope of both passes to be more than per-block. For copy propagation, the information about valid copies comes from previous instructions; while the dead write removal depends on information