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/
---
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
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.
>> > ---
>> >
>
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
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