[Mesa-dev] [PATCH v2 11/12] nir: Add return lowering pass

2015-12-27 Thread Jason Ekstrand
This commit adds a NIR pass for lowering away returns in functions. If the return is in a loop, it is lowered to a break. If it is not in a loop, it's lowered away by moving/deleting code as needed. --- src/glsl/Makefile.sources| 1 + src/glsl/nir/nir.h | 3 + src/glsl/

[Mesa-dev] [PATCH 10.5/12] nir: Add a cursor helper for getting a cursor after any phi nodes

2015-12-27 Thread Jason Ekstrand
--- src/glsl/nir/nir.h | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index b6c8ffe..af95cc4 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1778,6 +1778,22 @@ nir_after_cf_node(nir_cf_node *node) } static inline nir_c

Re: [Mesa-dev] [RFC 12/12] nir: Add a pass to inline functions

2015-12-27 Thread Connor Abbott
On Sun, Dec 27, 2015 at 4:35 PM, Jason Ekstrand wrote: > On Sun, Dec 27, 2015 at 10:15 AM, Connor Abbott wrote: >> >> On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand >> wrote: >> > This commit adds a new NIR pass that lowers all function calls away by >> > inlining the functions. >> > --- >> > >

Re: [Mesa-dev] [RFC 12/12] nir: Add a pass to inline functions

2015-12-27 Thread Jason Ekstrand
On Sun, Dec 27, 2015 at 10:15 AM, Connor Abbott wrote: > On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand > wrote: > > This commit adds a new NIR pass that lowers all function calls away by > > inlining the functions. > > --- > > > > There are still two things missing here: > > > > 1) We really

Re: [Mesa-dev] [RFC 12/12] nir: Add a pass to inline functions

2015-12-27 Thread Connor Abbott
On Sat, Dec 26, 2015 at 2:09 PM, Jason Ekstrand wrote: > This commit adds a new NIR pass that lowers all function calls away by > inlining the functions. > --- > > There are still two things missing here: > > 1) We really shouldn't do the inline recursively. We should keep a > hash-table of