summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-12-13 18:19:42 -0800
committerJason Ekstrand <[email protected]>2016-12-29 16:02:44 -0800
commitfb181196deac2e3a070c49a29803e53cc7cc7f9b (patch)
treeec2947cae8239ab8b0280f577417a8067e81c913 /src/compiler/nir
parent194537ebe44cfcd6d72a98d0c2118f10a9e58deb (diff)
nir: Rename convert_to_ssa lower_regs_to_ssa
This matches the naming of nir_lower_vars_to_ssa, the other to-SSA pass.
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir.h5
-rw-r--r--src/compiler/nir/nir_lower_regs_to_ssa.c (renamed from src/compiler/nir/nir_to_ssa.c)6
-rw-r--r--src/compiler/nir/nir_opt_if.c2
-rw-r--r--src/compiler/nir/nir_opt_loop_unroll.c2
-rw-r--r--src/compiler/nir/nir_opt_trivial_continues.c2
5 files changed, 8 insertions, 9 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 6557631cc10..c97eff5fbbc 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2342,6 +2342,8 @@ nir_src *nir_get_io_vertex_index_src(nir_intrinsic_instr *instr);
bool nir_is_per_vertex_io(nir_variable *var, gl_shader_stage stage);
void nir_lower_io_types(nir_shader *shader);
+void nir_lower_regs_to_ssa_impl(nir_function_impl *impl);
+void nir_lower_regs_to_ssa(nir_shader *shader);
void nir_lower_vars_to_ssa(nir_shader *shader);
bool nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes);
@@ -2520,9 +2522,6 @@ void nir_loop_analyze_impl(nir_function_impl *impl,
bool nir_ssa_defs_interfere(nir_ssa_def *a, nir_ssa_def *b);
-void nir_convert_to_ssa_impl(nir_function_impl *impl);
-void nir_convert_to_ssa(nir_shader *shader);
-
bool nir_repair_ssa_impl(nir_function_impl *impl);
bool nir_repair_ssa(nir_shader *shader);
diff --git a/src/compiler/nir/nir_to_ssa.c b/src/compiler/nir/nir_lower_regs_to_ssa.c
index e0998d4bb01..ca073260112 100644
--- a/src/compiler/nir/nir_to_ssa.c
+++ b/src/compiler/nir/nir_lower_regs_to_ssa.c
@@ -511,7 +511,7 @@ destroy_rewrite_state(rewrite_state *state)
}
void
-nir_convert_to_ssa_impl(nir_function_impl *impl)
+nir_lower_regs_to_ssa_impl(nir_function_impl *impl)
{
nir_metadata_require(impl, nir_metadata_dominance);
@@ -531,10 +531,10 @@ nir_convert_to_ssa_impl(nir_function_impl *impl)
}
void
-nir_convert_to_ssa(nir_shader *shader)
+nir_lower_regs_to_ssa(nir_shader *shader)
{
nir_foreach_function(function, shader) {
if (function->impl)
- nir_convert_to_ssa_impl(function->impl);
+ nir_lower_regs_to_ssa_impl(function->impl);
}
}
diff --git a/src/compiler/nir/nir_opt_if.c b/src/compiler/nir/nir_opt_if.c
index ec66175027a..68dacea7707 100644
--- a/src/compiler/nir/nir_opt_if.c
+++ b/src/compiler/nir/nir_opt_if.c
@@ -247,7 +247,7 @@ nir_opt_if(nir_shader *shader)
* need to convert registers back into SSA defs and clean up SSA defs
* that don't dominate their uses.
*/
- nir_convert_to_ssa_impl(function->impl);
+ nir_lower_regs_to_ssa_impl(function->impl);
progress = true;
}
}
diff --git a/src/compiler/nir/nir_opt_loop_unroll.c b/src/compiler/nir/nir_opt_loop_unroll.c
index d8557f6ecd2..2c19980c742 100644
--- a/src/compiler/nir/nir_opt_loop_unroll.c
+++ b/src/compiler/nir/nir_opt_loop_unroll.c
@@ -556,7 +556,7 @@ nir_opt_loop_unroll_impl(nir_function_impl *impl,
}
if (progress)
- nir_convert_to_ssa_impl(impl);
+ nir_lower_regs_to_ssa_impl(impl);
return progress;
}
diff --git a/src/compiler/nir/nir_opt_trivial_continues.c b/src/compiler/nir/nir_opt_trivial_continues.c
index ab1319be9ce..54d2245bccb 100644
--- a/src/compiler/nir/nir_opt_trivial_continues.c
+++ b/src/compiler/nir/nir_opt_trivial_continues.c
@@ -128,7 +128,7 @@ nir_opt_trivial_continues(nir_shader *shader)
nir_metadata_preserve(function->impl, nir_metadata_none);
/* If that made progress, we're no longer really in SSA form. */
- nir_convert_to_ssa_impl(function->impl);
+ nir_lower_regs_to_ssa_impl(function->impl);
progress = true;
}
}