nir: Rename convert_to_ssa lower_regs_to_ssa

This matches the naming of nir_lower_vars_to_ssa, the other to-SSA pass.
This commit is contained in:
Jason Ekstrand 2016-12-13 18:19:42 -08:00
parent 194537ebe4
commit fb181196de
9 changed files with 12 additions and 13 deletions

View File

@ -219,6 +219,7 @@ NIR_FILES = \
nir/nir_lower_io_types.c \ nir/nir_lower_io_types.c \
nir/nir_lower_passthrough_edgeflags.c \ nir/nir_lower_passthrough_edgeflags.c \
nir/nir_lower_phis_to_scalar.c \ nir/nir_lower_phis_to_scalar.c \
nir/nir_lower_regs_to_ssa.c \
nir/nir_lower_returns.c \ nir/nir_lower_returns.c \
nir/nir_lower_samplers.c \ nir/nir_lower_samplers.c \
nir/nir_lower_system_values.c \ nir/nir_lower_system_values.c \
@ -258,7 +259,6 @@ NIR_FILES = \
nir/nir_search_helpers.h \ nir/nir_search_helpers.h \
nir/nir_split_var_copies.c \ nir/nir_split_var_copies.c \
nir/nir_sweep.c \ nir/nir_sweep.c \
nir/nir_to_ssa.c \
nir/nir_to_lcssa.c \ nir/nir_to_lcssa.c \
nir/nir_validate.c \ nir/nir_validate.c \
nir/nir_vla.h \ nir/nir_vla.h \

View File

@ -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); bool nir_is_per_vertex_io(nir_variable *var, gl_shader_stage stage);
void nir_lower_io_types(nir_shader *shader); 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); void nir_lower_vars_to_ssa(nir_shader *shader);
bool nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes); 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); 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_impl(nir_function_impl *impl);
bool nir_repair_ssa(nir_shader *shader); bool nir_repair_ssa(nir_shader *shader);

View File

@ -511,7 +511,7 @@ destroy_rewrite_state(rewrite_state *state)
} }
void 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); nir_metadata_require(impl, nir_metadata_dominance);
@ -531,10 +531,10 @@ nir_convert_to_ssa_impl(nir_function_impl *impl)
} }
void void
nir_convert_to_ssa(nir_shader *shader) nir_lower_regs_to_ssa(nir_shader *shader)
{ {
nir_foreach_function(function, shader) { nir_foreach_function(function, shader) {
if (function->impl) if (function->impl)
nir_convert_to_ssa_impl(function->impl); nir_lower_regs_to_ssa_impl(function->impl);
} }
} }

View File

@ -247,7 +247,7 @@ nir_opt_if(nir_shader *shader)
* need to convert registers back into SSA defs and clean up SSA defs * need to convert registers back into SSA defs and clean up SSA defs
* that don't dominate their uses. * that don't dominate their uses.
*/ */
nir_convert_to_ssa_impl(function->impl); nir_lower_regs_to_ssa_impl(function->impl);
progress = true; progress = true;
} }
} }

View File

@ -556,7 +556,7 @@ nir_opt_loop_unroll_impl(nir_function_impl *impl,
} }
if (progress) if (progress)
nir_convert_to_ssa_impl(impl); nir_lower_regs_to_ssa_impl(impl);
return progress; return progress;
} }

View File

@ -128,7 +128,7 @@ nir_opt_trivial_continues(nir_shader *shader)
nir_metadata_preserve(function->impl, nir_metadata_none); nir_metadata_preserve(function->impl, nir_metadata_none);
/* If that made progress, we're no longer really in SSA form. */ /* 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; progress = true;
} }
} }

View File

@ -142,7 +142,7 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s,
} }
OPT_V(s, nir_opt_global_to_local); OPT_V(s, nir_opt_global_to_local);
OPT_V(s, nir_convert_to_ssa); OPT_V(s, nir_lower_regs_to_ssa);
if (key) { if (key) {
if (s->stage == MESA_SHADER_VERTEX) { if (s->stage == MESA_SHADER_VERTEX) {

View File

@ -2409,7 +2409,7 @@ vc4_shader_state_create(struct pipe_context *pctx,
} }
NIR_PASS_V(s, nir_opt_global_to_local); NIR_PASS_V(s, nir_opt_global_to_local);
NIR_PASS_V(s, nir_convert_to_ssa); NIR_PASS_V(s, nir_lower_regs_to_ssa);
NIR_PASS_V(s, nir_normalize_cubemap_coords); NIR_PASS_V(s, nir_normalize_cubemap_coords);
NIR_PASS_V(s, nir_lower_load_const_to_scalar); NIR_PASS_V(s, nir_lower_load_const_to_scalar);

View File

@ -84,7 +84,7 @@ brw_create_nir(struct brw_context *brw,
nir_shader_get_entrypoint(nir), true, false); nir_shader_get_entrypoint(nir), true, false);
} else { } else {
nir = prog_to_nir(prog, options); nir = prog_to_nir(prog, options);
NIR_PASS_V(nir, nir_convert_to_ssa); /* turn registers into SSA */ NIR_PASS_V(nir, nir_lower_regs_to_ssa); /* turn registers into SSA */
} }
nir_validate_shader(nir); nir_validate_shader(nir);