OSDN Git Service

nir: Rename lower_variables to lower_vars_to_ssa
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 14 Jan 2015 20:41:15 +0000 (12:41 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:20:24 +0000 (07:20 -0800)
The original name wasn't particularly descriptive.  This one indicates that
it actually gives you SSA values as opposed to the old pass which lowered
variables to registers.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/Makefile.sources
src/glsl/nir/nir.h
src/glsl/nir/nir_lower_vars_to_ssa.c [moved from src/glsl/nir/nir_lower_variables.c with 99% similarity]
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

index a61f234..4c9aa77 100644 (file)
@@ -31,7 +31,7 @@ NIR_FILES = \
        $(GLSL_SRCDIR)/nir/nir_lower_samplers.cpp \
        $(GLSL_SRCDIR)/nir/nir_lower_system_values.c \
        $(GLSL_SRCDIR)/nir/nir_lower_to_source_mods.c \
-       $(GLSL_SRCDIR)/nir/nir_lower_variables.c \
+       $(GLSL_SRCDIR)/nir/nir_lower_vars_to_ssa.c \
        $(GLSL_SRCDIR)/nir/nir_lower_vec_to_movs.c \
        $(GLSL_SRCDIR)/nir/nir_metadata.c \
        $(GLSL_SRCDIR)/nir/nir_opcodes.c \
index e797ce2..12cac72 100644 (file)
@@ -1467,7 +1467,7 @@ void nir_lower_locals_to_regs(nir_shader *shader);
 
 void nir_lower_io(nir_shader *shader);
 
-void nir_lower_variables(nir_shader *shader);
+void nir_lower_vars_to_ssa(nir_shader *shader);
 
 void nir_remove_dead_variables(nir_shader *shader);
 
similarity index 99%
rename from src/glsl/nir/nir_lower_variables.c
rename to src/glsl/nir/nir_lower_vars_to_ssa.c
index 4844b7c..2b40ede 100644 (file)
@@ -1131,7 +1131,7 @@ insert_phi_nodes(struct lower_variables_state *state)
  *     with SSA definitions and SSA uses.
  */
 static bool
-nir_lower_variables_impl(nir_function_impl *impl)
+nir_lower_vars_to_ssa_impl(nir_function_impl *impl)
 {
    struct lower_variables_state state;
 
@@ -1206,10 +1206,10 @@ nir_lower_variables_impl(nir_function_impl *impl)
 }
 
 void
-nir_lower_variables(nir_shader *shader)
+nir_lower_vars_to_ssa(nir_shader *shader)
 {
    nir_foreach_overload(shader, overload) {
       if (overload->impl)
-         nir_lower_variables_impl(overload->impl);
+         nir_lower_vars_to_ssa_impl(overload->impl);
    }
 }
index 4c91a6e..218cd5c 100644 (file)
@@ -43,7 +43,7 @@ fs_visitor::emit_nir_code()
    bool progress;
    do {
       progress = false;
-      nir_lower_variables(nir);
+      nir_lower_vars_to_ssa(nir);
       nir_validate_shader(nir);
       progress |= nir_copy_prop(nir);
       nir_validate_shader(nir);