Re: [Mesa-dev] [PATCH] nir: remove simple dead if detection from nir_opt_dead_cf()

2019-02-15 Thread Connor Abbott
Reviewed-by: Connor Abbott I agree that if we ever need to bring this back, we should just check for both branches empty and no phis afterwards. On Thu, Feb 14, 2019 at 2:38 AM Timothy Arceri wrote: > This was probably useful when it was first written, however it > looks to be no longer necess

Re: [Mesa-dev] [PATCH] nir: remove simple dead if detection from nir_opt_dead_cf()

2019-02-15 Thread Ilia Mirkin
On Fri, Feb 15, 2019 at 3:55 AM Timothy Arceri wrote: > > On 15/2/19 4:12 pm, Jason Ekstrand wrote: > > I think the primary issue we had with dead ifs before is that we were > > running dce and dead_cf but maybe not peephole_select because it didn't > > seem applicable. In principle, I think I li

Re: [Mesa-dev] [PATCH] nir: remove simple dead if detection from nir_opt_dead_cf()

2019-02-15 Thread Jason Ekstrand
I think the primary issue we had with dead ifs before is that we were running dce and dead_cf but maybe not peephole_select because it didn't seem applicable. In principle, I think I like dead_cf being able to handle if statements as well because it seems like a thing it should do. However, it's

Re: [Mesa-dev] [PATCH] nir: remove simple dead if detection from nir_opt_dead_cf()

2019-02-15 Thread Timothy Arceri
On 15/2/19 4:12 pm, Jason Ekstrand wrote: I think the primary issue we had with dead ifs before is that we were running dce and dead_cf but maybe not peephole_select because it didn't seem applicable.  In principle, I think I like dead_cf being able to handle if statements as well because it se

Re: [Mesa-dev] [PATCH] nir: remove simple dead if detection from nir_opt_dead_cf()

2019-02-14 Thread Dieter Nützel
Tested-by: Dieter Nützel running together with [Mesa-dev] [PATCH 00/26] RadeonSI: Primitive culling with async compute - V2 https://lists.freedesktop.org/archives/mesa-dev/2019-February/215240.html Dieter Am 14.02.2019 02:37, schrieb Timothy Arceri: This was probably useful when it was firs

[Mesa-dev] [PATCH] nir: remove simple dead if detection from nir_opt_dead_cf()

2019-02-13 Thread Timothy Arceri
This was probably useful when it was first written, however it looks to be no longer necessary. As far as I can tell these days dce is smart enough to remove useless instructions from if branches. Once this is done nir_opt_peephole_select() will end up removing the empty if. Removing this support