nir/instr_set: hash intrinsic sources
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 18 Aug 2020 15:07:32 +0000 (16:07 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 25 Sep 2020 10:18:36 +0000 (10:18 +0000)
ministat (CSE only):
Difference at 95.0% confidence
-9.80325 +/- 0.173089
-41.4434% +/- 0.461972%
(Student's t, pooled s = 0.0763653)

ministat (entire run):
Difference at 95.0% confidence
-3.13667 +/- 0.61519
-5.11107% +/- 0.990737%
(Student's t, pooled s = 0.271416)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6860>

src/compiler/nir/nir_instr_set.c

index 23d59d5..c30d731 100644 (file)
@@ -249,6 +249,10 @@ hash_intrinsic(uint32_t hash, const nir_intrinsic_instr *instr)
    }
 
    hash = XXH32(instr->const_index, info->num_indices * sizeof(instr->const_index[0]), hash);
+
+   for (unsigned i = 0; i < nir_intrinsic_infos[instr->intrinsic].num_srcs; i++)
+      hash = hash_src(hash, &instr->src[i]);
+
    return hash;
 }