nir/cse: resize the instruction set
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 17 Aug 2020 19:22:23 +0000 (20:22 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 15 Jun 2021 17:57:07 +0000 (17:57 +0000)
ministat (CSE only):
Difference at 95.0% confidence
-3357.54 +/- 32.5177
-25.267% +/- 0.24098%
(Student's t, pooled s = 33.909)

ministat (entire run):
Difference at 95.0% confidence
-3414.27 +/- 270.628
-2.76477% +/- 0.217647%
(Student's t, pooled s = 282.207)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6390>

src/compiler/nir/nir_opt_cse.c

index 80f4841..d60758b 100644 (file)
@@ -43,6 +43,8 @@ nir_opt_cse_impl(nir_function_impl *impl)
 {
    struct set *instr_set = nir_instr_set_create(NULL);
 
+   _mesa_set_resize(instr_set, impl->ssa_alloc);
+
    nir_metadata_require(impl, nir_metadata_dominance);
 
    bool progress = false;