diff options
author | Thomas Helland <[email protected]> | 2016-12-15 23:36:54 +0100 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-12-16 12:02:28 -0800 |
commit | a66818830ae544dd8b270fb8e8f148930736a35d (patch) | |
tree | 4887ed8c4b75e1b04c1fd9606593ab1578bfda0b | |
parent | 79b66ec05e2745e5d19838dcfd83f905afa82b6c (diff) |
nir: Remove nir_array from lower_locals_to_regs
We do nothing but initialize it, add to it, and delete it.
This is a fallout from removing constant initializer support.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/compiler/nir/nir_lower_locals_to_regs.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/compiler/nir/nir_lower_locals_to_regs.c b/src/compiler/nir/nir_lower_locals_to_regs.c index 25a62b3624a..f1af237b5e7 100644 --- a/src/compiler/nir/nir_lower_locals_to_regs.c +++ b/src/compiler/nir/nir_lower_locals_to_regs.c @@ -35,12 +35,6 @@ struct locals_to_regs_state { /* A hash table mapping derefs to registers */ struct hash_table *regs_table; - /* A growing array of derefs that we have encountered. There is exactly - * one element of this array per element in the hash table. This is - * used to make adding register initialization code deterministic. - */ - nir_array derefs_array; - bool progress; }; @@ -124,7 +118,6 @@ get_reg_for_deref(nir_deref_var *deref, struct locals_to_regs_state *state) reg->bit_size = glsl_get_bit_size(tail->type); _mesa_hash_table_insert_pre_hashed(state->regs_table, hash, deref, reg); - nir_array_add(&state->derefs_array, nir_deref_var *, deref); return reg; } @@ -280,7 +273,6 @@ nir_lower_locals_to_regs_impl(nir_function_impl *impl) state.impl = impl; state.progress = false; state.regs_table = _mesa_hash_table_create(NULL, hash_deref, derefs_equal); - nir_array_init(&state.derefs_array, NULL); nir_metadata_require(impl, nir_metadata_dominance); @@ -291,7 +283,6 @@ nir_lower_locals_to_regs_impl(nir_function_impl *impl) nir_metadata_preserve(impl, nir_metadata_block_index | nir_metadata_dominance); - nir_array_fini(&state.derefs_array); _mesa_hash_table_destroy(state.regs_table, NULL); return state.progress; |