diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2019-03-19 14:16:41 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-30 18:21:44 +0000 |
commit | 9d9b891f940a8797492bfc04b0108d398959a8ce (patch) | |
tree | be0d531c7221deb50568add705934aaaf580cdbf /src/compiler/nir/nir_search.h | |
parent | 8f159a8576efbb7bb3755d215a54b87c4c99a0d2 (diff) | |
download | mesa-9d9b891f940a8797492bfc04b0108d398959a8ce.tar.gz |
nir: Free instructions more often
Soon we'll be allocating instructions out of a per-shader pool, which
means that if we don't free too many instructions during the main
optimization loop, the final nir_sweep() call will create holes which
can't be filled. By freeing instructions more aggressively, we can
allocate more instructions from the freelist which will reduce the final
memory usage.
Modified from Connor Abbott's original patch to rebase on top of
refactored DCE and so that the use-after-free in nir_algebraic_impl() is
fixed.
Co-authored-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12910>
Diffstat (limited to 'src/compiler/nir/nir_search.h')
-rw-r--r-- | src/compiler/nir/nir_search.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/compiler/nir/nir_search.h b/src/compiler/nir/nir_search.h index ba113f15ffb..48777b44134 100644 --- a/src/compiler/nir/nir_search.h +++ b/src/compiler/nir/nir_search.h @@ -237,14 +237,6 @@ NIR_DEFINE_CAST(nir_search_value_as_expression, nir_search_value, nir_search_expression, value, type, nir_search_value_expression) -nir_ssa_def * -nir_replace_instr(struct nir_builder *b, nir_alu_instr *instr, - struct hash_table *range_ht, - struct util_dynarray *states, - const nir_algebraic_table *table, - const nir_search_expression *search, - const nir_search_value *replace, - nir_instr_worklist *algebraic_worklist); bool nir_algebraic_impl(nir_function_impl *impl, const bool *condition_flags, |