Re: [Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-10-02 Thread Connor Abbott
On Fri, Oct 2, 2015 at 1:26 PM, Connor Abbott wrote: > On Fri, Oct 2, 2015 at 12:56 PM, Matt Turner wrote: >> On Fri, Oct 2, 2015 at 9:28 AM, Connor Abbott wrote: >>> Some loops may have phi nodes that look like: >>> >>> foo = ... >>> loop { >>> bar = phi(foo, bar) >>> ... >>> } >>> >>>

Re: [Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-10-02 Thread Connor Abbott
On Fri, Oct 2, 2015 at 12:56 PM, Matt Turner wrote: > On Fri, Oct 2, 2015 at 9:28 AM, Connor Abbott wrote: >> Some loops may have phi nodes that look like: >> >> foo = ... >> loop { >> bar = phi(foo, bar) >> ... >> } >> >> in which case we can remove the phi node and replace all uses of '

Re: [Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-10-02 Thread Matt Turner
On Fri, Oct 2, 2015 at 9:28 AM, Connor Abbott wrote: > Some loops may have phi nodes that look like: > > foo = ... > loop { > bar = phi(foo, bar) > ... > } > > in which case we can remove the phi node and replace all uses of 'bar' > with 'foo'. In particular, there are some L4D2 vertex sha

[Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-10-02 Thread Connor Abbott
Some loops may have phi nodes that look like: foo = ... loop { bar = phi(foo, bar) ... } in which case we can remove the phi node and replace all uses of 'bar' with 'foo'. In particular, there are some L4D2 vertex shaders with loops that, after optimization, look like: /* succs:

Re: [Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-05-21 Thread Matt Turner
On Thu, May 21, 2015 at 5:07 PM, Connor Abbott wrote: > Some loops may have phi nodes that look like: > > foo = ... > loop { > bar = phi(foo, bar) > ... > } > > in which case we can remove the phi node and replace all uses of 'bar' > with 'foo'. In particular, there are some L4D2 vertex sh

Re: [Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-05-21 Thread Jason Ekstrand
This looks totally sane to me. Reviewed-by: Jason Ekstrand I'll try and get some shader-db numbers for you tomorrow. --Jason On May 21, 2015 5:07 PM, "Connor Abbott" wrote: > > Some loops may have phi nodes that look like: > > foo = ... > loop { > bar = phi(foo, bar) > ... > } > > in w

[Mesa-dev] [PATCH] nir/remove_phis: handle trivial back-edges

2015-05-21 Thread Connor Abbott
Some loops may have phi nodes that look like: foo = ... loop { bar = phi(foo, bar) ... } in which case we can remove the phi node and replace all uses of 'bar' with 'foo'. In particular, there are some L4D2 vertex shaders with loops that, after optimization, look like: /* succs: