nir: Add a pass to lower local variable accesses to SSA values

This pass analizes all of the load/store operations and, when a variable is
never aliased (potentially used by an indirect operation), it is lowered
directly to an SSA value.  This pass translates to SSA directly and does
not require any fixup by the original to-SSA pass.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
Jason Ekstrand 2014-11-13 17:16:31 -08:00
parent 615ba5ad04
commit d477beab07
3 changed files with 1069 additions and 0 deletions

View file

@ -24,6 +24,7 @@ NIR_FILES = \
$(GLSL_SRCDIR)/nir/nir_lower_atomics.c \
$(GLSL_SRCDIR)/nir/nir_lower_samplers.cpp \
$(GLSL_SRCDIR)/nir/nir_lower_system_values.c \
$(GLSL_SRCDIR)/nir/nir_lower_variables.c \
$(GLSL_SRCDIR)/nir/nir_lower_variables_scalar.c \
$(GLSL_SRCDIR)/nir/nir_lower_vec_to_movs.c \
$(GLSL_SRCDIR)/nir/nir_metadata.c \

View file

@ -1358,6 +1358,8 @@ void nir_dump_cfg(nir_shader *shader, FILE *fp);
void nir_split_var_copies(nir_shader *shader);
void nir_lower_variables(nir_shader *shader);
void nir_lower_variables_scalar(nir_shader *shader, bool lower_globals,
bool lower_io, bool add_names,
bool native_integers);

File diff suppressed because it is too large Load diff