diff options
author | Jason Ekstrand <[email protected]> | 2016-02-13 17:08:57 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-03-24 15:20:44 -0700 |
commit | 79dec93ead6e3b95b1240a9d843d617a88ee9179 (patch) | |
tree | aac952fb882917da62644f5028826e8cf0ee3dca /src/compiler/nir/nir.h | |
parent | 8d61d7252433a0470b441c70085391d3dd4c04bb (diff) |
nir: Add return lowering pass
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.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 51d2e79f570..78bbdc0b78c 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -2146,6 +2146,9 @@ int nir_gs_count_vertices(const nir_shader *shader); bool nir_split_var_copies(nir_shader *shader); +bool nir_lower_returns_impl(nir_function_impl *impl); +bool nir_lower_returns(nir_shader *shader); + void nir_lower_var_copy_instr(nir_intrinsic_instr *copy, void *mem_ctx); void nir_lower_var_copies(nir_shader *shader); |