Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Timothy Arceri
On 23/1/19 3:27 pm, Caio Marcelo de Oliveira Filho wrote: Hi, The different problem I've found was that uses in the phi instruction after the then/else blocks was being replaced, causing churn in the optimizations further on. As a hack, I've ignored phi instructions in the use loop above. HUR

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Caio Marcelo de Oliveira Filho
Hi, > > The different problem I've found was that uses in the phi instruction > > after the then/else blocks was being replaced, causing churn in the > > optimizations further on. As a hack, I've ignored phi instructions in > > the use loop above. HURTs are gone and HELPs continued. > > > > The

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Timothy Arceri
On 23/1/19 11:27 am, Caio Marcelo de Oliveira Filho wrote: Hi, Did you look at any of the HURT? The problem I was seeing was this could end up stopping copy propagation from working on some UBOs etc. They were not UBO cases like yours, but looking at them I've found a different problem. Ho

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Caio Marcelo de Oliveira Filho
Hi, > Did you look at any of the HURT? The problem I was seeing was this could end > up stopping copy propagation from working on some UBOs etc. They were not UBO cases like yours, but looking at them I've found a different problem. > However with this patch we end up with: > > load UBO at off

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Timothy Arceri
On 23/1/19 7:17 am, Caio Marcelo de Oliveira Filho wrote: Hi, I like this patch, did it get dropped for a specific reason or just forgotten? Did you look at any of the HURT? The problem I was seeing was this could end up stopping copy propagation from working on some UBOs etc. For example i

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2019-01-22 Thread Caio Marcelo de Oliveira Filho
Hi, I like this patch, did it get dropped for a specific reason or just forgotten? shader-db results skl: total instructions in shared programs: 15049273 -> 15049211 (<.01%) instructions in affected programs: 75678 -> 75616 (-0.08%) helped: 197 HURT: 8 total cycles in shared programs: 36999491

Re: [Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2018-11-22 Thread Timothy Arceri
On 23/11/18 11:49 am, Timothy Arceri wrote: shader-db results radeonsi (VEGA): Totals from affected shaders: SGPRS: 7272 -> 7488 (2.97 %) VGPRS: 4168 -> 4160 (-0.19 %) Spilled SGPRs: 328 -> 327 (-0.30 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0

[Mesa-dev] [PATCH] nir: propagate known constant values into the if-then branch

2018-11-22 Thread Timothy Arceri
shader-db results radeonsi (VEGA): Totals from affected shaders: SGPRS: 7272 -> 7488 (2.97 %) VGPRS: 4168 -> 4160 (-0.19 %) Spilled SGPRs: 328 -> 327 (-0.30 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 268212 ->