[Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2018-08-29 Thread Jason Ekstrand
From: Timothy Arceri Since we know what side of the branch we ended up on we can just replace the use with a constant. All the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change is clearly positive. V2: insert new constant after any phis in the

Re: [Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2018-06-18 Thread Timothy Arceri
On 19/06/18 08:40, Ian Romanick wrote: On 06/17/2018 05:15 PM, Timothy Arceri wrote: Since we know what side of the branch we ended up on we can just replace the use with a constant. All helped shaders are from Unreal Engine 4 besides one shader from Dirt Showdown. shader-db results SKL: tota

Re: [Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2018-06-18 Thread Ian Romanick
On 06/17/2018 05:15 PM, Timothy Arceri wrote: > Since we know what side of the branch we ended up on we can just > replace the use with a constant. > > All helped shaders are from Unreal Engine 4 besides one shader from > Dirt Showdown. > > shader-db results SKL: > > total instructions in shared

[Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2018-06-17 Thread Timothy Arceri
Since we know what side of the branch we ended up on we can just replace the use with a constant. All helped shaders are from Unreal Engine 4 besides one shader from Dirt Showdown. shader-db results SKL: total instructions in shared programs: 13219725 -> 13219643 (<.01%) instructions in affected

[Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2017-01-16 Thread Timothy Arceri
All helped shaders are fromm Unreal Engine 4 besides one shader from Dirt Showdown. shader-db results BDW: total instructions in shared programs: 12985186 -> 12985112 (-0.00%) instructions in affected programs: 26523 -> 26449 (-0.28%) helped: 43 HURT: 0 total cycles in shared programs: 246851202